2023-08-21 06:25 AM - edited 2023-08-22 04:30 AM
Hi, I'm playing around with lwIP on my Nucleo-H743ZI and I was able to make ping work, udp/tcp echo and snmp too. But when I enable HTTPd the project doesn't wont do compile I just get a lot of undefined references, I tried to make a new project and same thing happened. This are the compiler error messages that I get:
Core/Src/main.c:113: undefined reference to `httpd_init'
LWIP/App/lwip.o: in function `MX_LWIP_Init':
LWIP/App/lwip.c:80: undefined reference to `lwip_init'
LWIP/App/lwip.c:88: undefined reference to `netif_add'
LWIP/App/lwip.c:91: undefined reference to `netif_set_default'
LWIP/App/lwip.c:96: undefined reference to `netif_set_up'
LWIP/App/lwip.c:101: undefined reference to `netif_set_down'
LWIP/App/lwip.c:105: undefined reference to `netif_set_link_callback'
LWIP/App/lwip.c:112: undefined reference to `ethernet_input'
LWIP/App/lwip.c:161: undefined reference to `sys_check_timeouts'
LWIP/Target/ethernetif.c:202: undefined reference to `memp_init_pool'
LWIP/Target/ethernetif.c:348: undefined reference to `pbuf_free'
LWIP/Target/ethernetif.c:431: undefined reference to `etharp_output'
LWIP/Target/ethernetif.c:441: undefined reference to `memp_free_pool'
LWIP/Target/ethernetif.c:660: undefined reference to `netif_set_down'
LWIP/Target/ethernetif.c:661: undefined reference to `netif_set_link_down'
LWIP/Target/ethernetif.c:699: undefined reference to `netif_set_up'
LWIP/Target/ethernetif.c:700: undefined reference to `netif_set_link_up'
LWIP/Target/ethernetif.c:709: undefined reference to `memp_malloc_pool'
LWIP/Target/ethernetif.c:718: undefined reference to `pbuf_alloced_custom'
I did include httpd.h in main and I try manually including other libs but it didn't help. When disable http it compiles normally.
I'm new to this so any advice will be helpful.
Thanks in advance
Alex
2023-09-12 04:30 AM
Sorry - please disregard, i found where to do this. Thank you again for your help
2023-11-08 11:28 PM
I had exactly the same problem, everything worked great until i enabled HTTPD in the project. This is because the middlewares folder is not included or something. Go to Properties ->C/C++ General -> Paths and Symbols -> Source Location. Before you enabled the HTTPD feature it had 4 folders, after enabling it it has 3 folders. The Middlewares folder is gone, why? I don't know. Just add the Middlewares folder and it works again.
2023-11-09 10:35 AM
OK, it works !!
best regards
2024-02-04 12:07 PM
I have a similar problem - with a different list of linker errors.
With HTTPD disabled everything is fine. With HTTPD enabled everything compiles, but does not link.
All of the CMSIS-RTOS_V2 calls are 'undefined reference' - plus a bunch of others.
Can someone who has found out what to do describe what they actually did - with screenshot. "OK, it works !!" helps no-one...
Anyone from ST listening? This obviously a bug in CubeMX, and has been reported for over 4 months - with neither fix or official work-around
2024-06-13 05:53 AM
Hello,
The issue is still present in the latest version 6.11.1 of CubeMX. After enabling the "HTTPD" feature in the LwIP middleware, it is necessary to add the Middlewares directory to the source location.
2024-10-14 03:32 AM
Hey everyone, I ran into the same issue when building a project with STM32CubeIDE, using CMSIS-RTOS v2, and LwIP. I kept getting errors like:
undefined reference to `osKernelInitialize`
undefined reference to `osThreadNew`
undefined reference to `tcpip_init`
After trying several fixes, I finally found the solution:
Go to Source Location:
Add the Middlewares Folder:
Rebuild the Project:
This fixed the issue for me, and I hope it helps others as well.