2022-03-09 11:13 PM
Processor STM32F746ZGT
Hello,
When I use FreeRTOS (CMSIS_V2) in STM32CubeIDE 1.9.0, I get the prompt when generating code (as in the previous versions):
The USE_NEWLIB_REENTRANT must be set in order to make sure that newlib is fully reentrant. The option will increase the RAM usage. Enable this option under FreeRTOS > Advanced Settings > USE_NEWLIB_REENTRANT
If I perform the requested setting, as I did in the previous versions, the code is generated without any hint. However, when compiling, I get the following error message:
c:\st\stm32cubeide_1.9.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: c:/st/stm32cubeide_1.9.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc.a(lib_a-reent.o):(.bss.errno+0x0): multiple definition of `errno'; ./Middlewares/Third_Party/LwIP/system/OS/sys_arch.o:D:/uni/Microconsult/STM32/CubeIDE/10-lwipDemo/Debug/../Middlewares/Third_Party/LwIP/system/OS/sys_arch.c:45: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:78: 10-lwipDemo.elf] Error 1
Do I need to perform any additional setting on the linker ?
Regards
Ferdinand
Solved! Go to Solution.
2022-03-10 08:13 AM
Hello @fe3 ,
Thanks for your feedback,
I reproduced the issue and I confirm that using LWIP with FreeRTOS generate multiple definition error.
The issue is reported to the dev team to be fixed. I will keep you posted with the updates.
Internal ticket number: 124192 (This is an internal tracking number and is not accessible or usable by customers).
If your issue is solved or reported, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)
Thanks for your contribution,
Sara.
2022-03-09 11:24 PM
I just discovered that the problem arises in connection with RTOS and lwip.
2022-03-10 01:09 AM
2022-03-10 08:13 AM
Hello @fe3 ,
Thanks for your feedback,
I reproduced the issue and I confirm that using LWIP with FreeRTOS generate multiple definition error.
The issue is reported to the dev team to be fixed. I will keep you posted with the updates.
Internal ticket number: 124192 (This is an internal tracking number and is not accessible or usable by customers).
If your issue is solved or reported, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)
Thanks for your contribution,
Sara.
2022-03-23 11:34 AM
That errno should not be there at all! As many things, it is there just because of some fantasies of incompetent developers.
2022-03-24 11:54 PM
Thanks for the notice. I have tested it. If I comment out the definition, the program can be created successfully and it works. The disadvantage is that after each code generation with CubeMX the change has to be done again.
2022-04-29 05:13 AM
If you want to have this change permanent, you can do it at this location C:\Users\xxxxxxx\STM32Cube\Repository\STM32Cube_FW_Fxx_Vx.xx.x\Middlewares\Third_Party\LwIP\system\OS
2022-06-29 03:13 AM
Hello @fe3 , @Piranha , @Bino
This issue is fixed in STM32CubeMX latest release.
V6.6.0 is now available under this Link.
Thanks for your contribution.
Sara.
2022-06-29 11:36 PM
Hello Sara,
Thanks for the information
Ferdinand