Skip to main content

How can a trace recording be saved for offline analysis? - Knowledgebase / TRACE32 PowerView - Lauterbach Support

How can a trace recording be saved for offline analysis?

Authors list

First, save the trace recording data using the Trace.SAVE command:

Trace.SAVE <trace_file>.ad

By default, this saves the complete trace recording to the specified file.

To save only a specific range of trace records, specify the record number range. For example:

Trace.SAVE mytracedata (-107032.)--(-21243.)

Here, only the trace records within the specified range are saved.

Method 1: Method 1: Analyze the data in TRACE32 Simulator

Yes, a previously saved trace recording can be loaded and analyzed using the TRACE32 Instruction Set Simulator, without requiring any TRACE32 trace hardware. The TRACE32 Simulator is a software-only product and can be used independently of Lauterbach hardware.

For instructions on how to start TRACE32 in Simulator mode, please refer to the FAQ: How can I start TRACE32 in Simulator Mode?

Loading a Saved Trace File (*.ad)

If the trace recording was saved using the Trace.SAVE command (resulting in a .ad file), follow these steps to load it into the Simulator:

  • Start the TRACE32 Simulator for your target processor architecture.

  • Select the target CPU, either:

    • Using the command SYStem.CPU

    • Or via the menu: CPU > System Settings... → click the CPU button.

  • Switch to “Up” mode:

    • Command: SYStem.Up

    • Or via the Up radio button in the SYStem window.

  • Load the trace file:

    • Trace.LOAD <filename>.ad

    • Or use the menu: Trace > Load Reference Data...

  • Load the program symbols and debug information, e.g.: Data.LOAD.Elf mydemo.elf

  • If a target operating system is used, load the OS awareness using the TASK.CONFIG command, example: TASK.CONFIG ~~/demo/arm/kernel/freertos/freertos.t32

    Depending on the operating system, additional configuration may be required. Refer to the appropriate TRACE32 OS-awareness documentation for details.

  • Display the trace contents, e.g. using the Trace.List command.

Note: Loading a Raw Trace Data

The TRACE32 Simulator also supports loading and decoding raw trace recordings for selected processor architectures. Refer for more information to description of the LA.IMPORT command group in the General Commands Reference Guide L.

Loading raw trace recordings in the Simulator requires a specific license. Please refer to the article: TRACE32 Simulator License.

Method 2: Export the displayed data to a text file

If you only need a textual representation of the trace contents, you can export the trace data in ASCII format using:

Trace.EXPORT.ASCII filename.txt

Alternatively, you can export the contents of a TRACE32 window to a file using the WinPrint command. For more information, refer to the article How can I save the contents of a TRACE32 window to a file?

Method 3: Export to other formats

The Trace.EXPORT command group provides additional commands for exporting trace data in different formats. For example:

Trace.EXPORT.CSVFunc myfunc.csv
Trace.EXPORT.cycles mytracedata.ad

For more information, refer to the documentation of the Trace.EXPORT command group in the General Commands Reference Guide T


Helpful Unhelpful

2 of 2 people found this page helpful

Add a comment

ID-0
To prove you are a human, please tell us the text you see in the CAPTCHA image