[−][src]Struct probe_rs::Core
Implementations
impl<'probe> Core<'probe>
[src]
pub fn new(
core: impl CoreInterface + 'probe,
state: &'probe mut CoreState
) -> Core<'probe>
[src]
core: impl CoreInterface + 'probe,
state: &'probe mut CoreState
) -> Core<'probe>
pub fn create_state(id: usize) -> CoreState
[src]
pub fn id(&self) -> usize
[src]
pub fn wait_for_core_halted(&mut self, timeout: Duration) -> Result<(), Error>
[src]
Wait until the core is halted. If the core does not halt on its own,
a DebugProbeError::Timeout
error will be returned.
pub fn core_halted(&mut self) -> Result<bool, Error>
[src]
Check if the core is halted. If the core does not halt on its own,
a CoreError::Timeout
error will be returned.
pub fn halt(&mut self, timeout: Duration) -> Result<CoreInformation, Error>
[src]
Try to halt the core. This function ensures the core is actually halted, and
returns a CoreError::Timeout
otherwise.
pub fn run(&mut self) -> Result<(), Error>
[src]
pub fn reset(&mut self) -> Result<(), Error>
[src]
Reset the core, and then continue to execute instructions. If the core
should be halted after reset, use the reset_and_halt
function.
pub fn reset_and_halt(
&mut self,
timeout: Duration
) -> Result<CoreInformation, Error>
[src]
&mut self,
timeout: Duration
) -> Result<CoreInformation, Error>
Reset the core, and then immediately halt. To continue execution after
reset, use the reset
function.
pub fn step(&mut self) -> Result<CoreInformation, Error>
[src]
Steps one instruction and then enters halted state again.
pub fn status(&mut self) -> Result<CoreStatus, Error>
[src]
pub fn read_core_reg(
&mut self,
address: impl Into<CoreRegisterAddress>
) -> Result<u32, Error>
[src]
&mut self,
address: impl Into<CoreRegisterAddress>
) -> Result<u32, Error>
pub fn write_core_reg(
&mut self,
address: CoreRegisterAddress,
value: u32
) -> Result<(), Error>
[src]
&mut self,
address: CoreRegisterAddress,
value: u32
) -> Result<(), Error>
pub fn get_available_breakpoint_units(&mut self) -> Result<u32, Error>
[src]
pub fn registers(&self) -> &'static RegisterFile
[src]
pub fn set_hw_breakpoint(&mut self, address: u32) -> Result<(), Error>
[src]
Set a hardware breakpoint
This function will try to set a hardware breakpoint. The amount
of hardware breakpoints which are supported is chip specific,
and can be queried using the get_available_breakpoint_units
function.
pub fn clear_hw_breakpoint(&mut self, address: u32) -> Result<(), Error>
[src]
pub fn clear_all_hw_breakpoints(&mut self) -> Result<(), Error>
[src]
pub fn architecture(&self) -> Architecture
[src]
Trait Implementations
impl<'probe> MemoryInterface for Core<'probe>
[src]
fn read_word_32(&mut self, address: u32) -> Result<u32, Error>
[src]
fn read_word_8(&mut self, address: u32) -> Result<u8, Error>
[src]
fn read_32(&mut self, address: u32, data: &mut [u32]) -> Result<(), Error>
[src]
fn read_8(&mut self, address: u32, data: &mut [u8]) -> Result<(), Error>
[src]
fn write_word_32(&mut self, addr: u32, data: u32) -> Result<(), Error>
[src]
fn write_word_8(&mut self, addr: u32, data: u8) -> Result<(), Error>
[src]
fn write_32(&mut self, addr: u32, data: &[u32]) -> Result<(), Error>
[src]
fn write_8(&mut self, addr: u32, data: &[u8]) -> Result<(), Error>
[src]
fn flush(&mut self) -> Result<(), Error>
[src]
Auto Trait Implementations
impl<'probe> !RefUnwindSafe for Core<'probe>
impl<'probe> !Send for Core<'probe>
impl<'probe> !Sync for Core<'probe>
impl<'probe> Unpin for Core<'probe>
impl<'probe> !UnwindSafe for Core<'probe>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,