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:
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.