Debugging an RTOS application

1. Connect to your RTOS-enabled target in the same way as you connect to any other target, unless you want to connect to a running target. The Process tab of the Process Control pane has an OS marker to show the current status of the RTOS.

2. Load your multithreaded image

image\lamp.gifYou must compile your application with debug symbols enabled so that RealView Debugger can determine the location of the data structures that it requires for Halted System Debug (HSD). If you are working in Running System Debug (RSD) mode this might not be necessary.

The RTOS features of the debugger are not enabled until the RTOS is located on your target, and this might mean that you must run the image startup code. See your RTOS documentation for more details.

3. Click image\go.gif in the toolbar to start execution. RSD is activated if it is enabled.

As soon as the RTOS is located, you can see:

You can only view registers or variables for a stopped thread. In HSD mode, you must stop the processor, but in RSD mode you can stop a single thread or group of threads.

If you are using a single unattached Code window to monitor your debugging session, regardless of the number of threads, RealView Debugger displays information related to the current thread in that Code window.

image\lamp.gifYou can view any number of threads at the same time by attaching each one to a Code window.

The menu option Attach Window to a Thread is checkmarked (image\tickopt.gif) if the window is attached. The attachment can be seen in the title bar of the window, and it is not necessarily to the current thread.