Skip to main content
Associate
August 3, 2023
Question

TM32CubeIDE 1.13.1 and Nucleo-F429ZI - Linker Error

Hello,

when I create a new project with Ide 1.13.1 and Nucleo-F429ZI and enable ETH,  LWIP and HTTPD then I get following linker errors. Seems some module are not compiled automatically. What could be the reason? How to solve?

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/App/lwip.o: in function `MX_LWIP_Init':

C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/App/lwip.c:63: undefined reference to `lwip_init'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/App/lwip.c:71: undefined reference to `netif_add'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/App/lwip.c:74: undefined reference to `netif_set_default'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/App/lwip.c:79: undefined reference to `netif_set_up'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/App/lwip.c:84: undefined reference to `netif_set_down'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/App/lwip.c:88: undefined reference to `netif_set_link_callback'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/App/lwip.c:93: undefined reference to `dhcp_start'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/App/lwip.c:98: undefined reference to `ethernet_input'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `low_level_init':

C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/Target/ethernetif.c:175: undefined reference to `memp_init_pool'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `ethernetif_init':

C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/Target/ethernetif.c:404: undefined reference to `etharp_output'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `pbuf_free_custom':

C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/Target/ethernetif.c:414: undefined reference to `memp_free_pool'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `ethernet_link_check_state':

C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/Target/ethernetif.c:635: undefined reference to `netif_set_down'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/Target/ethernetif.c:636: undefined reference to `netif_set_link_down'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/Target/ethernetif.c:674: undefined reference to `netif_set_up'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/Target/ethernetif.c:675: undefined reference to `netif_set_link_up'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `HAL_ETH_RxAllocateCallback':

C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/Target/ethernetif.c:684: undefined reference to `memp_malloc_pool'

C:/ST/STM32CubeIDE_1.5.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/IMT2021/Stm32WorkspaceTest2/Test230803/Debug/../LWIP/Target/ethernetif.c:693: undefined reference to `pbuf_alloced_custom'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:67: Test230803.elf] Error 1

"make -j8 all" terminated with exit code 2. Build might be incomplete.

 

    This topic has been closed for replies.

    2 replies

    ST Technical Moderator
    August 7, 2023

    Hello @jens3 ,

    Check your defined functions and libraries.

     Take a look at this article: How to create project for STM32H7 with Ethernet an... - STMicroelectronics Community

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    jens3Author
    Associate
    August 28, 2023

    "Check your defined functions and libraries." -> Unfortunately I don't understand your hint. I have nothing defined manually. I enabled in CubeIde 13.1  ETH, LWIP and HTTPD only.

    With best regards,

    Jens