pub trait CoreInterface: MemoryInterface {
Show 22 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: RegisterId
    ) -> Result<RegisterValue, Error>; fn write_core_reg(
        &mut self,
        address: RegisterId,
        value: RegisterValue
    ) -> Result<()>; fn available_breakpoint_units(&mut self) -> Result<u32, Error>; fn hw_breakpoints(&mut self) -> Result<Vec<Option<u64>>, Error>; fn enable_breakpoints(&mut self, state: bool) -> Result<(), Error>; fn set_hw_breakpoint(
        &mut self,
        unit_index: usize,
        addr: u64
    ) -> 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; fn core_type(&self) -> CoreType; fn instruction_set(&mut self) -> Result<InstructionSet, Error>; fn fpu_support(&mut self) -> Result<bool, Error>; fn on_session_stop(&mut self) -> Result<(), Error> { ... }
}
Expand description

A generic interface to control a MCU core.

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.

Returns the current status of the core.

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

Continue to execute instructions.

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 value of a core register.

Write the value of a core register.

Returns all the available breakpoint units of the core.

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.

Enables breakpoints on this core. If a breakpoint is set, it will halt as soon as it is hit.

Sets a breakpoint at addr. It does so by using unit bp_unit_index.

Clears the breakpoint configured in unit unit_index.

Returns a list of all the registers of this core.

Returns true if hwardware breakpoints are enabled, false otherwise.

Get the Architecture of the Core.

Get the CoreType of the Core

Determine the instruction set the core is operating in This must be queried while halted as this is a runtime decision for some core types

Determine if an FPU is present. This must be queried while halted as this is a runtime decision for some core types.

Provided Methods

Called during session stop to do any pending cleanup

Implementors