CubeMX duplicates FreeRTOS task implementations when generating code
Hello!
We have recently updated our STM32CubeIDE to a newer version (1.19.0, from 1.18.0) and we have encountered an issue when using CubeMX. Whenever we launch the code generation some code sections in the file 'app_freertos.c' get duplicated. For example:
/* Definitions for defaultTask */
osThreadId_t defaultTaskHandle;
const osThreadAttr_t defaultTask_attributes = {
.name = "defaultTask",
.priority = (osPriority_t) osPriorityNormal,
.stack_size = 1024 * 4
};
/* Definitions for i2c_Task */
osThreadId_t i2c_TaskHandle;
const osThreadAttr_t i2c_Task_attributes = {
.name = "i2c_Task",
.priority = (osPriority_t) osPriorityAboveNormal,
.stack_size = 512 * 4
};will become:
/* Definitions for defaultTask */
osThreadId_t defaultTaskHandle;
const osThreadAttr_t defaultTask_attributes = {
.name = "defaultTask",
.priority = (osPriority_t) osPriorityNormal,
.stack_size = 1024 * 4
};
/* Definitions for i2c_Task */
osThreadId_t i2c_TaskHandle;
const osThreadAttr_t i2c_Task_attributes = {
.name = "i2c_Task",
.priority = (osPriority_t) osPriorityAboveNormal,
.stack_size = 512 * 4
};
/* Definitions for defaultTask */
osThreadId_t defaultTaskHandle;
const osThreadAttr_t defaultTask_attributes = {
.name = "defaultTask",
.priority = (osPriority_t) osPriorityNormal,
.stack_size = 1024 * 4
};
/* Definitions for i2c_Task */
osThreadId_t i2c_TaskHandle;
const osThreadAttr_t i2c_Task_attributes = {
.name = "i2c_Task",
.priority = (osPriority_t) osPriorityAboveNormal,
.stack_size = 512 * 4
};and the same goes for the assignment of the task handles, as well as for the implementations of the task start functions. Other files like 'main.c' are not affected by this it seems. However I cannot confirm if the above mentioned file is the only one.
We are using a STM32U5G9J-DK2 for our project if this is relevant to the problem.
Is there a way to prevent the code generator from doing this? Our machines are centrally managed and I cannot easily go back to the previous version of the IDE.


