Debugging Applications that are Not Stored at the Base Address of Flash
If you want to debug an application that does not start at the first address of the flash memory (0x00100000), adjust your Debug Configuration on the Startup tab. See the RSL15 Getting Started Guide for instructions on how to find this and the appropriate entry for the typical case of starting from the base of flash memory. The following example can be entered into the Run/Restart Commands field to execute an application at any location in memory:
set {int} & VTOR = ISR_Vector_Table
set $sp = *((int *) &ISR_Vector_Table)
set $pc = *((int *) (&ISR_Vector_Table+4))
NOTE: The linker configuration file (sections.ld) must match the start address used in the debug configuration.
NOTE: All user applications must include a vector table, and the vector table must be aligned to a 512-byte boundary.
An example of when you might not want to start from the base address of flash is when you are using a bootloader that would typically be located at the base of flash. This is described in the readme file of the RSL15 sample bootloader application as well as in the RSL15 documentation set.