Trait ArmProbeInterface

Source
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§

Source

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.

Source

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.

Source

fn close(self: Box<Self>) -> Probe

Closes the interface and returns back the generic probe it consumed.

Source

fn current_debug_port(&self) -> DpAddress

Return the currently connected debug port.

Source

fn memory_interface( &mut self, access_port: &FullyQualifiedApAddress, ) -> Result<Box<dyn ArmMemoryInterface + '_>, ArmError>

Returns a memory interface to access the target’s memory.

Implementors§