Setting a breakpoint halts the system

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Setting a breakpoint halts the system

1,278 次查看
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 项奖励
回复
2 回复数

1,260 次查看
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 项奖励
回复

1,270 次查看
ErichStyger
Specialist I

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 项奖励
回复