FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6355 Discussions

Adding lwip Client to NIOS-II

Altera_Forum
Honored Contributor II
953 Views

Dear Friends, 

 

I have Quartus 5.0 and NIOS-II (ver 1.1) and i am writing an application over uc/OS-II. 

now i am trying to add simple client application and before building the project i add the lwip software component but during compilation time it reflect following error's 

 

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

 

make -s all  

Compiling hello_ucosii.c...  

Linking hello_ucosii_0.elf...  

C:/altera/kits/nios2_60/examples/verilog/niosII_cyclone_1c20/standard/software/hello_ucosii_0_syslib/Debug/libhello_ucosii_0_syslib.a(altera_avalon_lan91c111.o)(.text+0xd88): In function `low_level_init':  

/cygdrive/c/altera/kits/nios2_60/components/altera_avalon_lan91c111/UCOSII/src/altera_avalon_lan91c111.c:752: undefined reference to `get_mac_addr'  

C:/altera/kits/nios2_60/examples/verilog/niosII_cyclone_1c20/standard/software/hello_ucosii_0_syslib/Debug/libhello_ucosii_0_syslib.a(alt_lwip_dev.o)(.text+0x230): In function `lwip_devices_init':  

/cygdrive/c/altera/kits/nios2_60/components/altera_lwip/UCOSII/src/alt_lwip_dev.c:165: undefined reference to `get_ip_addr'  

collect2: ld returned 1 exit status  

make: *** [hello_ucosii_0.elf] Error 1  

Build completed 

 

1.>i do not know how to add a simple client application over uc/OS, please help me out how to add this  

2.> what setting's i ave to do before writing client code. 

3.> what are the header files are required. 

 

when i add the ipport.h and tcpport.h file it generate the following errors (though i haven't yet add my c-code , i have just add the header file anly) 

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

 

make -s all  

Compiling hello_ucosii.c...  

../hello_ucosii.c:42:20: ipport.h: No such file or directory  

../hello_ucosii.c:43:21: tcpport.h: No such file or directory  

make: *** [obj/hello_ucosii.o] Error 1  

Build completed 

 

 

kaushal 

 

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
298 Views

Please do not multipost your question. 

 

It seems that you are mixing some parts that expect to work with the Interniche stack and others that expect lwIP. 

Why don't you upgrade your Quartus/Nios installation and use Interniche?
0 Kudos
Altera_Forum
Honored Contributor II
298 Views

Dear Daixiwen, 

I have multipost my question becouse, i though this problem belongs to many domain's like NIOS-ii Software writing, Networking etc. and hoping for write personn to see my problem. 

any way...we are in process of software upgradation but it will take little bit of time. 

as i am absuletelly new in nios domain and had Quartus 5.0 along with Nios-1.1 and as it will support lwip only so i limit myself with lwip only (dont know much about internich). 

 

problem is as soon as i enable the lwip (through IDE/software setting) without writing any code related to socket , it start generating error's, that was a big worrey. 

something like. 

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

 

make -s all  

Compiling hello_ucosii.c...  

Linking hello_ucosii_0.elf...  

C:/altera/kits/nios2_60/examples/verilog/niosII_cyclone_1c20/standard/software/hello_ucosii_0_syslib/Debug/libhello_ucosii_0_syslib.a(altera_avalon_lan91c111.o)(.text+0xd88): In function `low_level_init':  

/cygdrive/c/altera/kits/nios2_60/components/altera_avalon_lan91c111/UCOSII/src/altera_avalon_lan91c111.c:752: undefined reference to `get_mac_addr'  

C:/altera/kits/nios2_60/examples/verilog/niosII_cyclone_1c20/standard/software/hello_ucosii_0_syslib/Debug/libhello_ucosii_0_syslib.a(alt_lwip_dev.o)(.text+0x230): In function `lwip_devices_init':  

/cygdrive/c/altera/kits/nios2_60/components/altera_lwip/UCOSII/src/alt_lwip_dev.c:165: undefined reference to `get_ip_addr'  

collect2: ld returned 1 exit status  

make: *** [hello_ucosii_0.elf] Error 1  

Build completed 

 

 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
298 Views

Most of the people here read all the forums anyway, so just pick one that seems appropriate and ask your question there. Multiposting creates several discussions in parallel on the same subject, which makes it very difficult to follow. 

I thought that the get_ip_addr and get_mac_addr functions were specific to Interniche, but they seem to be required with lwip too. 

Have you read that document? http://www.altera.com.cn/literature/hb/nios2/n2sw_nii52009.pdf 

You need to add those two functions to your application, as described in pages 16-4 and further.
0 Kudos
Reply