debuggingcortex-mlauterbach

Assembly code breakpoint does not work as expected


I am developing a STM32F2 device using GCC 4.7.4 and a Lauterbach Combiprobe JTAG debugger. In my code, I have the following statement to always break at a certain spot for testing purposes:

asm volatile ("BKPT #0");

This is the only breakpoint. When I run the program, I can see that my program reaches the breakpoint, but I cannot step beyond this breakpoint using my JTAG debugger. Instead, I have to move the PC counter past this instruction to get the program to execute.

This was working in the past, but I am at a loss to figure out why the behavior is different now. Any clues or hints would be appreciated.


Solution

  • There are so many broken JTAG debuggers. Probably you installed an update for the JTAG adapter?

    When you have GDB as Debugger you might check if you can add a macro set PC=PC+4 to a button or key. But if this is possible depends on your IDE.