cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling HTTPd breaks the whole project

abeslic
Associate II

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

14 REPLIES 14
OriginalCDV
Associate II

Sorry - please disregard, i found where to do this. Thank you again for your help

BrentD
Associate

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. 

xavier.clement87
Associate II

OK, it works !!

best regards

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

Anto1
Associate

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.