cancel
Showing results for 
Search instead for 
Did you mean: 

New regression between FreeRTOS and newlib with CubeIDE 1.13.0 build 17399_20230707_0829 on Win x64

KHors.1
Associate II

STM32CubeIDE version is 1.13.0 build 17399_20230707_0829 on Win x64.

Create a project for a Nucleo 64 STM32L452RE board

Include FreeRTOS in your STM32CubeIDE project.

In the project manager Check "Enable multi-threaded support", and select the default Thread-safe Locking Strategy.

Put a simple printf into the default task:

void StartDefaultTask(void *argument)
{
/* USER CODE BEGIN StartDefaultTask */
/* Infinite loop */
printf("Hello World\n");
for(;;)
{
osDelay(1);
}
/* USER CODE END StartDefaultTask */
}

The task will end up in an endless loop in 

void Error_Handler(void)

Stack trace is as follows:

KHors1_0-1689943786446.png

 

void __retarget_lock_acquire_recursive(_LOCK_T lock)
is being called with lock = 0, thus
entering Error_Handler(), and getting stuck there.

I did not observe this kind of behavior with the previous CubeIDE 1.12.x.

The firmware package was the same with both CudeIDE version at STM32CubeL4 Firmware package
version 1.18.0.

Obviously newlib is missing something here in the new toolchain which comes with CubeIDE V1.13.0

Please advise.
Thanks.

 

1 ACCEPTED SOLUTION
3 REPLIES 3

Jupp, that is the one. Thanks.

KHors.1
Associate II

The most recent version 1.13.of CubeIDE solves the issue. Upgrading your CubeIDE to that version does the trick