{{ }}

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

{{ topic.Content }}

No topics found!

Arm Cortex: ITM Trace limitations via Terminal Window


Printing characters via ITM can result in all the characters not being displayed in the Terminal Window.

For example, here's an ITM message ("\nTEST_12345678") and some possible outputs:


Tracing (observing the Terminal Window falls under this category), is a non-intrusive operation. It should not affect the CPU's behavior in any way. You can see what's happening inside the CPU while it's running, without interrupting its work. However, using breakpoints or manually halting the CPU interferes with its operation and violates the principle of non-intrusiveness.

Flushing data from the CPU to the debugger is device-specific. However, observations suggest these mechanisms often stop when the CPU is halted, preventing the debugger from receiving data. This only occurs when the CPU is stopped, which is why tracing focuses on a running CPU.


The trace buffer needs to be full to automatically flush its contents. To ensure you receive all the data, you can:

  • trigger a flush by printing another message in the Terminal Window or,
  • by adding a dummy character to the end of your current message.

This dummy character should be an ASCII NUL (represented by 0x00 or '\0' in C).

Make sure your application can parse NUL characters correctly. Most printf functions use NUL as the end of a string character.

More resources

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!