From: Thomas D. <tho...@em...> - 2018-02-21 18:36:15
|
Hello, I came around a serious problem regarding openOCD 0.10.0, an ATSAME70 (Cortex M7) board, gdb and breakpoints (incl. single-stepping). The symptoms are, that when I hit a breakpoint in my application, I can't proceed execution of my code, no matter whether I leave the breakpoint active or I remove the breakpoint. Funny enough, in my startup code, breakpoints work rather fine (the core stops, and with a "resume" it continues execution). I finally found out, that openOCD modifies the code in RAM to insert a "breakpoint" instruction, but does not ensure, that any entries in the instruction cache are invalidated. So when the core hits the breakpoint: - it pulls the opcode from external RAM into the instruction cache - it tries executing this instruction - the core stops - openOCD gains control again - openOCD writes the original opcode into external RAM - after a "resume" command, openOCD lets the core execute code again - BUT: The core still finds the breakpoint opcode in the instruction cache and therefore stops again instead of continueing code execution- So my questions are: - has anybody seen the same bahvior? - can anybody verify my thoughts? - is there a known fix for this behavior? - any ideas how to proceed? Kind regards, Thomas. |