cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-F767ZI Ethernet Problem

Ramachandran1992
Associate III

Hi Team, 

I am Using NUCLEO-F767ZI board for Ethernet interface. After all Ethernet configuration. The code shows lots of error which is attached below. Guide me how to rectify this error, what mistake I was done during configuration and programming.
This picture gives the detail of ethernet configuration. 

Ramachandran1992_0-1722408760388.png

In LWIP I enabled the HTTPD_USE_CUSTOM_FSDATA (Custom FS Data)  in the HTTPD section.

Below picture shows the list of error after build the code.

Ramachandran1992_1-1722408950710.png

Thank You

regards
Ramachandran S

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

 

STM32CubeIDE by default removes the "Middlewares" folder from the compilation, so when you compile the project the compiler returns link errors to the definitions contained in the header files of each library contained in the "Middlewares" folder.

 

To solve this I've done theese steps:

 

- Click on LWIP folder with left mouse button, it will open a menu.

- Select "Properties",

- Go to "C/C++ General",

- Click on "Path and Symbols",

- Click on "Source Locations",

- if there is no "Middleware" folder then add it just by clicking "add folder" button and selecting "Middleware" folder.

-Recompile and all linking errors should be solved.

 

Remember that theese steps must be done for every new project. ( I'm using STM32CubeIDE 1.15.0, i don't know for other versions).

 

I hope that's usefull for you!

 

Best regards,

Gabriele.

View solution in original post

7 REPLIES 7
Ghofrane GSOURI
ST Employee

Hello @Ramachandran1992 

First let me thank you for posting.

I 'am  checking this issue internally and i will get back to you asap.

 

THX

Ghofrane

Ghofrane GSOURI
ST Employee

Hello @Ramachandran1992 

This issue has been raised to our dev team .

Internal ticket number: 187803 (This is an internal tracking number and is not accessible or usable by customers).

I will keep you posted with updates.

THX

Ghofrane

Ramachandran1992
Associate III

Hi  Ghofrane
Thanks for your quick response.

Andrew Neil
Evangelist III

@Ramachandran1992 wrote:

The code shows lots of error ...


Usually that's due to just one error early on in the build, and all the rest are just a result of that - eg, a missing header file.

A classic example here: https://community.st.com/t5/stm32cubeide-mcus/enabling-peripherals-for-spi-communication-in-seongji-lsm110a/m-p/739889/highlight/true#M32138

Therefore the thing to do is to address the earliest-reported error first.

Note that the 'Problems' window is not useful for this, as it re-orders the messages.

Instead, use the 'Console' view - which is in order.

 


@Ramachandran1992 wrote:

... which is attached below.


A screenshot is not very useful, as it doesn't show the whole message, and doesn't show all the messages.

Instead, please select-all from the 'Console' window, then copy and paste the text here, using the </> button as for source code - instructions here:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

 

#LotsOfErrors #MultipleErrors #FirstErrorFirst #FixFirstErrorFirst

Ramachandran1992
Associate III

Hi Andrew,

Thanks for your quick reply, Yes correct mostly all are missing files, But I add all the respective files. Reference video from the YouTube, and link and procedure from the ST community I follow all the steps. but I face these much of errors. In middleware folder from LWIP, I try to exclude the files "fsdata.c and fsdata_custom.c" from the built but these files are not excluded from the Resource Configuration. But I try GitHub program it works fine. I attached both the project files. guide me to recover the errors. 

The first project file was created by me, the first file having the error.(ETH_TEST.rar)

The second project file was downloaded from the GitHub (Ethernet_HTTP-1.rar) -> This file build and debug without any error, but it does not ping. (Timeout -> error msg was shown)

