cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE includes wrong file for STM32WL33 when RTOS NEWLIB_REENTRANT defined

divmstr
Associate

I am generating code for the STM32WL33 using CUBEIDE 1.17 and am using CMSIS V2. The IOC editor insists (but does not enforce) that NEWLIB_REENTRANT be enabled before generation. When compiling, the file "FreeRTOS.h" erroneously includes "newlib-freertos.h", which does not exist. Other projects I have that use a similar configuration have different content in the same file, including <reent.h>. Is this what it is supposed to be, and do I have the correct version of 'FreeRTOS.h'. This file looks like it is edited during the generation process, so do I have the wrong prototype? The source is below, with the modification it does compile. CubeMX behaves in the same manner.

 

 

/* Required if struct _reent is used. */

#if ( configUSE_NEWLIB_REENTRANT == 1 )

 

#include "newlib-freertos.h" // generated by WL33 IOC

-- OR --

#include <reent.h> // generated by a different project

#endif /* if ( configUSE_NEWLIB_REENTRANT == 1 ) */

Thanks.

 

1 REPLY 1
STTwo-32
ST Employee

Hello @divmstr 

I'm not able to reproduce this behavior on my side (code generated gives no compilation error). Could you please give me the .IOC file used to reproduce this behavior.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.