2021-12-06 02:31 AM
2021-12-07 12:49 AM
Hi again @Rajeev Arora ,
Thank you for providing your ioc file, it helped me to reproduce the problem.
Actually, it's a normal behavior, in fact, when USE_NEWLIB_REENTRANT is enabled when using Keil or IAR toolchain, CubeMx project compilation will fail : "cannot open source file "reent.h".
For that, the USE_NEWLIB_REENTRANT parameter must be Disabled with EWARM OR MDK-ARM.
(There's a warning when you generate your project, mentioning the information)
Hope my answer helped you :)
Khouloud
2021-12-06 02:34 AM
Hello @Khouloud ZEMMELI
STM32CubeMX version 6.4.0 generates code with missing REENT.H file when code is generated for MDK-ARM (minimum version V5.32)
compiling freertos.c...
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h(71): error: #5: cannot open source input file "reent.h": No such file or directory
#include <reent.h>
../Core/Src/freertos.c: 0 warnings, 1 error
Please help fix the issue.
Regards,
Rajeev
2021-12-07 12:11 AM
Hello @Rajeev Arora ,
Thank you for your post,
Could you please share your ioc file to be able to check the problem?
Thanks, Khouloud
2021-12-07 12:12 AM
Got it, thanks for the share :)
I'll check it then I'll get back to you.
Khouloud
2021-12-07 12:49 AM
Hi again @Rajeev Arora ,
Thank you for providing your ioc file, it helped me to reproduce the problem.
Actually, it's a normal behavior, in fact, when USE_NEWLIB_REENTRANT is enabled when using Keil or IAR toolchain, CubeMx project compilation will fail : "cannot open source file "reent.h".
For that, the USE_NEWLIB_REENTRANT parameter must be Disabled with EWARM OR MDK-ARM.
(There's a warning when you generate your project, mentioning the information)
Hope my answer helped you :)
Khouloud
2021-12-18 01:03 AM
2021-12-18 01:34 AM
Actually I figured out where the setting is on CubeMX.
Thank you so much for your explanation up there.
Regards.
2022-04-28 01:50 AM
Thank you for your answers above. They really helped. Just to add further clarification on how to disable USE_NEWLIB_REENTRANT .
On Cube MX, Go to Pin out->FREERTOS_M7-Advanced Settings and set USE_NEWLIB_REENTRANT to Disabled
2024-03-28 08:01 PM
Thank you for your advice, it really helped me:folded_hands: