Altera_Forum
Honored Contributor
10 years agode0-nano board / Nios2 troublemaker
Good evening,
actually i m facing big troubles in making my leds blink with a nios processor. I followed all steps in the tutorial given in den development kit and have used the saved projects file given by the cd. But i am getting the same error over and over again. This is error: 'PIO_LED_BASE' undeclared (first use in this function) hello_world.c /Hello_0 line 29 C/C++ Problem When i go along with my mouse over that x symbol which represent an error ,it also says: Multiple markers at this line (line 29) - each undeclared identifier is only reported once for each function it appears in - in expansion of macro 'IOWR_ALTERA_AVALON_PIO_DATA' - 'PIO_LED_BASE' undeclared (first use in this function) Thats the c-code im using which can also be found in the de0-nano board manuel (dvd or internet). --------------------------------------------------------------------------# include <stdio.h># include "system.h"# include "altera_avalon_pio_regs.h" int main() { int count = 0; int delay; while(1) { IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, count & 0x01); // error message X delay = 0; while(delay < 2000000) { delay++; } count++; } return 0; } ---------------------------------------------------------------------------- I ve tested that nios_project with Quartus 13 which was also sent with the development kit. I ve encountered some strange issues during compliation like not creating an .elf file. Thats why i decided to make a new clean installation of the newest quartus version (15.0). But I am still not managing to run the code i ve provided above. Nios2 and its components were created by Qsys. I ve even checked the BASE_ADRESS in QSYS and in "system.h" against each other, but they re the same. I also checked the the name (LED_PIO_BASE) in "system.h" which is the right one im using in the ALTERA function. Actually i dont know what to do.