Stack Problems

Stack Problems

Home Forums Real-Time Kernels Stack Problems

This topic contains 1 reply, has 2 voices, and was last updated by  Matt Gordon 3 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15332

    Eugenio Aguado
    Participant

    In my current project (running uC/OS-III on a custom STM32-based board), I’m observing some unexpected behavior. My code runs fine for several hours but then it crashes. If I use my debugger to stop execution, the IDE indicates that I’m in an infinite loop in an exception handler named HardFault_Handler. I suspect that I may be experiencing a stack overflow, and I’d like to know how to deal with this issue. I know that uC/OS-III offers stack checking capabilities, but I’m not sure how to use them.

    #15333

    Matt Gordon
    Keymaster

    µC/OS-III offers an API function, OSTaskStkChk(), for checking the amount of free space remaining on a task’s stack. A full description of this function is provided on Micrium’s documentation site. Stack usage can also be monitored via µC/Probe, Micrium’s Graphical Live Watch tool. You’ll find more information on µC/Probe’s stack-related capabilities, and stack overflows in general, in this recent blog post.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

View the complete site map

x
Loading...