[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

parse error before "u32"



Hi,

just started out on the devboard (82) and managed to get the env up and 
running and the hello.c program worked just fine. However when I try to 
add some I/O operations the compiler says:
snon:~/axis/devboard_82/apps/hello# make
gcc-cris  -isystem 
/root/axis/devboard_82/target/cris-axis-linux-gnu/include -mlinux -Wall 
-Wshadow -O2 -g   -c -o hello.o hello.c
hello.c: In function `main':
hello.c:6: parse error before "u32"
hello.c:7: parse error before "u32"
hello.c:9: parse error before "u32"
make: *** [hello.o] Error 1

The code is as simple as it gets...
#include <asm/svinto.h>
#include <linux/delay.h>

int main( int argc, char *argv[] )
{
  *R_PAR0_CONFIG = 0x00000060;  // Initialise manual mode
  *R_PAR0_CTRL_DATA = 0x001000ff; // Set output on D0-D7 to High
  udelay(100);
  *R_PAR0_CTRL_DATA = 0x00100000; // Set output on D0-D7 to Low
  udelay(100);
 
  return 0;
}