Skip to main content
dave.W
Associate
May 10, 2019
Question

STM32CubeMX V5.2 & FreeRTOS queries

  • May 10, 2019
  • 2 replies
  • 1654 views

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?

This topic has been closed for replies.

2 replies

Khouloud ZEMMELI
ST Employee
May 10, 2019

​Hello @dave.W​ ,

This is reported internally for further check.

Best Regards,

Khouloud.

dave.W
dave.WAuthor
Associate
May 10, 2019

Thanks Khouloud Zemmeli

Regards,

Dave.

Khouloud ZEMMELI
ST Employee
May 13, 2019

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

Thanks,

Khouloud.

Khouloud ZEMMELI
ST Employee
May 13, 2019

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

Khouloud.

dave.W
dave.WAuthor
Associate
May 13, 2019

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.