Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

Nios II Ethernet Standard Design Example

Altera_Forum
Honored Contributor II
1,505 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
199 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

Altera_Forum
Honored Contributor II
199 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?
Altera_Forum
Honored Contributor II
199 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)

Altera_Forum
Honored Contributor II
199 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).

Altera_Forum
Honored Contributor II
199 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.
Altera_Forum
Honored Contributor II
199 Views

Fixed myself. Thanks.

Reply