Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

Nios II Ethernet Standard Design Example

Altera_Forum
Honored Contributor II
1,758 Views

I just built and compiled the Nios II Ethernet Standard Design Example with no problems, and successfully programmed it on my Cyclone III Nios II NEEK development kit. 

 

I did a quick SW check by running the "Hello World" sample software with no problem. 

 

Now, getting into the more serious stuff with an attempt to compile and run the Web Server sample code. No luck! Got the following error: 

 

web_server.c:346: error: 'led_pio_base' undeclared (first use in this function) 

 

 

Can someone tell me where 'LED_PIO_BASE' should be declared, and perhaps WHY it is not declared? 

 

Here is the link to the example design on Altera's Website 

 

http://www.altera.com/support/examples/nios2/exm-net-std-de.html
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
452 Views

It's because you have to declare in your sopc a component name LED_PIO that must be of the type GPIO OUTPUT. If you dont want this you can remove all the references to LED_PIO in the sourc codes of the webserver

0 Kudos
Altera_Forum
Honored Contributor II
452 Views

Ah ha! The error I was getting was: 

 

web_server.c:346: error: 'led_pio_base' undeclared (first use in this function) 

 

The example Qsys design implements two Qsys submodules, one of which contains the LED_PIO component. I checked to see if it was defined in the system.h file as you suggested, and found that it had the name "PERIPHERAL_SUBSYSTEM_LED_PIO_BASE". 

 

I changed the web_server.c file to use this name instead of "LED_PIO_BASE" and it compiled and ran correctly. 

 

Thanks for your help and quick reply to my plea for help. 

 

now, how do we get this information to altera so they can make the correction to the example design?
0 Kudos
Altera_Forum
Honored Contributor II
452 Views

You can report it at www.altera.com (http://www.altera.com), i think there is an area for it under the support tab (support->mysupport)

0 Kudos
Altera_Forum
Honored Contributor II
452 Views

Were you using the copy of web server in the design file? I just downloaded the NEEK version and the software looks fine to me on line 346 (using a hierarchical name).

0 Kudos
Altera_Forum
Honored Contributor II
452 Views

hi, 

i am getting the following error while running web server demo program in nios ii sbt for eclipse. i looked at the qsys the name of the pio is led_pio.. 

 

 

web_server.c:346: error: 'led_pio_base' undeclared (first use in this function) 

 

can someone tell me where 'led_pio_base' should be declared, and perhaps why it is not declared? 

 

please reply.
0 Kudos
Altera_Forum
Honored Contributor II
452 Views

Fixed myself. Thanks.

0 Kudos
Reply