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++
12604 Discussions

LwIP doens't work with NIOS II 6.0

Altera_Forum
Honored Contributor II
1,369 Views

Hi all, 

 

I&#39;ve a Standalone LwIP project (download from topic "Tested IP") with NIOS II & QUARTUS 5.1. I&#39;ve been testing this project with NIOS II & QUARTUS 6.0 and i&#39;ve got a lot of problems and I couldn&#39;t build my project. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif  

It&#39;s related with LAN91C111 code, that can&#39;t be reached. 

I couldn&#39;t solve this problem, but if someone got it, please answer this topic. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/rolleyes.gif  

Next, the errors I founded. 

 

Thanks, 

Nosima 

 

 

**** Incremental build of configuration Debug for project lwip_web_server_0 **** 

 

make -s all  

Compiling echo.c... 

Compiling fs.c... 

Compiling fsdata.c... 

Compiling httpd.c... 

Compiling dhcp.c... 

../lwip-0.7.1/src/core/dhcp.c:1395: warning: &#39;dhcp_get_option_short&#39; defined but not used 

Compiling inet.c... 

Compiling icmp.c... 

Compiling ip.c... 

Compiling ip_addr.c... 

Compiling ip_frag.c... 

Compiling mem.c... 

Compiling memp.c... 

Compiling netif.c... 

Compiling pbuf.c... 

Compiling raw.c... 

Compiling stats.c... 

Compiling sys.c... 

Compiling tcp.c... 

Compiling tcp_in.c... 

Compiling tcp_out.c... 

Compiling udp.c... 

Compiling etharp.c... 

Compiling loopif.c... 

../lwip-0.7.1/src/netif/loopif.c:48: warning: &#39;loopif_input&#39; defined but not used 

Compiling lib.c... 

Compiling lwip_init.c... 

Compiling lan91c111if.c... 

../lwip4hal/netif/lan91c111if.c: In function `low_level_output&#39;: 

../lwip4hal/netif/lan91c111if.c:76: error: `alt_avalon_lan91c111_if&#39; undeclared (first use in this function) 

../lwip4hal/netif/lan91c111if.c:76: error: (Each undeclared identifier is reported only once 

../lwip4hal/netif/lan91c111if.c:76: error: for each function it appears in.) 

../lwip4hal/netif/lan91c111if.c:76: error: `dev&#39; undeclared (first use in this function) 

../lwip4hal/netif/lan91c111if.c: In function `low_level_input&#39;: 

../lwip4hal/netif/lan91c111if.c:185: error: `alt_avalon_lan91c111_if&#39; undeclared (first use in this function) 

../lwip4hal/netif/lan91c111if.c:185: error: `dev&#39; undeclared (first use in this function) 

../lwip4hal/netif/lan91c111if.c:194: warning: use of cast expressions as lvalues is deprecated 

../lwip4hal/netif/lan91c111if.c: In function `lan91c111if_service&#39;: 

../lwip4hal/netif/lan91c111if.c:276: error: `alt_avalon_lan91c111_if&#39; undeclared (first use in this function) 

../lwip4hal/netif/lan91c111if.c:276: error: `dev&#39; undeclared (first use in this function) 

../lwip4hal/netif/lan91c111if.c:276: error: parse error before &#39;)&#39; token 

../lwip4hal/netif/lan91c111if.c: In function `low_level_init&#39;: 

../lwip4hal/netif/lan91c111if.c:303: error: `alt_avalon_lan91c111_if&#39; undeclared (first use in this function) 

../lwip4hal/netif/lan91c111if.c:303: error: `dev&#39; undeclared (first use in this function) 

../lwip4hal/netif/lan91c111if.c:303: error: parse error before &#39;)&#39; token 

