How to monitor CMSIS_RTOS_RTX stack size?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello
I have problem with application using ETH_LWIP in RTOS mode (CMSIS_RTOS_RTX)
In a random intervall application crashes and ends in os_error function with error_code = OS_ERROR_STACK_OVF.

I switched on all RTOS debuging options:
- Enable stack overflow checking
- Enable stack usage watermark
- Enable thread debugging messages

But I do not know where it is possible to monitor actual used RTOS stack task size and status to help me find the problem.
There is mentioned "System and Thread Viewer", but I cannot find it.
0 Likes
3 Replies
Not applicable
Hi,

This is not available in the DAVE IDE and supported in the ARM Keil toolchain. You may refer to their website for more information.
http://www.keil.com/support/man/docs/uv4/uv4_db_dbg_systhread_viewer.htm

Regards,
Daryl
0 Likes
Not applicable
Hello.
And the "System and Thread Viewer" is possible to use with DAVE projects?
It is necessary to download a install entire MDK-ARM development system?

Or I have to convert the DAVE project to Keil development system?


Anyway meantime I found out, that Thread Id which enter "os_error".
It is none of thread created in my application myself, so probably something from lwip stack.
So I know the id of offending thread and something like mp_tcb+116. It is possible to use it for analysis?
I tried to increase "TCIP tast stack size" to 2014 and "default thread stack size" in RTOS to 1024 without any success.
0 Likes
Not applicable
Hi,

Yes, System and Thread viewer is only supported in Keil-MDK environment. To migrate your project to the Keil-MDK, you can enable the gpdsc option in the DAVE CE preferences.

DAVE generates code that can be debugged with µVision. To exchange project data with µVision, DAVE is capable of creating Generator Package Description Files (GPDSC). These files contain the description of the software components generated by the DAVE project configuration.They will be picked up and included into the µVision project.

Here's how you can prepare DAVE to generate the GPDSC file. You need to configure DAVE to create a GPDSC file when using the Generate Code button.
1. Click on Window – Preferences
2. Click on Dave – DAVE CE Preferences
3. Select Generate gpdsc file

[Reference: http://www.keil.com/appnotes/files/apnt_258.pdf]

Regards,
Daryl
0 Likes