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-08-24 04:56 AM
HI everybody, have exactly the same problem on STM32CubeIDE v1.13.1 and MCU package for STMH7 v 1.11.1. I develop for nucleo-h743ZI board. Example LwIP_HTTP_Server_Raw compile and works with mods of pin connection for ethernet phy
I expect one of us have solution :)
2023-08-24 05:10 AM
> I was able to make ping work, udp/tcp echo and snmp too.
This is super cool, congrats!
> when I enable HTTPd
What exactly does this mean? Where do you enable it?
2023-08-24 05:33 AM
2023-09-06 08:38 AM
Simply generating a project using STM32CubeMX with HTTPd activated doesn't seem to present an issue.
Could you please share details about the version of STM32CubeMX you're using and the IDE you compile with ? (IAR, STM32CubeIDE, Keil, ..).
If possible to share a simple STM32CubeMX project ( .ioc) that reproduce the issue, it would help.
Thanks.
2023-09-07 01:00 AM
Hi
I compile the joined example with STM32CubeIDE V 1.13.1 and STM32CubeH7 Firmware Package V1.11.0 / 04-Nov-2022.
With httpd disabled in lwip settings (in ioc window) all compile and televerse correctly, ping to the address fixed (192.168.1.250) is OK.
When httpd enabled -> compilation error like Abeslic described in his post
Best regards
2023-09-07 04:44 AM
I remember that I had similar problems, it took some time to sort the includes for the header files.
But I can't remember what I exactly did...
2023-09-07 10:33 AM
Hi @Pavel A.
sorry for not replying sooner.
I figured out what was the problem, when I enable HTTPd the IDE excludes the hole lwIP lib from the build, I just had to manually unexcluded and it worked like charm.
2023-09-07 10:39 AM
Try manually to unexclud lwIP lib from the build.
2023-09-12 04:22 AM
Hi abeslic,
I am bashing me head against the wall with this same issue. However I cannot see where lwIP lib is getting excluded from the build. (I am still new to STM32Cube - so probably missing something obvious).
Can you provide more detail on how to unexclude from the build?
Thanks!