Skip to main content

IAR Embedded Workbench for Arm 9.70.x

Getting started with MTB trace

In this section:
  1. Before you start C-SPY, use one of these alternatives to configure the MTB trace buffer:

    • Define an array in RAM called __mtb_trace_buffer in your application, which the debugger will use as the trace buffer.

    • Define the two symbols MTB_TRACE_BUFFER$$Base and MTB_TRACE_BUFFER$$Limit in the linker configuration file (.icf). The debugger will use this information as the address and the size of the trace buffer.

    • Let the debugger automatically find some unused RAM space and use that as the trace buffer.

  2. Start C-SPY.

  3. Open the Trace window—available from the driver-specific menu—and click the Activate button to enable collecting trace data.

  4. Start the execution. When the execution stops, for instance because a breakpoint is triggered, trace data is displayed in the Trace window. For more information, see Trace window.