pub trait ArmProbeInterface:
DapAccess
+ SwdSequence
+ SwoAccess
+ Send {
// Required methods
fn reinitialize(&mut self) -> Result<(), ArmError>;
fn access_ports(
&mut self,
dp: DpAddress,
) -> Result<BTreeSet<FullyQualifiedApAddress>, ArmError>;
fn close(self: Box<Self>) -> Probe;
fn current_debug_port(&self) -> DpAddress;
fn memory_interface(
&mut self,
access_port: &FullyQualifiedApAddress,
) -> Result<Box<dyn ArmMemoryInterface + '_>, ArmError>;
}
Expand description
To be implemented by debug probe drivers that support debugging ARM cores.
Required Methods§
Sourcefn reinitialize(&mut self) -> Result<(), ArmError>
fn reinitialize(&mut self) -> Result<(), ArmError>
Reinitialize the communication interface (in place).
Some chip-specific reset sequences may disable the debug port. reinitialize
allows
a debug sequence to re-initialize the debug port, staying true to the Initialized
type state.
If you’re invoking this from a debug sequence, know that reinitialize
will likely
call back onto you! Specifically, it will invoke some sequence of debug_port_*
sequences with varying internal state. If you’re not prepared for this, you might recurse.
reinitialize
does handle debug_core_start
to re-initialize any core’s debugging.
If you’re a chip-specific debug sequence, you’re expected to handle this yourself.
Sourcefn access_ports(
&mut self,
dp: DpAddress,
) -> Result<BTreeSet<FullyQualifiedApAddress>, ArmError>
fn access_ports( &mut self, dp: DpAddress, ) -> Result<BTreeSet<FullyQualifiedApAddress>, ArmError>
Returns a vector of all the access ports the current debug port has.
If the target device has multiple debug ports, this will switch the active debug port if necessary.
Sourcefn close(self: Box<Self>) -> Probe
fn close(self: Box<Self>) -> Probe
Closes the interface and returns back the generic probe it consumed.
Sourcefn current_debug_port(&self) -> DpAddress
fn current_debug_port(&self) -> DpAddress
Return the currently connected debug port.
Sourcefn memory_interface(
&mut self,
access_port: &FullyQualifiedApAddress,
) -> Result<Box<dyn ArmMemoryInterface + '_>, ArmError>
fn memory_interface( &mut self, access_port: &FullyQualifiedApAddress, ) -> Result<Box<dyn ArmMemoryInterface + '_>, ArmError>
Returns a memory interface to access the target’s memory.