../lwip4hal/netif/lan91c111if.c:311: warning: implicit declaration of function `read_mac_address&#39; 

make: *** [obj/lwip4hal/netif/lan91c111if.o] Error 1 

Build completed
0 Kudos
11 Replies
Altera_Forum
Honored Contributor II
594 Views

You&#39;d probably have success if you created a new project in the 6.0 IDE and imported your files from your old project. There&#39;s no guarantee that tranference of projects between versions will work... 

 

Once you&#39;ve created your new project, and copied your files over, you&#39;ll want to ensure that your include paths are set correctly... Go under the C/C++ project settings to look for this. 

 

Best of luck! 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
594 Views

Thanks for the answer Slacker, 

 

I did that before. Beyond, I recreated my project from beginning in Quartus II 6.0, after I started an C/C++ Project in NIOS II 6.0 with template of Lwip Web Server and I got that error. 

I verified paths and other settings. 

I think the problem is something related to include file "altera_avalon_lan91c111.h", because all functions from error come from this file. 

Other thing I forgot so say is that NIOS II 6.0 point this error to file "lan91c111if.c" 

 

Thanks for the advice, 

Best regards, 

Nosima 

 

 

 

--- Quote Start ---  

originally posted by slacker@May 22 2006, 06:24 PM 

you&#39;d probably have success if you created a new project in the 6.0 ide and imported your files from your old project.  there&#39;s no guarantee that tranference of projects between versions will work... 

 

once you&#39;ve created your new project, and copied your files over, you&#39;ll want to ensure that your include paths are set correctly...  go under the c/c++ project settings to look for this. 

 

best of luck! 

 

- slacker 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15510) 

--- quote end ---  

 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
594 Views

Nosima 

 

Did you ever get this working. I have hit the same problem and would be 

very grateful if you have any help. 

 

- Dyson 

 

 

--- Quote Start ---  

originally posted by nosima@May 22 2006, 09:40 PM 

thanks for the answer slacker, 

 

i did that before. beyond, i recreated my project from beginning in quartus ii 6.0, after i started an c/c++ project in nios ii 6.0 with template of lwip web server and i got that error. 

i verified paths and other settings. 

i think the problem is something related to include file "altera_avalon_lan91c111.h", because all functions from error come from this file. 

other thing i forgot so say is that nios ii 6.0 point this error to file "lan91c111if.c" 

 

thanks for the advice, 

best regards, 

nosima 

 

 

 

--- quote start ---  

originally posted by slacker@may 22 2006, 06:24 pm 

You&#39;d probably have success if you created a new project in the 6.0 IDE and imported your files from your old project.  There&#39;s no guarantee that tranference of projects between versions will work... 

 

Once you&#39;ve created your new project, and copied your files over, you&#39;ll want to ensure that your include paths are set correctly...  Go under the C/C++ project settings to look for this. 

 

Best of luck! 

 

- slacker 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15510) 

--- Quote End ---  

[/b] 

--- Quote End ---  

 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15511)</div> 

[/b] 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
594 Views

Hi Dyson... 

 

I&#39;ve been trying to get it work but I got no results. I don&#39;t know what to do anymore... it&#39;s really sad... 

I will keep trying to get it up... 

 

Best regards, 

Nosima 

 

 

--- Quote Start ---  

originally posted by dyson+jun 5 2006, 09:06 am--><div class='quotetop'>quote (dyson @ jun 5 2006, 09:06 am)</div> 

--- quote start ---  

nosima 

 

did you ever get this working. i have hit the same problem and would be 

very grateful if you have any help. 

 

- dyson 

 

<!--quotebegin-nosima@May 22 2006, 09:40 PM 

thanks for the answer slacker, 

 

i did that before. beyond, i recreated my project from beginning in quartus ii 6.0, after i started an c/c++ project in nios ii 6.0 with template of lwip web server and i got that error. 

i verified paths and other settings. 

i think the problem is something related to include file "altera_avalon_lan91c111.h", because all functions from error come from this file. 

other thing i forgot so say is that nios ii 6.0 point this error to file "lan91c111if.c" 

 

thanks for the advice, 

best regards, 

nosima 

 

 

 

--- quote start ---  

originally posted by slacker@may 22 2006, 06:24 pm 

You&#39;d probably have success if you created a new project in the 6.0 IDE and imported your files from your old project.  There&#39;s no guarantee that tranference of projects between versions will work... 

 

Once you&#39;ve created your new project, and copied your files over, you&#39;ll want to ensure that your include paths are set correctly...  Go under the C/C++ project settings to look for this. 

 

Best of luck! 

 

- slacker 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15510) 

--- Quote End ---  

[/b] 

--- Quote End ---  

 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15511)</div> 

[/b] 

--- Quote End ---  

 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15912)</div> 

[/b] 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
594 Views

TO_BE_DONE

0 Kudos
Altera_Forum
Honored Contributor II
594 Views

If I copy the LWIP components\altera_avalon_lan91c111\HAL to C:\altera\quartus60\sopc_builder\components\altera_avalon_lan91c111\HAL I can build the project, but it doesn&#39;t run. Not really sure at this point what the problem is. 

 

--Jordan
0 Kudos
Altera_Forum
Honored Contributor II
594 Views

Hey... 

 

I&#39;m not getting any succesful result... I have been trying but no results. 

I tryied everything you did above, but I found same problems... 

I think there is a problems int the sys library... something that I see that the nios 5.1 project system library is diferent... 

 

That&#39;s all 

 

 

--- Quote Start ---  

originally posted by yek401@Jun 28 2006, 03:45 PM 

if i copy the lwip components\altera_avalon_lan91c111\hal to c:\altera\quartus60\sopc_builder\components\altera_avalon_lan91c111\hal i can build the project, but it doesn&#39;t run.  not really sure at this point what the problem is. 

 

--jordan 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16477) 

--- quote end ---  

 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
594 Views

I&#39;ve succesfully made it working on NIOS 6.0 by replacing the file 

C:\altera\quartus60\sopc_builder\components\altera_avalon_lan91c111\HAL\inc\altera_avalon_lan91c111.h 

by the one found in the archive. 

 

good luck !
0 Kudos
Altera_Forum
Honored Contributor II
594 Views

 

--- Quote Start ---  

originally posted by gjoli@Oct 5 2006, 02:51 PM 

i&#39;ve succesfully made it working on nios 6.0 by replacing the file 

c:\altera\quartus60\sopc_builder\components\altera_avalon_lan91c111\hal\inc\altera_avalon_lan91c111.h 

by the one found in the archive. 

 

good luck ! 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=18560) 

--- quote end ---  

 

--- Quote End ---  

 

Where is this archive exectly? 

Can you attach the good file? 

 

O.K. 

I found my problem at last - I moved the project to seperate workspace from old projects&#39; workspace, and delete the backup of the old altera_avalon_lan91c111 from components folder. 

Now the application is working. Still look for how to change IP Address.
0 Kudos
Altera_Forum
Honored Contributor II
594 Views

Hi Everyone! 

 

As I said, LwIP will not work moreover. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif  

They said that they will use now NicheStack. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif  

This way, we will need to pay to develop the new system. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif  

 

look this document: 

http://www.altera.com/literature/hb/nios2/n2sw_nii52009.pdf (http://www.altera.com/literature/hb/nios2/n2sw_nii52009.pdf

 

See all! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif
0 Kudos
Altera_Forum
Honored Contributor II
594 Views

hi to all, 

 

of course it is still possible to get standalone Lwip running : 

 

1. Step 

 

Replace the file 

C:\altera\61\quartus\sopc_builder\components\altera_avalon_lan91c111\HAL\inc\altera_avalon_lan91c111.h 

by the one found in the archive 

 

 

2. Step 

 

If you have installed the IP megacores !!! 

 

Replace the file 

C:\altera\61\ip\sopc_builder_ip\altera_avalon_lan91c111\HAL\inc\altera_avalon_lan91c111.h 

by the one found in the archive 

 

 

archive = in the standalone lwip package "components\altera_avalon_lan91c111\HAL\inc" 

 

-> altera_avalon_lan91c111.h.mtx "delete .mtx"
0 Kudos
Reply