Skip to main content
IZ.Mani
Visitor II
May 26, 2023
Question

[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.

  • May 26, 2023
  • 1 reply
  • 1296 views

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

Amogh
Associate II
July 5, 2024

Hey!
did you ever figure out the issue?