Debugging programs running from QSPI with OpenOCD

Hi there

Is there a way to use OpenOCD to debug the patch_sm when the bootloader is already present in the flash? i.e. Can I debug programs running from the QSPI flash (or SRAM)?

I can debug programs running from the main flash no problem.

Anyone doing this?


You should be able to debug with the same launch.json configuration when running the program with BOOT_SRAM as the app type. This does require that you program the file into the daisy first (using any of the available update methods). Once it’s there, the launch.json will connect to the program and restart it.

There can be some issues with breakpoints skipping around that can be resolved by adding gdb_breakpoint_override hard to the list of openOCDLaunchCommands in the launch.json file.

Hope that helps!

1 Like

Thanks, I’ll give it a shot!