Using CubeIDE Debub with FREERTOS gives error in osKernelStart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-23 12:57 PM
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
- Labels:
-
DEBUG
-
FreeRTOS
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-23 2:12 PM
what is the error?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-23 4:00 PM
More details, please. Which STM32, board; which CubeIDE version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-24 4:21 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-24 4:31 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-24 10:37 AM
Thanks for the hint, I will update CubeIDE (and to be safe) CubeMX to the newest version and report back!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-24 2:28 PM
Updated CubeIDE, CubeMX, STLINK, generated code. Problem still there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-24 7:07 PM
Try to understand why IS_IRQ() evaluates to true. It obviously should not.
You're using CMSIS_OS2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-25 6:04 PM
It's the other line of that code for ARMv7-M. :smiling_face_with_smiling_eyes:
And it evaluates to true, when it's called from an interrupt context, which is clearly forbidden for osKernelStart() function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-27 1:22 AM
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.
