Trait probe_rs::architecture::arm::sequences::ArmDebugSequence

source ·
pub trait ArmDebugSequence: Send + Sync + Debug {
Show 15 methods // Provided methods fn reset_hardware_assert( &self, interface: &mut dyn DapProbe ) -> Result<(), ArmError> { ... } fn reset_hardware_deassert( &self, memory: &mut dyn ArmProbe ) -> Result<(), ArmError> { ... } fn debug_port_setup( &self, interface: &mut dyn DapProbe, dp: DpAddress ) -> Result<(), ArmError> { ... } fn debug_port_start( &self, interface: &mut ArmCommunicationInterface<Initialized>, dp: DpAddress ) -> Result<(), ArmError> { ... } fn debug_core_start( &self, interface: &mut dyn ArmProbeInterface, core_ap: MemoryAp, core_type: CoreType, debug_base: Option<u64>, cti_base: Option<u64> ) -> Result<(), ArmError> { ... } fn reset_catch_set( &self, core: &mut dyn ArmProbe, core_type: CoreType, debug_base: Option<u64> ) -> Result<(), ArmError> { ... } fn reset_catch_clear( &self, core: &mut dyn ArmProbe, core_type: CoreType, debug_base: Option<u64> ) -> Result<(), ArmError> { ... } fn trace_start( &self, interface: &mut dyn ArmProbeInterface, components: &[CoresightComponent], _sink: &TraceSink ) -> Result<(), ArmError> { ... } fn reset_system( &self, interface: &mut dyn ArmProbe, core_type: CoreType, debug_base: Option<u64> ) -> Result<(), ArmError> { ... } fn debug_device_unlock( &self, _interface: &mut dyn ArmProbeInterface, _default_ap: MemoryAp, _permissions: &Permissions ) -> Result<(), ArmError> { ... } fn recover_support_start( &self, _interface: &mut dyn ArmProbe ) -> Result<(), ArmError> { ... } fn debug_core_stop( &self, interface: &mut dyn ArmProbe, core_type: CoreType ) -> Result<(), ArmError> { ... } fn debug_port_stop( &self, interface: &mut dyn DapProbe, dp: DpAddress ) -> Result<(), ArmError> { ... } fn debug_port_connect( &self, interface: &mut dyn DapProbe, dp: DpAddress ) -> Result<(), ArmError> { ... } fn debug_erase_sequence(&self) -> Option<Arc<dyn DebugEraseSequence>> { ... }
}
Expand description

A interface to operate debug sequences for ARM targets.

Should be implemented on a custom handle for chips that require special sequence code.

Provided Methods§

source

fn reset_hardware_assert( &self, interface: &mut dyn DapProbe ) -> Result<(), ArmError>

Assert a system-wide reset line nRST. This is based on the ResetHardwareAssert function from the ARM SVD Debug Description.

source

fn reset_hardware_deassert( &self, memory: &mut dyn ArmProbe ) -> Result<(), ArmError>

De-Assert a system-wide reset line nRST. This is based on the ResetHardwareDeassert function from the ARM SVD Debug Description.

source

fn debug_port_setup( &self, interface: &mut dyn DapProbe, dp: DpAddress ) -> Result<(), ArmError>

Prepare the target debug port for connection. This is based on the DebugPortSetup function from the ARM SVD Debug Description.

After this function has been executed, it should be possible to read and write registers using SWD requests.

If this function cannot read the DPIDR register, it will retry up to 5 times, and return an error if it still cannot read it.

source

fn debug_port_start( &self, interface: &mut ArmCommunicationInterface<Initialized>, dp: DpAddress ) -> Result<(), ArmError>

Connect to the target debug port and power it up. This is based on the DebugPortStart function from the ARM SVD Debug Description.

source

fn debug_core_start( &self, interface: &mut dyn ArmProbeInterface, core_ap: MemoryAp, core_type: CoreType, debug_base: Option<u64>, cti_base: Option<u64> ) -> Result<(), ArmError>

Initialize core debug system. This is based on the DebugCoreStart function from the ARM SVD Debug Description.

source

fn reset_catch_set( &self, core: &mut dyn ArmProbe, core_type: CoreType, debug_base: Option<u64> ) -> Result<(), ArmError>

Configure the target to stop code execution after a reset. After this, the core will halt when it comes out of reset. This is based on the ResetCatchSet function from the ARM SVD Debug Description.

source

fn reset_catch_clear( &self, core: &mut dyn ArmProbe, core_type: CoreType, debug_base: Option<u64> ) -> Result<(), ArmError>

Free hardware resources allocated by ResetCatchSet. This is based on the ResetCatchSet function from the ARM SVD Debug Description.

source

fn trace_start( &self, interface: &mut dyn ArmProbeInterface, components: &[CoresightComponent], _sink: &TraceSink ) -> Result<(), ArmError>

Enable target trace capture.

§Note

This function is responsible for configuring any of the CoreSight link components, such as trace funnels, to route trace data to the specified trace sink.

This is based on the TraceStart function from the ARM SVD Debug Description.

source

fn reset_system( &self, interface: &mut dyn ArmProbe, core_type: CoreType, debug_base: Option<u64> ) -> Result<(), ArmError>

Executes a system-wide reset without debug domain (or warm-reset that preserves debug connection) via software mechanisms, for example AIRCR.SYSRESETREQ. This is based on the ResetSystem function from the ARM SVD Debug Description.

source

fn debug_device_unlock( &self, _interface: &mut dyn ArmProbeInterface, _default_ap: MemoryAp, _permissions: &Permissions ) -> Result<(), ArmError>

Check if the device is in a locked state and unlock it. Use query command elements for user confirmation. Executed after having powered up the debug port. This is based on the DebugDeviceUnlock function from the ARM SVD Debug Description.

source

fn recover_support_start( &self, _interface: &mut dyn ArmProbe ) -> Result<(), ArmError>

Executed before step or run command to support recovery from a lost target connection, e.g. after a low power mode. This is based on the RecoverSupportStart function from the ARM SVD Debug Description.

source

fn debug_core_stop( &self, interface: &mut dyn ArmProbe, core_type: CoreType ) -> Result<(), ArmError>

Executed when the debugger session is disconnected from the core.

This is based on the DebugCoreStop function from the ARM SVD Debug Description.

source

fn debug_port_stop( &self, interface: &mut dyn DapProbe, dp: DpAddress ) -> Result<(), ArmError>

Sequence executed when disconnecting from a debug port.

Based on the DebugPortStop function from the ARM SVD Debug Description.

source

fn debug_port_connect( &self, interface: &mut dyn DapProbe, dp: DpAddress ) -> Result<(), ArmError>

Perform a SWD line reset or enter the JTAG Run-Test-Idle state, and then try to connect to a debug port.

This is executed as part of the standard debug_port_setup sequence, and when switching between debug ports in a SWD multi-drop configuration.

If the dp parameter is DpAddress::Default, a read of the DPIDR register will be performed after the line reset.

If the dp parameter is DpAddress::Multidrop, a write of the TARGETSEL register is done after the line reset, followed by a read of the DPIDR register.

This is not based on a sequence from the Open-CMSIS-Pack standard.

source

fn debug_erase_sequence(&self) -> Option<Arc<dyn DebugEraseSequence>>

Return the Debug Erase Sequence implementation if it exists

Implementors§