6 years, 6 months ago.

uVision debugging issue with "Call Stack + Locals" and "System and Thread viewer"

/media/uploads/cakehuang/keil_debugging.png Hi Team,

I am debugging mbed-os-example-ble\BLE_Button, the experience is not very good. I found the "Call Stack + Locals" is not updating correctly and "System and Thread viewer"(Debug\OS Support) is not updating at all.

How to solve this?

I am using uVision 5.24.2.0 to debug.

The steps I did to get uVision project file are: $ git clone https://github.com/ARMmbed/mbed-os-example-ble.git $ cd mbed-os-example-ble $ cd BLE_Button $ mbed deploy $ mbed compile -t ARM -m NRF52_DK $ mbed export -i uvision -m NRF52_DK

Thanks/media/uploads/cakehuang/keil_debugging.png

1 Answer

6 years, 6 months ago.

Hi Cake,

The System and Thread Viewer in uVision doesn't have support for RTX5 yet as described here:

http://www.keil.com/support/man/docs/uv4/uv4_db_dbg_systhread_viewer.htm

As Mbed is built on RTX5 you won't be able to use it.

You can however make use of a RTX5 viewer description file and this will give you a custom view you may not have seen before. This is described here:

http://www.keil.com/support/man/docs/uv4/uv4_ca_manage_scvd.htm

From the Manage dialog you will want to add this file:

C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.3.0\CMSIS\RTOS2\RTX\rtx5.scvd

Then when debugging under "View-Watch Windows" you will have a new option "RTX RTOS". Attached is a screen capture of a session we just ran with a ULINKpro with the BLE Button demo. We think this will help!

/media/uploads/RalphF/uv5_rtx_rtos.png

As for the Call Stacks and Locals pane, that isn't revealing much information probably because there isn't much of a call stack to show for those threads. Please contact Keil support if you have further questions about these views as they will know their limits/capabilities: http://www.keil.com/support/

-Ralph, Team Mbed

Accepted Answer

Thank you so much for your professional answer.

posted by Tony Huang 22 May 2018

One current solution that I am aware of is Percepio's Tracealyzer: https://percepio.com/tz/keil-rtx5/ The Tracealyzer looks very shiny.

posted by Zachary Havens 24 May 2018