[RSL10 - Knowledge Base]
If you are encountering problems with an application that is currently downloaded and running within Flash memory, it may be desirable to launch a debugging application from RAM, instead of from Flash, so you can retain the code and information that is present to be investigated further. What are the changes required in the default configurations to download and launch firmware from RAM instead of the default location in Flash memory?
To download, launch and debug an application from RAM, the steps below can be followed:
- Build the project that you wish to launch from RAM, and navigate to the ‘Debug Configurations…’ menu by opening the ‘Binaries’ drop-down and right clicking on the
.elffile present in this location. Hover the mouse over the ‘Debug As’ option and select ‘Debug Configurations…’ from the choices.
- Create a new Configuration by right clicking on the ‘GDB SEGGER J-Link Debugging’ option and selecting ‘New Configuration’ from the options listed.
Following the image and setup instructions below, select the matching Configurations options to ensure that the Debugger will download and launch this application from flash memory:
a. Navigate to the ‘Startup’ tab.
b. Check the ‘Initial Reset and Halt’ option box.
c. Check the ‘Enable semihosting’ option box.
d. Check the ‘GDB client’ option box from the ‘Console routed to’ options.
e. Check the ‘RAM application (reload after each reset/restart)’ option box.
f. Uncheck the ‘Pre-run/Restart reset’ option box.
g. Check the ‘Set breakpoint at’ option box and type ‘main’ (or the function name that you application starts execution at) into the textbox.
h. Check the ‘Continue’ option box.
- Apply the settings and close the ‘Debug Configuration’ window. Ensure that the ‘Debug’ launch option is selected on the top navigation bar, and select the ‘Debugging Symbol’ button to download, launch and debug the application in RAM.