Debugging through a bootloader
One of the examples provided as part of the RDB1768 example suite is a USB secondary bootloader.
Trying to debug through such a bootloader and into the main application always makes life "interesting". The problem is getting the correct set of debug symbols loaded into the debugger for the image that you want to debug.
Here is a simple workflow that can be used when you need to debug the main application...
- Ensure that both the bootloader image and the application image that you want to debug are loaded into the flash.
- Now select the bootloader project and click on debug to start up the debug connection.
- When you hit the breakpoint on main in the bootloader project, select the Console view and in the drop down console selector, pick the "arm-none-eabi-gdb" (Code Red IDE v4) or "gdb" (Code Red IDE v5) entry.
- Now enter the following command....
symbol F:/_workspaces/RDB1768cmsis_AudioMeter_64k/Debug/RDB1768cmsis_AudioMeter_64k.axfReplace the filename above with the filename of the application you want to carry out source level debugging of. Note that you need to use unix style directory separators ("/"), rather than Windows ones ("\").
- Now click on the Resume icon in the Debug view. The bootloader should run and then begin execution of your application image. When you click on the Suspend icon, you should find that you have access to your source level debug information as required.