pub trait RiscvDebugSequence:
Send
+ Sync
+ Debug {
// Provided methods
fn on_connect(
&self,
_interface: &mut RiscvCommunicationInterface<'_>,
) -> Result<(), Error> { ... }
fn detect_flash_size(
&self,
_session: &mut Session,
) -> Result<Option<usize>, Error> { ... }
fn reset_catch_set(
&self,
interface: &mut RiscvCommunicationInterface<'_>,
) -> Result<(), RiscvError> { ... }
fn reset_catch_clear(
&self,
interface: &mut RiscvCommunicationInterface<'_>,
) -> Result<(), RiscvError> { ... }
fn reset_system_and_halt(
&self,
interface: &mut RiscvCommunicationInterface<'_>,
timeout: Duration,
) -> Result<(), Error> { ... }
}
Expand description
A interface to operate debug sequences for RISC-V targets.
Should be implemented on a custom handle for chips that require special sequence code.
Provided Methods§
Sourcefn on_connect(
&self,
_interface: &mut RiscvCommunicationInterface<'_>,
) -> Result<(), Error>
fn on_connect( &self, _interface: &mut RiscvCommunicationInterface<'_>, ) -> Result<(), Error>
Executed when the probe establishes a connection to the target.
Sourcefn detect_flash_size(
&self,
_session: &mut Session,
) -> Result<Option<usize>, Error>
fn detect_flash_size( &self, _session: &mut Session, ) -> Result<Option<usize>, Error>
Detects the flash size of the target.
Sourcefn reset_catch_set(
&self,
interface: &mut RiscvCommunicationInterface<'_>,
) -> Result<(), RiscvError>
fn reset_catch_set( &self, interface: &mut RiscvCommunicationInterface<'_>, ) -> Result<(), RiscvError>
Configure the target to stop code execution after a reset. After this, the core will halt when it comes out of reset.
Sourcefn reset_catch_clear(
&self,
interface: &mut RiscvCommunicationInterface<'_>,
) -> Result<(), RiscvError>
fn reset_catch_clear( &self, interface: &mut RiscvCommunicationInterface<'_>, ) -> Result<(), RiscvError>
Free hardware resources allocated by ResetCatchSet.
Sourcefn reset_system_and_halt(
&self,
interface: &mut RiscvCommunicationInterface<'_>,
timeout: Duration,
) -> Result<(), Error>
fn reset_system_and_halt( &self, interface: &mut RiscvCommunicationInterface<'_>, timeout: Duration, ) -> Result<(), Error>
Executes a system-wide reset without debug domain (or warm-reset that preserves debug connection) via software mechanisms.