Cortex-Debug and code in sram issues and solution

Hi Guys,

I thought I would post this here so no one else had to go through the same head scratching experience.

Stepping over code and breakpoints were causing some serious issues, this seems to be because openocd is using software breakpoints for sram. There is some intermittent issue between cortex-debug and openocd where these software breakpoints are not cleared correctly and it will just loop around triggering the breakpoint forever.

To get around this add "gdb_breakpoint_override hard" to the config json for cortex-debug:

 "openOCDLaunchCommands": [
        "init",
        "reset init",
        "gdb_breakpoint_override hard"
      ],
4 Likes