cancel
Showing results for 
Search instead for 
Did you mean: 

[BUG] CubeIDE doesn't initialize the tasks after osKernelInitialize() in the main file. No user code space is useable between oskernelinitialize and oskernelstart.it gets deleted after each code generation.

IZ.Mani
Associate

HI,

I am using STM32F429IGT6 with freeRTOS in CMSIS osV2. CubeIDE V1.11.0 with MCU package F4 1.27.1.

After code generation, cubeIDE doesn't initialize the tasks and it has to be manually added. But bigger problem is, user code space can't be used between kernelinitialize and kernalStart. it gets deleted after each code generation.

for example,  blink01Handle and  blink02Handle will get deleted after each code generation.

 /* Init scheduler */

 osKernelInitialize();

/* USER CODE BEGIN Header */

 blink01Handle = osThreadNew(Startblink01, NULL, &blink01_attributes);

 blink02Handle = osThreadNew(Startblink02, NULL, &blink02_attributes);

/**

 ******************************************************************************

 * @file      : main.c

 * @brief     : Main program body

 ******************************************************************************

 * @attention

 *

 * Copyright (c) 2023 STMicroelectronics.

 * All rights reserved.

 *

 * This software is licensed under terms that can be found in the LICENSE file

 * in the root directory of this software component.

 * If no LICENSE file comes with this software, it is provided AS-IS.

 *

 ******************************************************************************

 */

/* USER CODE END Header */

/**

* @}

*/

/**

* @}

*/

 /* Start scheduler */

 osKernelStart();

1 REPLY 1
Amogh
Associate III

Hey!
did you ever figure out the issue?