Skip to main content

IAR Embedded Workbench for RX 5.20

Introduction to using trace

In this section:

See also:

Reasons for using trace

By using trace, you can inspect the program flow up to a specific state, for instance an application crash, and use the trace data to locate the origin of the problem. Trace data can be useful for locating programming errors that have irregular symptoms and occur sporadically.

Briefly about trace

To use trace in C-SPY requires that your target system can generate trace data. Once generated, C-SPY can collect it and you can visualize and analyze the data in various windows and dialog boxes.

Depending on your target system, different types of trace data can be generated.

Trace data is a continuously collected sequence of every executed instruction for a selected portion of the execution.

Trace features in C-SPY

In C-SPY, you can use the trace-related windows—Trace, Function Trace, Timeline, and Find in Trace.

Depending on your C-SPY driver, you:

  • Can set various types of trace breakpoints to control the collection of trace data.

  • Have access to windows such as the Power Log, Interrupt Log, Interrupt Log Summary, Data Log, and Data Log Summary.

In addition, several other features in C-SPY also use trace data, features such as Profiling, Code coverage, and Instruction profiling.

Requirements for using trace

The C-SPY simulator supports trace-related functionality, and there are no specific requirements.

To use trace in your hardware debugger systems, you need debug components (hardware, in some cases a debug probe, and a C-SPY driver) that all support trace. All C-SPY hardware debugger drivers support trace.

Note

The specific set of debug components you are using (hardware, a debug probe, and a C-SPY driver) determine which trace features in C-SPY that are supported.