cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX V5.2 & FreeRTOS queries

dave.W
Associate II

Hi,

I have problems generating code in V5.2.0 of STM32CubeMX for 'Other Toolchains (GPDSC)'. If I configure FreeRTOS the cmsis_os file references do not appear in the generated .gpdsc file.

I am configuring an STM32L432KC Nucleo board for testing and the only change from the default board configuration is that I am enabling FreeRTOS and setting the Timebase source to something other than SysTick.

Reverting to V5.1.0 and following the same configuration the following lines are generated in the .gpdsc file:

    <file category="source" condition="" name="Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c"/>

    <file category="header" condition="" name="Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.h"/>

The project now builds almost as expected based on older projects, however versions previous to 5.1 placed generated code for freertos initialization in freertos.c with a call to MX_FREERTOS_Init(); in main. The generated code now appears to pace the freertos code directly in main() in main.c.

Is there a specific configuration step I am missing to keep the FreeRTOS configuration in its own init() function?

8 REPLIES 8
Khouloud ZEMMELI
ST Employee

​Hello @dave.W​ ,

This is reported internally for further check.

Best Regards,

Khouloud.

Thanks Khouloud Zemmeli

Regards,

Dave.

​@dave.W​  could you please share your ioc file ?

Thanks,

Khouloud.

Khouloud ZEMMELI
ST Employee

​Can't reproduce the second point : "The generated code now appears to pace the freertos code directly in main() in main.c."

Khouloud.

Hi,

Example IOC attached.

​The first Point will be fixed in the next CubeMX release.

Best Regards,

Khouloud.

Thanks Khouloud,

Regards,

Dave.

Hi Khouloud,

2nd point I think is repeatable in older versions as well, however it may not be an issue, just my understanding.. I was expecting the FreeRTOS initialization to be in a MX_FREERTOS_Init() function, as per the peripherals initialization ( e.g.  MX_GPIO_Init(); MX_USART2_UART_Init();) However on further investigation I note that this is handled differently.  

  

 The peripheral functions , e.g. MX_GPIO_Init() and MX_USART2_UART_Init() are created regardless of the state of the 'Generate peripheral initialization as a pair of '.c/.h' files per peripheral.' option. It is only the location of the function that changes, whereas the MX_FREERTOS_Init() is ONLY created if this option is selected

 Regards,

Dave.