Protocol decoder:arm_itm
Name | ARM Instrumentation Trace Macrocell |
---|---|
Description | Software and non-intrusive execution tracing from ARM processors |
Status | supported |
License | GPLv2+ |
Source code | decoders/arm_itm |
Input | uart |
Output | arm_itm |
Options | addr2line, addr2line_opts, elffile |
This is one of three closely related protocol decoders: arm_tpiu, arm_itm,arm_etmv3.
ARM ITM (Instrumentation Trace Macroblock) allows tracing of software events, and also with the help of DWT (Debug, Watchpoint and Trace) the tracing of exceptions and data watchpoints. It also supports periodic sampling of PC values.
Software trace is implemented by writing to the ITM registers, which then causes the written data to be output through the trace bus. Usual convention is to use 8-bit writes for text data and 16- or 32-bit writes for binary data. The protocol decoder will try to show the written data in appropriate format for each size of write.
ARM ITM protocol
The ARM ITM protocol consists of variable length packets of 1-5 bytes. The first byte of the packet identifies the packet type. Some of the trace data output by ITM actually originates in the DWT unit in the CPU, but this makes no difference to the decoding.
The DWT unit can output periodic PC values. If an .elf file is given, the protocol decoder can resolve these to code locations using arm-none-eabi-addr2line command.
More information on ITM protocol is found in ARM DDI0403: ARMv7-M Architecture Reference Manual, section Debug ITM and DWT packet protocol.