old cat
old cat

Reputation: 73

Breakpoint instruction in stm32 will execute infinite with next

I am currently learning with an STM32 microcontroller, and the CPU I’m using is an ARM Cortex-M4. In my code, I’ve added a breakpoint instruction. However, when I use the GDB next command, the program gets stuck.

enter image description here

Upvotes: 2

Views: 167

Answers (1)

gulpr
gulpr

Reputation: 4608

Theere is no exit from bkpt instruction except setting the new pc register value - pc+=2 or pc+=4;

IDEs have this implemented in the step button. If you want to use command line gdb you need to do it manually.

Upvotes: 2

Related Questions