Watchpoints in IAR

  1. Right-click a variable (global).

  2. Select Set Data Breakpoint for 'myVar' to add it to the active breakpoints.

  3. Go to the list of breakpoints (View –> Breakpoints)

  4. Choose Edit... to set up whether the watchpoint should match on read, write, or any access.

../_images/iar_watchpoint_configure.png

Configuring a hardware watchpoint to break on 8-bit write with value 0x42.