Difference between revisions of "Protocol decoder:Arm itm"

From sigrok
Jump to navigation Jump to search
m (→‎ARM ITM protocol: Copy edited [2].)
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
| license        = GPLv2+
| license        = GPLv2+
| source_code_dir = arm_itm
| source_code_dir = arm_itm
| image          =  
| image          =
| input          = uart
| input          = uart
| output          = arm_itm
| output          = arm_itm
| probes          =  
| probes          =
| optional_probes =  
| optional_probes =
| options        = addr2line, addr2line_opts, elffile
| options        = addr2line, addr2line_opts, elffile
| annotations    = Text
| annotations    = Text
}}
}}


'''This is one of three closely related protocol decoders:''' [[Protocol_decoder:arm_tpiu|arm_tpiu]], [[Protocol_decoder:arm_itm|arm_itm]],[[Protocol_decoder:arm_etmv3|arm_etmv3]].
'''This is one of three closely related protocol decoders:''' [[Protocol_decoder:arm_tpiu|arm_tpiu]], [[Protocol_decoder:arm_itm|arm_itm]], [[Protocol_decoder:arm_etmv3|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.
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.
Software trace is implemented by writing to the ITM registers, which then causes the written data to be output through the trace bus. The 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 an appropriate format for each size of write.


[[File:ARM_ITM.png]]
[[File:ARM_ITM.png]]
Line 27: Line 27:
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 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.
The DWT unit can output periodic PC values. If an .elf file is given, the protocol decoder can resolve these to code locations using the ''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''.
More information on the ITM protocol is found in ''ARM DDI0403: ARMv7-M Architecture Reference Manual, section Debug ITM and DWT packet protocol''.

Latest revision as of 13:35, 28 December 2017

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. The 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 an appropriate format for each size of write.

ARM ITM.png

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 the arm-none-eabi-addr2line command.

More information on the ITM protocol is found in ARM DDI0403: ARMv7-M Architecture Reference Manual, section Debug ITM and DWT packet protocol.