2019-05-10 04:22 AM
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?
2019-05-10 05:23 AM
Hello @dave.W ,
This is reported internally for further check.
Best Regards,
Khouloud.
2019-05-10 06:10 AM
Thanks Khouloud Zemmeli
Regards,
Dave.
2019-05-13 02:18 AM
@dave.W could you please share your ioc file ?
Thanks,
Khouloud.
2019-05-13 03:08 AM
Can't reproduce the second point : "The generated code now appears to pace the freertos code directly in main() in main.c."
Khouloud.
2019-05-13 05:07 AM
2019-05-13 05:25 AM
The first Point will be fixed in the next CubeMX release.
Best Regards,
Khouloud.
2019-05-13 05:41 AM
Thanks Khouloud,
Regards,
Dave.
2019-05-13 05:56 AM
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.