Enum itm::TracePacket
source · pub enum TracePacket {
Show 14 variants
Sync,
Overflow,
LocalTimestamp1 {
ts: u32,
data_relation: TimestampDataRelation,
},
LocalTimestamp2 {
ts: u8,
},
GlobalTimestamp1 {
ts: u64,
wrap: bool,
clkch: bool,
},
GlobalTimestamp2 {
ts: u64,
},
Extension {
page: u8,
},
Instrumentation {
port: u8,
payload: Vec<u8>,
},
EventCounterWrap {
cyc: bool,
fold: bool,
lsu: bool,
sleep: bool,
exc: bool,
cpi: bool,
},
ExceptionTrace {
exception: VectActive,
action: ExceptionAction,
},
PCSample {
pc: Option<u32>,
},
DataTracePC {
comparator: u8,
pc: u32,
},
DataTraceAddress {
comparator: u8,
data: Vec<u8>,
},
DataTraceValue {
comparator: u8,
access_type: MemoryAccessType,
value: Vec<u8>,
},
}
Expand description
The set of valid packet types that can be decoded.
Variants
Sync
A synchronization packet is a unique pattern in the bitstream. It is identified and used to provide the alignment of other packet bytes in the bitstream. (Appendix D4.2.1)
Overflow
Found in the bitstream if
- Software has written to an ITM stimulus port register when the stimulus port output buffer is full.
- The DWT attempts to generate a hardware source packet when the DWT output buffer is full.
- The local timestamp counter overflows.
See (Appendix D4.2.3).
LocalTimestamp1
Fields
ts: u32
Timestamp value.
data_relation: TimestampDataRelation
Indicates the relationship between the generation of ts
and the corresponding ITM or DWT data packet.
A delta timestamp that measures the interval since the generation of the last local timestamp and its relation to the corresponding ITM/DWT data packets. (Appendix D4.2.4)
LocalTimestamp2
Fields
ts: u8
Timestamp value.
A derivative of LocalTimestamp1
for timestamp values between
1-6. Always synchronous to te associated ITM/DWT data. (Appendix D4.2.4)
GlobalTimestamp1
Fields
ts: u64
Lower-order bits of the timestamp; bits[25:0].
wrap: bool
Set if higher order bits output by the last GTS2 have changed.
clkch: bool
Set if the system has asserted a clock change input to the processor since the last generated global timestamp.
An absolute timestamp based on the global timestamp clock that contain the timestamp’s lower-order bits. (Appendix D4.2.5)
GlobalTimestamp2
Fields
ts: u64
Higher-order bits of the timestamp value; bits[63:26] or bits[47:26] depending on implementation.
An absolute timestamp based on the global timestamp clock that contain the timestamp’s higher-order bits. (Appendix D4.2.5)
Extension
Fields
page: u8
Source port page number.
A packet that provides additional information about the identified source (one of two possible, theoretically). On ARMv7-M this packet is only used to denote on which ITM stimulus port a payload was written. (Appendix D4.2.6)
Instrumentation
Fields
port: u8
Stimulus port number.
Contains the payload written to the ITM stimulus ports.
EventCounterWrap
Fields
cyc: bool
POSTCNT wrap (see Appendix C1, p. 732).
fold: bool
FOLDCNT wrap (see Appendix C1, p. 734).
lsu: bool
LSUCNT wrap (see Appendix C1, p. 734).
sleep: bool
SLEEPCNT wrap (see Appendix C1, p. 734).
exc: bool
EXCCNT wrap (see Appendix C1, p. 734).
cpi: bool
CPICNT wrap (see Appendix C1, p. 734).
One or more event counters have wrapped. (Appendix D4.3.1)
ExceptionTrace
The processor has entered, exit, or returned to an exception. (Appendix D4.3.2)
PCSample
Periodic PC sample. (Appendix D4.3.3)
DataTracePC
Fields
comparator: u8
The comparator number that generated the data.
pc: u32
The PC value for the instruction that caused the successful address comparison.
A DWT comparator matched a PC value. (Appendix D4.3.4)
DataTraceAddress
Fields
comparator: u8
The comparator number that generated the data.
A DWT comparator matched an address. (Appendix D4.3.4)
DataTraceValue
Fields
comparator: u8
The comparator number that generated the data.
access_type: MemoryAccessType
Whether the data was read or written.
A data trace packet with a value. (Appendix D4.3.4)
Trait Implementations
sourceimpl Clone for TracePacket
impl Clone for TracePacket
sourcefn clone(&self) -> TracePacket
fn clone(&self) -> TracePacket
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for TracePacket
impl Debug for TracePacket
sourceimpl PartialEq<TracePacket> for TracePacket
impl PartialEq<TracePacket> for TracePacket
sourcefn eq(&self, other: &TracePacket) -> bool
fn eq(&self, other: &TracePacket) -> bool
impl StructuralPartialEq for TracePacket
Auto Trait Implementations
impl RefUnwindSafe for TracePacket
impl Send for TracePacket
impl Sync for TracePacket
impl Unpin for TracePacket
impl UnwindSafe for TracePacket
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> FmtForward for T
impl<T> FmtForward for T
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read morefn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read morefn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
self
, then passes self.as_ref()
into the pipe function.fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
self
, then passes self.deref()
into the pipe function.impl<T> Tap for T
impl<T> Tap for T
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Borrow<B>
of a value. Read morefn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
BorrowMut<B>
of a value. Read morefn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
AsRef<R>
view of a value. Read morefn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
AsMut<R>
view of a value. Read morefn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
Deref::Target
of a value. Read morefn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Deref::Target
of a value. Read morefn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds. Read morefn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds. Read morefn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds. Read morefn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds. Read morefn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds. Read more