Skip to main content
PSmol.1
Associate II
April 23, 2022
Question

Using CubeIDE Debub with FREERTOS gives error in osKernelStart

  • April 23, 2022
  • 10 replies
  • 2654 views

Hello everyone,

I just started messing with FREERTOS and encountered odd behaviour.

When I run my code, everything seems to work. However, when I run debug the osKernelStart() fails.

Any ideas what causes this and how I can fix it?

Addtional info: sometimes restarting the CubeIDE works, but just once.

Thanks!

Peter

This topic has been closed for replies.

10 replies

KnarfB
Super User
April 23, 2022

what is the error?

Pavel A.
April 23, 2022

More details, please. Which STM32, board; which CubeIDE version?

PSmol.1
PSmol.1Author
Associate II
April 24, 2022

I am using CubeIDE version 1.4.2.

In osKernelStart()

 if (IS_IRQ()) {

  stat = osErrorISR;

 }

executes and therefore the scheduler never starts.

The board I am using is the NUCLEO L476RG.

KnarfB
Super User
April 24, 2022

Don't recall the details, but once there were issues with wrong interrupt priorities set by STM32CubeIDE. Try upgrading to the latest version and regenerate all code.

hth

KnarfB

PSmol.1
PSmol.1Author
Associate II
April 24, 2022

Thanks for the hint, I will update CubeIDE (and to be safe) CubeMX to the newest version and report back!

PSmol.1
PSmol.1Author
Associate II
April 27, 2022

First off, thanks so much for all your replys, really apreciate it!

Yes, I am using CMSIS_OS2.

Can it be, that the a breakpoint kind of acts like an interrupt in this case? Just to reiterate, it works when just running the program, only when using debug mode it fails to start the kernel.

Pavel A.
April 29, 2022

You have quite old CubeIDE version. Try 1.7.

Maybe even try the latest 1.9 - though users complain about issues related to debugger in v. 1.9.

If the newer debugger asks to update ST-LINK firmware, try this too.