cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX version 6.4.0 generates code with missing REENT.H file

Rajeev Arora
Senior
 
1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

8 REPLIES 8
Rajeev Arora
Senior

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

Hello @Rajeev Arora​ ,

Thank you for your post,

Could you please share your ioc file to be able to check the problem?

Thanks, Khouloud

Got it, thanks for the share :)

I'll check it then I'll get back to you.

Khouloud

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

Dear @Khouloud ZEMMELI​ ,

I am having the exact same problem and I would appreciate any help on how to disable the USE_NEWLIB_REENTRANT parameter.

I am using MDK-ARM.

Thank you.

Actually I figured out where the setting is on CubeMX.

Thank you so much for your explanation up there.

Regards.

JGile
Associate II

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

Thank you for your advice, it really helped me:folded_hands: