Keil Logo

Trace Data (Cortex-M)

The Trace Data window shows the trace history for Cortex-M devices only. Tracing has to be enabled in order to view the data. (For devices that are not based on Cortex-M processors refer to Instruction Trace.)

Trace Data button Use the toolbar button or the menu View - Trace - Trace Data to open this window.

Instruction Trace Window

Column Description

Column Name Description
Time Shows the timestamp of the record and can be preceded by the following letters:
  • O - The overflow flag indicates that data were lost in the previous trace record because the Cortex-M hardware could not send the requested event information fast enough.
  • D - The delayed flag indicates that the time value shows a later timestamp than that of the actual event.
  • The O and D flags may occur on the same line.

This column can also show the time difference of a record relative to a Time Reference record. Use Set Time Reference of the Context menu to specify the record. Then, the column can contain additional characters:
  • 0.000 000 000 s - Indicates the record to which the Time Reference has been set.
  • - - Indicates the time difference of an instruction that was executed ahead of the Time Reference instruction.
  • + - Indicates the time difference of an instruction that was executed after the Time Reference instruction.
Address / Port Shows the memory address or stimulus port. The value can be preceded by the following letters:
  • P - indicates the stimulus port number. Activate the ports in ITM Stimulus Ports.
  • R - indicates a read-access.
  • W - indicates a write-access.
  • X - indicates an executable instruction.
Instruction / Data Can show the following information:
  • The assembler instruction.
  • Value written to a port.
  • Value written to or read from data memory.
  • Event Counter type.
  • Exception type and exception number.
Src Code / Trigger Address Shows the source code or the address that triggered a data memory access.
Function Shows the function name to which the instruction belongs. Function names are displayed in black at function entry, otherwise in gray. Enable or disable this column through the Context menu Show Functions.
Record Details Shows record specific information at the bottom of the table. Show or hide this field through the Context menu Show Record Details.

Toolbar Items

Trace Data Toolbar

Toolbar Item Description
Display ... Is a filter to select records of a specific type. The filter items depend on the trace configuration. Unlimited Trace uses a reduced list of options.
  • All - Shows all captured records. When Unlimited Trace has been enabled, the window shows only ETM Instruction Trace data. However, the system still records all trace events.
  • ETM - Code Exec - Shows all executed instructions.
  • ETM - Code Exec Hll - Shows all high-level source code instructions.
  • ITM - All - Shows all events recorded by the Instrumentation Trace Macrocell.
  • ITM - SW Stimuli - Shows all events that write to a ITM Stimulus Port.
  • ITM - Event Counters - Shows all Event Counters that have been enabled.
  • ITM - Exceptions - Shows all Exception Trace records.
  • ITM - PC Samples - Shows all PC Sample events.
  • ITM - Data Read - Shows all read-access events.
  • ITM - Data Write - Shows all write-access events.
  • ITM - Data Read/Write - Shows all read- and write-access events.
Reload/Refresh
Refresh Trace
Refreshes the screen and reloads the data buffer.
Save
Save
Saves the filtered data into a comma-separated-values (*.csv) file. This functionality corresponds to the Save... option of the Context menu.

Save Data Trace
  • File name - specifies the file for saving the records. An absolute path must be entered.
  • Button next to the File name drop-down list - opens the Explorer.
  • What - specifies the data selection.
    • Current Selection - stores the selected records.
    • Current Display - stores the currently displayed records, covering a time range of about 10ms. For Unlimited Trace only.
    • Available Data - stores all recorded data.
  • Button next to the What drop-down list - sets a time interval. Can be used for fine-tunig.

    Set Time Interval

    • From .. To - timestamp interval of the saved data. When Set Time Reference is active, this option allows using time differences. Any range entered will be displayed in the What drop-down list.
  • Files - maximum number of files that should be used for saving records. The file names have the form: File name_number.csv.
  • Records per file - maximum number of records to be stored in each file.
  • Disk space - total amount of disk space (in MB) allowed to be consumed by all files. A warning is displayed as soon as the total amout is reached and not all records could be saved.

Note

  • The stored values are separated by a comma.
Clear
Clear
Empties the data buffer and clears the window cells. This button is disabled for unlimited trace.
Go To Selection
GoTo
Jump to the Selected Record.
Find .. in ..
Find
Is a search function to find records that correspond to the entered pattern and the filter in use. When multiple records have been selected, the search is limited to the highlighted records. Wild-cards are not supported in the search string. This functionality corresponds to the Find... option of the Context menu.

Context Menu Items

Empties the data buffer and clears the window cells. This button is disabled for unlimited trace

Context Menu Item Short Key Description
Show Functions   Shows or hides the column Function.
Show Record Description   Shows or hides the Record Details field.
Go to Disassembly / Source Code Double click the record Positions the cursor to the assembler and source code line that corresponds to the instruction.
Copy Selection Ctrl+C Copies the current selection to the clipboard.
Copy Cell   Copies the cell content to the clipboard.
Set Time Reference Ctrl+F4 Sets the Time Reference record and displays 0.000 000 000s in the Time column. Timestamps of other records are shown as delta values. The Time Reference record is highlighted.
Clear Time Reference Ctrl+Shift+F4 Clears the Time Reference. Actual timestamp values are displayed in the Time column.
Go To Time Reference F4 Jumps to the Time Reference record. A warning is displayed when the Time Reference record is outside of the data buffer.
Insert / Remove Bookmark Ctrl+F2 Bookmarks the record.
Go To Next Bookmark F2 Jumps to the next bookmark.
Go To Previous Bookmark Shift+F2 Jumps to the previous bookmark.
Clear All Bookmarks Ctrl+Shift+F2 Removes all bookmarks.
Find Ctrl+F Opens a search dialog to find patterns in the data buffer.
Save Ctrl+S Opens a dialog to enter criteria for saving the data. This option corresponds to the Save option in the toolbar.
Clear Window   Empties the data buffer and clears the window cells. This menu is disabled for unlimited trace.

Working with the Trace Data Window

  • Halt debugging to refresh the screen content.
  • Tracepoints that trigger a data stream HALT, SUSPEND, or RUN are marked in the window. It is possible to search for these keywords.
  • Double-click any row to jump to the source code and disassembly line that corresponds to the instruction.
  • Press navigation keys for scrolling within the records.
  • Create a compact selection.
    • Click on a record.
    • Press Shift+Left-Mouse-Button on another record.
    The selected records get highlighted in blue.
  • Add or remove a single record from a selection.
    • Press Ctrl+Left-Mouse-Button on a highlighted record. The record is removed from the selection.
    • Press Ctrl+Left-Mouse-Button on a non-highlighted record. The record is added to the selection.

Navigation and Navigation Keys

  • Use the Trace Navigation window to scroll through the records.
  • UP- and DOWN keys - scroll through the records.
  • PAGE-UP and PAGE-DOWN keys - scroll entire record pages.
  • HOME key - jumps to the first record in the table.
  • END key - jumps to the last record in the table.
  • ENTER - highlights the disassembly and source code line (identical to double-clicking a record).

See also:

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.