Debugging a running system
** WARNING **
There are circumstance where the current mechanism of connecting to a running target described below will not work correctly (a reset will get triggered, and interrupts will not be enabled).
We are investigating improving the mechanism for a future release.
It is possible to debug a running system, without loading an application.
To do this, you will need a project with a valid application (.axf file), although it will not be downloaded. If the image that the target is running matches the image in the project, then debug symbols will be available.
To do this, you can either
- edit an existing Debug Configuration to stop it loading the application, or
- create a new Debug Configuration and stop it loading the application
Create a new Debug Configuration without loading the application
You will need a project that contains a built, valid application for your target. That is the MCU Setting for the project must match your debug target hardware. If you do not have one, you will need to create one.
- Build the project so there is a valid axf file
Select Run->Debug Configurations... from the menu
- Click on C/C++ MCU Configuration and then press the New Launch Configuration button (first button above the list of Debug Configuration types.
On the Main tab ensure the C/C++ Application (.axf file) has a valid file
Switch to the Debugger tab
Scroll the Script values list and locat the entry Load image and set it to false
Now press the Debug button
- This will connect to the debug target, but it will not stop it running.
If necessary, switch to the Debug perspective, or otherwise ensure the Debug view is visible
Stop the target, by pressing the Suspend button on the Debug toolbar. The icon for the Suspend button is two vertical bars, like the Pause button on a CD/DVD player
Edit an existing configuration
If you have an existing Debug Configuration for your target:
- Select the project in Project Explorer
Select Run->Debug Configurations... from the menu
- Select the Debug Configuration for your project
- Follow the instructions above, from entry #4
