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
    October 14, 2024

    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:

     

    1. Go to Source Location:

      • Open your project in STM32CubeIDE.
      • Navigate to Project -> Properties -> C/C++ General -> Paths and Symbols -> Source Location.
    2. Add the Middlewares Folder:

      • You’ll likely notice that the Middlewares folder is missing from the list.
      • Click on Add Folder and select the Project/Middlewares folder in your project directory.
    3. Rebuild the Project:

      • After adding the folder, clean the project (Project -> Clean) and rebuild it (Project -> Build).

     

    This fixed the issue for me, and I hope it helps others as well.