Thursday , 29 June 2017
iten
Home » Programming » Conditional breakpoint while debugging STM32

Conditional breakpoint while debugging STM32

It's a really common situation when working with hardware (especially while debugging asynchronous events): to stop execution while debugging only if a given event occurs. This is also called conditional breakpoint.

If you are working with the STM32 family and the CMSIS ARM package for Cortex-M processors, and your toolchain is GCC-based with GDB as debugger, you can place in your code this instruction:

GDB will automatically stop when the event occurs at that line.

This saved my life. Definitively.


Check Also

How to restore ST-LINK interface after a bad update (2.26.15 firmware)

Several people are reporting me issues with the latest 2.26.16 firmware update for the ST-LINK …

Leave a Reply

Your email address will not be published. Required fields are marked *