17:07:28 **** Incremental Build of configuration Debug for project ETH_TEST ****
make -j36 all 
arm-none-eabi-gcc "../LWIP/Target/ethernetif.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F767xx -c -I../Core/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Drivers/BSP/Components/lan8742 -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/apps/http -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/compat/posix -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/net -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/sys -I../Middlewares/Third_Party/LwIP/src/include/compat/stdc -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"LWIP/Target/ethernetif.d" -MT"LWIP/Target/ethernetif.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "LWIP/Target/ethernetif.o"
arm-none-eabi-gcc "../LWIP/App/lwip.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F767xx -c -I../Core/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Drivers/BSP/Components/lan8742 -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/apps/http -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/compat/posix -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/net -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/sys -I../Middlewares/Third_Party/LwIP/src/include/compat/stdc -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"LWIP/App/lwip.d" -MT"LWIP/App/lwip.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "LWIP/App/lwip.o"
arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F767xx -c -I../Core/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Drivers/BSP/Components/lan8742 -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/apps/http -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/compat/posix -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/net -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/sys -I../Middlewares/Third_Party/LwIP/src/include/compat/stdc -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"
arm-none-eabi-gcc "../Core/Src/syscalls.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F767xx -c -I../Core/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Drivers/BSP/Components/lan8742 -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/apps/http -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/compat/posix -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/net -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/sys -I../Middlewares/Third_Party/LwIP/src/include/compat/stdc -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/syscalls.d" -MT"Core/Src/syscalls.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Core/Src/syscalls.o"
arm-none-eabi-gcc "../Core/Src/sysmem.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F767xx -c -I../Core/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Drivers/BSP/Components/lan8742 -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/apps/http -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/compat/posix -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/net -I../Middlewares/Third_Party/LwIP/src/include/compat/posix/sys -I../Middlewares/Third_Party/LwIP/src/include/compat/stdc -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/sysmem.d" -MT"Core/Src/sysmem.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Core/Src/sysmem.o"
../Core/Src/main.c: In function 'main':
../Core/Src/main.c:92:3: warning: implicit declaration of function 'http_server_init' [-Wimplicit-function-declaration]
   92 |   http_server_init();
      |   ^~~~~~~~~~~~~~~~
arm-none-eabi-gcc -o "ETH_TEST.elf" @"objects.list"   -mcpu=cortex-m7 -T"C:\Users\BLR-PC06\Documents\STM_Program\ETH_TEST\STM32F767ZITX_FLASH.ld" --specs=nosys.specs -Wl,-Map="ETH_TEST.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/main.o: in function `main':
C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../Core/Src/main.c:92: undefined reference to `http_server_init'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../Core/Src/main.c:103: undefined reference to `sys_check_timeouts'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/App/lwip.o: in function `MX_LWIP_Init':
C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/App/lwip.c:80: undefined reference to `lwip_init'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/App/lwip.c:88: undefined reference to `netif_add'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/App/lwip.c:91: undefined reference to `netif_set_default'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/App/lwip.c:94: undefined reference to `netif_set_up'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/App/lwip.c:97: undefined reference to `netif_set_link_callback'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/App/lwip.c:102: undefined reference to `ethernet_input'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `low_level_init':
C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:191: undefined reference to `memp_init_pool'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:226: undefined reference to `netif_set_link_down'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:227: undefined reference to `netif_set_down'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `ethernetif_input':
C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:343: undefined reference to `pbuf_free'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `ethernetif_init':
C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:426: undefined reference to `etharp_output'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `pbuf_free_custom':
C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:436: undefined reference to `memp_free_pool'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `ethernet_link_check_state':
C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:651: undefined reference to `netif_set_down'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:652: undefined reference to `netif_set_link_down'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:690: undefined reference to `netif_set_up'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:691: undefined reference to `netif_set_link_up'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./LWIP/Target/ethernetif.o: in function `HAL_ETH_RxAllocateCallback':
C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:700: undefined reference to `memp_malloc_pool'
C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/BLR-PC06/Documents/STM_Program/ETH_TEST/Debug/../LWIP/Target/ethernetif.c:709: undefined reference to `pbuf_alloced_custom'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:67: ETH_TEST.elf] Error 1
"make -j36 all" terminated with exit code 2. Build might be incomplete.

17:07:30 Build Failed. 21 errors, 1 warnings. (took 2s.256ms)

 

Hello,

 

STM32CubeIDE by default removes the "Middlewares" folder from the compilation, so when you compile the project the compiler returns link errors to the definitions contained in the header files of each library contained in the "Middlewares" folder.

 

To solve this I've done theese steps:

 

- Click on LWIP folder with left mouse button, it will open a menu.

- Select "Properties",

- Go to "C/C++ General",

- Click on "Path and Symbols",

- Click on "Source Locations",

- if there is no "Middleware" folder then add it just by clicking "add folder" button and selecting "Middleware" folder.

-Recompile and all linking errors should be solved.

 

Remember that theese steps must be done for every new project. ( I'm using STM32CubeIDE 1.15.0, i don't know for other versions).

 

I hope that's usefull for you!

 

Best regards,

Gabriele.

Ramachandran1992
Associate III

Hi UserGabriele,

Hope you are doing well, Thanks for the great information, its works fine.