STMCubeMX replace the app_freertos.c. How to avoid
I'm developing an app on the demo board STM32U5A9J-DK
I've created the project from TouchGFX 4.25.0 project STM32U5A9J-DK FreeRTOS
It perfectly works, compile and debug with both TouchGFX and CubeIDE 1.18.1
I then opened the .ioc file of the project with Open CubeMX 6.14.1. It says the project was set up with 6.14.0 and FW_U5 V1.7.0, so I migrated it.
I've updated the Software Packs from X-CUBE-FREERTOS 1.0.0 to 1.3.1. CubeMX says no issue found and upgraded.
Then I generated the code. There, the new code rewrote the app_freertos.c file deleting the initialization of the TouchGFX task
/* Definitions for defaultTask */
osThreadId_t defaultTaskHandle;
const osThreadAttr_t defaultTask_attributes = {
.name = "defaultTask",
.priority = (osPriority_t) osPriorityNormal,
.stack_size = 128 * 4
};
/* Definitions for GUI_Task */
osThreadId_t GUI_TaskHandle;
const osThreadAttr_t GUI_Task_attributes = {
.name = "GUI_Task",
.priority = (osPriority_t) osPriorityNormal,
.stack_size = 8192 * 4
};and the implementations of MX_FREERTOS_Init where it starts the tasks
/* creation of defaultTask */
defaultTaskHandle = osThreadNew(StartDefaultTask, NULL, &defaultTask_attributes);
/* creation of GUI_Task */
GUI_TaskHandle = osThreadNew(TouchGFX_Task, NULL, &GUI_Task_attributes);Is there a way to avoid it?
