Setting a breakpoint halts the system

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting a breakpoint halts the system

563 Views
Daan
Contributor III

Hi,

Whenever my system is running (RT1064 core) and I want to set a breakpoint in runtime, the system halts for a few seconds, after this, normal operation is continued, however, the system has become useless, since other CAN devices missed the heartbeat of the controller. Isn't there a way to set and remove breakpoints transparently?

Cheers,

Daan

0 Kudos
2 Replies

545 Views
Daan
Contributor III

Okay, thank you Erich, I got it. Unfortunately our code is too big to fit in RAM only, so that's not an option, we'll just have to deal with it...

Daan

0 Kudos

555 Views
ErichStyger
Senior Contributor V

Hi Daan,

How breakpoints are set, depends on your debug probe technology. For example the SEGGER J-Link is very fast and is able to reprogram the flash page with a software breakpoint. However, this kind of things requires the target to be halted, programming the flash and then continue.

The other way is to use hardware breakpoints: but this still requires the target to be halted afik.

For an explanation how breakpoints work, see https://mcuoneclipse.com/2012/07/29/software-and-hardware-breakpoints/

The only way to get around this is that the debugger is only able to read/write the RAM memory while the target is running, using some bus free cycles. So you would only be able to do this if your code is running in RAM instead of FLASH.

I hope this helps,

Erich

0 Kudos