ARM: RTXv5 reports error "osRtxErrorStackUnderflow"
Information in this knowledgebase article applies to:
When using RTXv5, an implementation of CMSIS RTOSv2 API, my application throws the following error:
before entering into an endless loop in the function osRtxErrorNotify().
What could be causing this issue?
Likely, the stack of a thread was not allocating enough memory, before the thread started executing.
To find out which thread requires more resources, select the Source component variant for RTXv5, from the Manage Run-Time Environment dialog.
After bringing in the RTXv5 source, in editor mode, go to the definition of the function osRtxThreadStackCheck(). Set a breakpoint at the call to osRtxErrorNotify(). Users can do this at optimization level 0. In debug mode, a custom Component Viewer dialog called RTX RTOS (View => Watch Windows => RTX RTOS) displays the status of all v2 threads. After running to the breakpoint, find the active thread. Exit debug mode, and increase the thread's stack size.
The following Discussion Forum threads may provide information related to this topic.
Last Reviewed: Tuesday, April 4, 2017
of your data.