Categories

{{ selectedCategory.name }}

{{ topic.Title }} {{ topic.Ddate | formatDate }}

{{ topic.Content }}

No topics found!

ARM Cortex-M: How to configure ITM trace?

16-Dec-2022

Possible solution:

It is assumed that debug session is correctly configured and established.

1. Open Hardware menu / CPU Options / SoC page.

2. Select SWD (or JTAG Debug Protocol according to your configuration).

3. Select Parallel (or SWO Trace Capture method according to your configuration). Confirm.

4. Open View menu / Analyzer.

5. Click on the Analyzer Configuration icon in the Analyzer toolbar.

6. Check Manual Trigger/Recorder Configuration and click Configure in the Analyzer Configuration-[Default] / Hardware page. Make sure that only Profiler is checked as well. 

7. Check Enabled in Trigger [Advanced Coverage Trigger] / ITM page.  This enables the ITM settings in the bottom right corner. Close the dialog.

8. Check Data in theAnalyzer Configuration [Default] / Profiler page. Make sure Code, OS objects and Network are left unchecked. 

9. Click New / Trace in the Data Areas section. 

10. Give the ITM trace a  meaningful name in the Description field. 

11. Select ITM from the Location drop-down menu. Write the number of the channel in the field (e.g. "1"), which configures the ITM Channel.

It is possible to write numbers from 0 to 255 as ITM module has 256 stimulus ports where different data can be sent.

Confirm and start New Analyzer session.


More resources:

  • Refer to the tutorial ARM Cortex-M Instrumentation Trace to explore Software Tracing on ARM Cortex-M architecture using the Instrumentation Trace Macrocell (ITM) via two use cases: printf() debugging using GCC/newlib and Function and Data Profiling based on the AUTOSAR application
  • ITM winIDEA Help

Was this answer helpful?

Sorry this article didn't answer your question, we'd love to hear how we can improve it.
Note: This form won't submit a case. We'll just use it to make this article better.

Similar topics

{{ topic.Title }} {{ topic.Ddate | formatDate }}

{{ topic.Content }}

No similar topics found!

Other topics in the same category

{{ topic.Title }} {{ topic.Ddate | formatDate }}

{{ topic.Content }}

No topics found!