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

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

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

Jump to solution
791 Views
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 Kudos
1 Solution
690 Views
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

View solution in original post

1 Reply
691 Views
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