Expand description
itm
A decoder for the ITM and DWT packet protocol as specifed in the ARMv7-M architecture reference manual, Appendix D4. Any references in this code base refers to this document.
Aside from covering the entirety of the protocol, this crate offers
two iterators which reads data from the given Read
instance:
-
Singles
, which decodes each packet in the stream in sequence, yieldingTracePacket
s. -
Timestamps
, which continuously decodes packets from the stream until a local timestamp is encountered, yielding aTimestampedTracePackets
, which contains a timestamp relative to target reset of when the packets where generated target-side.
Usage is simple:
use itm::{Decoder, DecoderOptions};
// or a std::fs::File, or anything else that implements std::io::Read
let stream: &[u8] = &[
// ...
];
let mut decoder = Decoder::<&[u8]>::new(stream, DecoderOptions { ignore_eof: false });
for packet in decoder.singles() {
// ...
}
Re-exports
pub use iter::LocalTimestampOptions;
Modules
Structs
ITM/DWT packet protocol decoder.
Decoder
configuration.Iterator that yield
TracePacket
.A set of timestamped
TracePacket
s.Iterator that yield
TimestampedTracePackets
.Timestamps
configuration.Enums
Set of errors that can occur during decode.
Denotes the action taken by the processor by a given exception. (Table D4-6)
Set of malformed
TracePacket
s that can occur during decode.Denotes the type of memory access.
Timestamp relative to trace clock start with quality
descriptions. In order of decreasing quality:
Indicates the relationship between the generation of the local
timestamp packet and the corresponding ITM or DWT data packet.
(Appendix D4.2.4)
The set of valid packet types that can be decoded.