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

lwIP

Altera_Forum
Honored Contributor II
1,192 Views

Hi to all, 

I have an Altera DE4 development and education board. 

I'm trying to implement an UDP client on my board. 

To do this, I tried to follow this guide (http://www.freertos.org/interactive_frames/open_frames.html?http://interactive.freertos.org/forums/216314-altera) to use the lwIP TCP/IP stack. When I build project, the console output is the following: 

 

**** Build of configuration Nios II for project lwip_demo **** make all Info: Building ../lwip_demo_bsp/ make --no-print-directory -C ../lwip_demo_bsp/ Compiling alt_env_lock.c... nios2-elf-gcc -xc -MP -MMD -c -I./drivers/inc -I./LwIP/inc -I./LwIP/inc/ipv4 -I./FreeRTOS/inc -I./HAL/inc -I. -I./drivers/inc -DSYSTEM_BUS_WIDTH=32 -pipe -D__hal__ -DALT_NO_INSTRUCTION_EMULATION -DALTERA_TRIPLE_SPEED_MAC -DALT_LWIP -D__freertos__ -O0 -g -Wall -EL -mno-hw-div -mhw-mul -mhw-mulx -o obj/FreeRTOS/src/alt_env_lock.o FreeRTOS/src/alt_env_lock.c Compiling alt_main.c... ... ... ... Info: Compiling echo_server.c to obj/echo_server.o nios2-elf-gcc -xc -MP -MMD -c -I../lwip_demo_bsp//drivers/inc -I../lwip_demo_bsp//LwIP/inc -I../lwip_demo_bsp//LwIP/inc/ipv4 -I../lwip_demo_bsp//FreeRTOS/inc -I../lwip_demo_bsp//HAL/inc -I../lwip_demo_bsp/ -I../lwip_demo_bsp//drivers/inc -DSYSTEM_BUS_WIDTH=32 -pipe -D__hal__ -DALT_NO_INSTRUCTION_EMULATION -DALTERA_TRIPLE_SPEED_MAC -DALT_LWIP -D__freertos__ -O0 -g -Wall -EL -mno-hw-div -mhw-mul -mhw-mulx -o obj/echo_server.o echo_server.c echo_server.c: In function 'prvMySocketTest': echo_server.c:35: warning: implicit declaration of function 'close' echo_server.c:56: warning: implicit declaration of function 'print_ipad' echo_server.c:56: warning: format '%s' expects type 'char *', but argument 3 has type 'int' echo_server.c:56: warning: format '%s' expects type 'char *', but argument 3 has type 'int' echo_server.c:59: warning: implicit declaration of function 'read' echo_server.c:61: warning: implicit declaration of function 'write' echo_server.c:75:7: warning: no newline at end of file Info: Compiling ethernet.c to obj/ethernet.o nios2-elf-gcc -xc -MP -MMD -c -I../lwip_demo_bsp//drivers/inc -I../lwip_demo_bsp//LwIP/inc -I../lwip_demo_bsp//LwIP/inc/ipv4 -I../lwip_demo_bsp//FreeRTOS/inc -I../lwip_demo_bsp//HAL/inc -I../lwip_demo_bsp/ -I../lwip_demo_bsp//drivers/inc -DSYSTEM_BUS_WIDTH=32 -pipe -D__hal__ -DALT_NO_INSTRUCTION_EMULATION -DALTERA_TRIPLE_SPEED_MAC -DALT_LWIP -D__freertos__ -O0 -g -Wall -EL -mno-hw-div -mhw-mul -mhw-mulx -o obj/ethernet.o ethernet.c ethernet.c: In function 'StatusCallback': ethernet.c:44: error: too few arguments to function 'print_ipad' ethernet.c:45: error: too few arguments to function 'print_ipad' ethernet.c:46: error: too few arguments to function 'print_ipad' ethernet.c: In function 'InitNetwork': ethernet.c:65: error: too few arguments to function 'lwip_initialize' ethernet.c: In function 'WaitOnPHY': ethernet.c:83: error: 'TSE_MAC_BASE' undeclared (first use in this function) ethernet.c:83: error: (Each undeclared identifier is reported only once ethernet.c:83: error: for each function it appears in.) ethernet.c:101: warning: implicit declaration of function 'usleep' ethernet.c: In function 'xEthernetRun': ethernet.c:143: error: 'TSE_MAC_BASE' undeclared (first use in this function) ethernet.c:193: warning: 'return' with a value, in function returning void ethernet.c:146: warning: unused variable 'nDisconnectCnt' ethernet.c:143: warning: unused variable 'pmac' ethernet.c: In function 'get_ip_addr': ethernet.c:224: error: too few arguments to function 'print_ipad' make: *** Error 1  

 

Why it gives me these errors? I have not changed the code. 

Please could someone help me? 

 

Best Regards, 

Umberto.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
409 Views

For one thing, you haven't defined TSE_MAC_BASE in your Qsys system (this is one of the things the error messages are telling you). You also might want to track the GIT source (https://github.com/engineeringspirit/freelwip-nios-ii) for this project as it appears there have been recent changes (up to around a month ago). 

 

You should be posting the issues you have to that Github project as well. 

 

Cheers and Good Luck!
0 Kudos
Reply