Altera_Forum
Honored Contributor
14 years agoDE2-70 Nios II problem
Hi everyone,
First of all im newbie of FPGAs Now im working with DE2-70 and my design works. but i have new problem like, ../hello_world.c: In function `test1_led': ../hello_world.c:24: error: `IOWR_ALTERA_AVALON_PIO_DATA' undeclared (first use in this function) ../hello_world.c:24: error: (Each undeclared identifier is reported only once ../hello_world.c:24: error: for each function it appears in.) ../hello_world.c:24: warning: left-hand operand of comma expression has no effect ../hello_world.c:26: error: `PIO_RED_LED_BASE' undeclared (first use in this function) ../hello_world.c:26: error: syntax error before "led_mask" ../hello_world.c:28: warning: implicit declaration of function `usleep' ../hello_world.c:30:2: warning: no newline at end of file ../hello_world.c:30: error: syntax error at end of input my code; # include "system.h" # include "altera_avalon_pio_regs.h" # include "alt_types.h" void test1_led(void){ alt_u32 led_mask=0; while(1){ // green led control // red led control (IOWR_ALTERA_AVALON_PIO_DATA, led_mask); PIO_RED_LED_BASE // toggle led led_mask ^= 0xFFFFFFFF; // sleep 0.2 second usleep(200*1000); } // while