各位高手,我是菜菜鸟,最近开始玩NIOS,今天试了最简单的两个LED交替 闪烁实验,在建立NIOS工程后,调用HELLO—LED模块后,在BUILD PROJET 是 老出现如下的错误信息?到底是怎么回事,望高手指点。 int main (void) __attribute__ ((weak, alias ("alt_main"))); /* * Use alt_main as entry point for this free-standing application */ int alt_main (void) { alt_u8 led = 0x2; alt_u8 dir = 0; volatile int i;
/* * Infinitely shift a variable with one bit set back and forth, and write * it to the LED PIO. Software loop provides delay element. */ while (1) { if (led & 0x81) { dir = (dir ^ 0x1); } if (dir) { led = led >> 1; } else { led = led << 1; }
IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, led);------提示出错的地方。
Severity and Description Path Resource Location Creation Time Id error: `LED_PIO_BASE' undeclared (first use in this function) hello_led_4 hello_led.c line 141 1241248626187 18
|