How to halt and resume execution of a program in debugger?

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

How to halt and resume execution of a program in debugger?

跳至解决方案
1,690 次查看
anaseem
Contributor IV
My embedded system is based on LPC11E68 Microcontroller.  
I'm in debugger perspective in MCUXpresso IDE.  I want to setup debugger to stop program execution periodically(say every 5 seconds), display current value of a variable, and then resume program execution. 
Above should occur continuously.
Can above be achieved with a watchpoint?  I setup a watchpoint but it is behaving like a breakpoint.
0 项奖励
回复
1 解答
1,589 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

Hi Amer,

From within the IDE there is no option to automatically force a target pause at a fixed time interval.

For Global Variables, you can monitor and log variables at frequencies from 1/2 to 10 seconds. Please see the Live Variables section in the MCUXpresso IDE User Guide.

For local variables, there is no similar solution due to the architecture of the underlying ARM core.

One approach might be to make use of some Eclipse advanced breakpoint properties. From here you can define and apply an action - such as resume (as shown below):

pastedImage_1.png

This will make the particular breakpoint resume execution once hit.

The next problem is to control when the breakpoint actually gets hit. Here you could force this by only entering the code with the breakpoint at a frequency of your choosing:

for example:

IF (some timed condition) {

      <breakpoint this line with resume>         ; sample local variable value

}

I have tested this using a LinkServer debug probe.

I hope this helps.

Yours,

MCUXpresso IDE Support

在原帖中查看解决方案

1 回复
1,590 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

Hi Amer,

From within the IDE there is no option to automatically force a target pause at a fixed time interval.

For Global Variables, you can monitor and log variables at frequencies from 1/2 to 10 seconds. Please see the Live Variables section in the MCUXpresso IDE User Guide.

For local variables, there is no similar solution due to the architecture of the underlying ARM core.

One approach might be to make use of some Eclipse advanced breakpoint properties. From here you can define and apply an action - such as resume (as shown below):

pastedImage_1.png

This will make the particular breakpoint resume execution once hit.

The next problem is to control when the breakpoint actually gets hit. Here you could force this by only entering the code with the breakpoint at a frequency of your choosing:

for example:

IF (some timed condition) {

      <breakpoint this line with resume>         ; sample local variable value

}

I have tested this using a LinkServer debug probe.

I hope this helps.

Yours,

MCUXpresso IDE Support