Defining a counting watchpoint – Freescale Semiconductor Microcontrollers User Manual

Page 176

Advertising
background image

Control Points

Setting Watchpoints

176

Microcontrollers Debugger Manual

Using the Left Mouse Button and Pressing the B Key:

1. Point at a variable in the Data window, hold down the left mouse button and press the

B key.

2. A read/write access watchpoint is defined for the selected variable.

Once a read/write access watchpoint has been defined, you can continue program
execution. The application stops after the next read or write access on the variable. Read/
write access watchpoints remain active until they are disabled or deleted.

Defining a Counting Watchpoint

A counter can be associated with any type of watchpoint (read, write, read/write).

The Debugger provides two ways to define a counting watchpoint:

Using the Data Context Menu:

1. Point at a variable in the Data window and right-click. The Data Context Menu is

displayed.

2. Choose Set Watchpoint from the Context Menu. A Read/Write Watchpoint is

defined.

3. Point in the Data Component Window and right-click. The Source Context Menu is

displayed.

4. Choose Show WatchPoints from the Context Menu. The Controlpoints Configuration

window Watchpoints tab is displayed.

5. Select the watchpoint you want to define as a counting watchpoint.

6. From the list menu, select the type of access you want to track.

7. In the interval field, specify the interval count for the watchpoint.

8. Close the window by clicking OK. A counting watchpoint is defined for the selected

variable.

Using the Left Mouse Button and Pressing the S Key:

1. Point at a variable in the Data window, hold down the left mouse button and press the

S key. The Watchpoints tab of the Controlpoints Configuration window is displayed.

2. Select the watchpoint you want to define as a counting watchpoint from the list.

3. From the list menu, select the type of access you want to track.

4. In the interval field, specify the interval count for the watchpoint. Close the window by

clicking OK. A counting watchpoint is defined for the selected variable.

If you continue program execution, the Current field is decremented each time an
appropriate access on the variable is detected. When Current is equal to 0, the application

Advertising