Trait probe_rs::CoreInterface[][src]

pub trait CoreInterface: MemoryInterface {
Show methods fn wait_for_core_halted(&mut self, timeout: Duration) -> Result<(), Error>;
fn core_halted(&mut self) -> Result<bool, Error>;
fn status(&mut self) -> Result<CoreStatus, Error>;
fn halt(&mut self, timeout: Duration) -> Result<CoreInformation, Error>;
fn run(&mut self) -> Result<(), Error>;
fn reset(&mut self) -> Result<(), Error>;
fn reset_and_halt(
        &mut self,
        timeout: Duration
    ) -> Result<CoreInformation, Error>;
fn step(&mut self) -> Result<CoreInformation, Error>;
fn read_core_reg(
        &mut self,
        address: CoreRegisterAddress
    ) -> Result<u32, Error>;
fn write_core_reg(
        &mut self,
        address: CoreRegisterAddress,
        value: u32
    ) -> Result<()>;
fn get_available_breakpoint_units(&mut self) -> Result<u32, Error>;
fn get_hw_breakpoints(&mut self) -> Result<Vec<Option<u32>>, Error>;
fn enable_breakpoints(&mut self, state: bool) -> Result<(), Error>;
fn set_hw_breakpoint(
        &mut self,
        bp_unit_index: usize,
        addr: u32
    ) -> Result<(), Error>;
fn clear_hw_breakpoint(&mut self, unit_index: usize) -> Result<(), Error>;
fn registers(&self) -> &'static RegisterFile;
fn hw_breakpoints_enabled(&self) -> bool;
fn architecture(&self) -> Architecture;
}

Required methods

Wait until the core is halted. If the core does not halt on its own, a [DebugProbeError::Timeout] error will be returned.

Check if the core is halted. If the core does not halt on its own, a [DebugProbeError::Timeout] error will be returned.

Try to halt the core. This function ensures the core is actually halted, and returns a [DebugProbeError::Timeout] otherwise.

Reset the core, and then continue to execute instructions. If the core should be halted after reset, use the reset_and_halt function.

Reset the core, and then immediately halt. To continue execution after reset, use the reset function.

Steps one instruction and then enters halted state again.

Read the hardware breakpoints from FpComp registers, and adds them to the Result Vector. A value of None in any position of the Vector indicates that the position is unset/available. We intentionally return all breakpoints, irrespective of whether they are enabled or not.

Get the Architecture of the Core.

Implementors