Skip to main content

IAR Embedded Workbench for Arm 9.70.x

Trace data collection using breakpoints

In this section:

A convenient way to collect trace data between two execution points is to start and stop the data collection using dedicated breakpoints.

Choose between these alternatives:

  • In the editor or Disassembly window, position your insertion point, right-click, and toggle a Trace Start Trigger or Trace Stop Trigger breakpoint from the context menu.

  • In the Breakpoints window, choose New Breakpoint>Trace Start Trigger, Trace Stop Trigger, or Trace Filter from the context menu.

  • The C-SPY system macros __setTraceStartBreak and __setTraceStopBreak can also be used.

For more information about these breakpoints, see Trace Start Trigger breakpoint dialog box and Trace Stop Trigger breakpoint dialog box, respectively.

Using the trace triggers and trace filters:
  1. Use the Trace Start Trigger dialog box to set a start condition—a start trigger—to start collecting trace data.

  2. Use the Trace Stop Trigger dialog box to set a stop condition—a stop trigger—to stop collecting trace data.

  3. Optionally, set additional conditions for the trace data collection to continue. Then set one or more trace filters, using the Trace Filter dialog box.

  4. If needed, set additional trace start or trace stop conditions.

  5. Enable the Trace window and start the execution.

  6. Stop the execution.

  7. You can view the trace data in the Trace window, and also in browse mode in the Disassembly window, where the trace marks for your trace triggers and trace filters are also visible.

  8. If you have set a trace filter, the trace data collection is performed while the condition is true plus some further instructions. When viewing the trace data and looking for a certain data access, remember that the access took place one instruction earlier.