ArmDebugInterface

Trait ArmDebugInterface 

Source
pub trait ArmDebugInterface:
    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 select_debug_port(&mut self, dp: DpAddress) -> Result<(), ArmError>;
    fn current_debug_port(&self) -> Option<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 the ARM debug interface.

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.

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 select_debug_port(&mut self, dp: DpAddress) -> Result<(), ArmError>

Explicitly select a debug port.

It is required that implementations connect to a debug port automatically, but this method can be used to select a DP manually, to have control over the point in time where the DP is selected.

Source

fn current_debug_port(&self) -> Option<DpAddress>

Return the currently connected debug port.

None if the interface is not connected to a DP.

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§