Skip to main content
Visitor II
August 21, 2023
Question

Enabling HTTPd breaks the whole project

  • August 21, 2023
  • 11 replies
  • 9273 views

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

    This topic has been closed for replies.

    11 replies

    Visitor II
    August 24, 2023

    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 :)

    Super User
    August 24, 2023

     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?

    Visitor II
    August 24, 2023

    look at joined screen capture to see  the meaning of "httpd activation" in the tab with the same name 

    ST Employee
    September 6, 2023

    Hi @xavier.clement87 

    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. 

    Visitor II
    September 7, 2023

    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

    abeslicAuthor
    Visitor II
    September 7, 2023

    Hi @xavier.clement87 

    Try manually to unexclud lwIP lib from the build.

    Graduate II
    September 7, 2023

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

    Explorer
    September 12, 2023

    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!

    Explorer
    September 12, 2023

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

    Visitor II
    November 9, 2023

    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. 

    Visitor II
    November 9, 2023

    OK, it works !!

    best regards

    Visitor II
    February 4, 2024

    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

    Visitor II
    June 13, 2024

    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.