pub struct XtensaCommunicationInterface<'probe> { /* private fields */ }
Expand description
The higher level of the XDM functionality.
Implementations§
Source§impl<'probe> XtensaCommunicationInterface<'probe>
impl<'probe> XtensaCommunicationInterface<'probe>
Sourcepub fn new(
probe: &'probe mut dyn JTAGAccess,
state: &'probe mut XtensaDebugInterfaceState,
) -> Self
pub fn new( probe: &'probe mut dyn JTAGAccess, state: &'probe mut XtensaDebugInterfaceState, ) -> Self
Create the Xtensa communication interface using the underlying probe driver
Sourcepub fn add_slow_memory_access_range(&mut self, range: Range<u64>)
pub fn add_slow_memory_access_range(&mut self, range: Range<u64>)
Set the range of addresses for which we should not use LDDR32.P/SDDR32.P instructions.
Sourcepub fn read_idcode(&mut self) -> Result<u32, XtensaError>
pub fn read_idcode(&mut self) -> Result<u32, XtensaError>
Read the targets IDCODE.
Sourcepub fn enter_debug_mode(&mut self) -> Result<(), XtensaError>
pub fn enter_debug_mode(&mut self) -> Result<(), XtensaError>
Enter debug mode.
Sourcepub fn available_breakpoint_units(&self) -> u32
pub fn available_breakpoint_units(&self) -> u32
Returns the number of hardware breakpoints the target supports.
On the Xtensa architecture this is the NIBREAK
configuration parameter.
Sourcepub fn core_halted(&mut self) -> Result<bool, XtensaError>
pub fn core_halted(&mut self) -> Result<bool, XtensaError>
Returns whether the core is halted.
Sourcepub fn wait_for_core_halted(
&mut self,
timeout: Duration,
) -> Result<(), XtensaError>
pub fn wait_for_core_halted( &mut self, timeout: Duration, ) -> Result<(), XtensaError>
Waits until the core is halted.
This function lowers the interrupt level to allow halting on debug exceptions.
Sourcepub fn halted_access<R>(
&mut self,
op: impl FnOnce(&mut Self) -> Result<R, XtensaError>,
) -> Result<R, XtensaError>
pub fn halted_access<R>( &mut self, op: impl FnOnce(&mut Self) -> Result<R, XtensaError>, ) -> Result<R, XtensaError>
Executes a closure while ensuring the core is halted.
Sourcepub fn step(&mut self) -> Result<(), XtensaError>
pub fn step(&mut self) -> Result<(), XtensaError>
Steps the core by one instruction.
Sourcepub fn resume_core(&mut self) -> Result<(), XtensaError>
pub fn resume_core(&mut self) -> Result<(), XtensaError>
Resumes program execution.
Sourcepub fn read_register<R: TypedRegister>(&mut self) -> Result<R, XtensaError>
pub fn read_register<R: TypedRegister>(&mut self) -> Result<R, XtensaError>
Read a register.
Sourcepub fn schedule_read_register<R: TypedRegister>(
&mut self,
) -> Result<DeferredResultIndex, XtensaError>
pub fn schedule_read_register<R: TypedRegister>( &mut self, ) -> Result<DeferredResultIndex, XtensaError>
Schedules reading a register.
Sourcepub fn write_register<R: TypedRegister>(
&mut self,
reg: R,
) -> Result<(), XtensaError>
pub fn write_register<R: TypedRegister>( &mut self, reg: R, ) -> Result<(), XtensaError>
Write a register.
Sourcepub fn schedule_write_register<R: TypedRegister>(
&mut self,
reg: R,
) -> Result<(), XtensaError>
pub fn schedule_write_register<R: TypedRegister>( &mut self, reg: R, ) -> Result<(), XtensaError>
Schedules writing a register.
Sourcepub fn schedule_read_register_untyped(
&mut self,
register: impl Into<Register>,
) -> Result<DeferredResultIndex, XtensaError>
pub fn schedule_read_register_untyped( &mut self, register: impl Into<Register>, ) -> Result<DeferredResultIndex, XtensaError>
Schedules reading a register.
Sourcepub fn read_register_untyped(
&mut self,
register: impl Into<Register>,
) -> Result<u32, XtensaError>
pub fn read_register_untyped( &mut self, register: impl Into<Register>, ) -> Result<u32, XtensaError>
Read a register.
Sourcepub fn schedule_write_register_untyped(
&mut self,
register: impl Into<Register>,
value: u32,
) -> Result<(), XtensaError>
pub fn schedule_write_register_untyped( &mut self, register: impl Into<Register>, value: u32, ) -> Result<(), XtensaError>
Schedules writing a register.
Sourcepub fn write_register_untyped(
&mut self,
register: impl Into<Register>,
value: u32,
) -> Result<(), XtensaError>
pub fn write_register_untyped( &mut self, register: impl Into<Register>, value: u32, ) -> Result<(), XtensaError>
Write a register.
Trait Implementations§
Source§impl MemoryInterface for XtensaCommunicationInterface<'_>
impl MemoryInterface for XtensaCommunicationInterface<'_>
Source§fn read(&mut self, address: u64, dst: &mut [u8]) -> Result<(), Error>
fn read(&mut self, address: u64, dst: &mut [u8]) -> Result<(), Error>
address
. Read moreSource§fn supports_native_64bit_access(&mut self) -> bool
fn supports_native_64bit_access(&mut self) -> bool
Source§fn read_word_64(&mut self, address: u64) -> Result<u64, Error>
fn read_word_64(&mut self, address: u64) -> Result<u64, Error>
address
. Read moreSource§fn read_word_32(&mut self, address: u64) -> Result<u32, Error>
fn read_word_32(&mut self, address: u64) -> Result<u32, Error>
address
. Read moreSource§fn read_word_16(&mut self, address: u64) -> Result<u16, Error>
fn read_word_16(&mut self, address: u64) -> Result<u16, Error>
address
. Read moreSource§fn read_64(&mut self, address: u64, data: &mut [u64]) -> Result<(), Error>
fn read_64(&mut self, address: u64, data: &mut [u64]) -> Result<(), Error>
address
. Read moreSource§fn read_32(&mut self, address: u64, data: &mut [u32]) -> Result<(), Error>
fn read_32(&mut self, address: u64, data: &mut [u32]) -> Result<(), Error>
address
. Read moreSource§fn read_16(&mut self, address: u64, data: &mut [u16]) -> Result<(), Error>
fn read_16(&mut self, address: u64, data: &mut [u16]) -> Result<(), Error>
address
. Read moreSource§fn read_8(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
fn read_8(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
address
.Source§fn write(&mut self, address: u64, data: &[u8]) -> Result<(), Error>
fn write(&mut self, address: u64, data: &[u8]) -> Result<(), Error>
address
. May use 64 bit memory access,
so should only be used if reading memory locations that don’t have side
effects. Generally faster than MemoryInterface::write_8
. Read moreSource§fn write_word_64(&mut self, address: u64, data: u64) -> Result<(), Error>
fn write_word_64(&mut self, address: u64, data: u64) -> Result<(), Error>
address
. Read moreSource§fn write_word_32(&mut self, address: u64, data: u32) -> Result<(), Error>
fn write_word_32(&mut self, address: u64, data: u32) -> Result<(), Error>
address
. Read moreSource§fn write_word_16(&mut self, address: u64, data: u16) -> Result<(), Error>
fn write_word_16(&mut self, address: u64, data: u16) -> Result<(), Error>
address
. Read moreSource§fn write_word_8(&mut self, address: u64, data: u8) -> Result<(), Error>
fn write_word_8(&mut self, address: u64, data: u8) -> Result<(), Error>
address
.Source§fn write_64(&mut self, address: u64, data: &[u64]) -> Result<(), Error>
fn write_64(&mut self, address: u64, data: &[u64]) -> Result<(), Error>
address
. Read moreSource§fn write_32(&mut self, address: u64, data: &[u32]) -> Result<(), Error>
fn write_32(&mut self, address: u64, data: &[u32]) -> Result<(), Error>
address
. Read moreSource§fn write_16(&mut self, address: u64, data: &[u16]) -> Result<(), Error>
fn write_16(&mut self, address: u64, data: &[u16]) -> Result<(), Error>
address
. Read moreSource§fn write_8(&mut self, address: u64, data: &[u8]) -> Result<(), Error>
fn write_8(&mut self, address: u64, data: &[u8]) -> Result<(), Error>
address
.Source§fn supports_8bit_transfers(&self) -> Result<bool, Error>
fn supports_8bit_transfers(&self) -> Result<bool, Error>
Source§fn read_mem_64bit(&mut self, address: u64, data: &mut [u8]) -> Result<(), ERR>
fn read_mem_64bit(&mut self, address: u64, data: &mut [u8]) -> Result<(), ERR>
Source§fn read_mem_32bit(&mut self, address: u64, data: &mut [u8]) -> Result<(), ERR>
fn read_mem_32bit(&mut self, address: u64, data: &mut [u8]) -> Result<(), ERR>
Auto Trait Implementations§
impl<'probe> Freeze for XtensaCommunicationInterface<'probe>
impl<'probe> !RefUnwindSafe for XtensaCommunicationInterface<'probe>
impl<'probe> Send for XtensaCommunicationInterface<'probe>
impl<'probe> !Sync for XtensaCommunicationInterface<'probe>
impl<'probe> Unpin for XtensaCommunicationInterface<'probe>
impl<'probe> !UnwindSafe for XtensaCommunicationInterface<'probe>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§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.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.Source§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.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§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 moreSource§fn 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 moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§fn 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.Source§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.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.