pub struct AsyncDebugNet<'a> { /* private fields */ }Expand description
Handle for a debug-probe net (async).
RTT streaming is not provided on the async client yet; use the blocking
DebugNet::rtt for log streaming.
Implementations§
Source§impl AsyncDebugNet<'_>
impl AsyncDebugNet<'_>
Sourcepub async fn connect(&self) -> Result<DebugConnection>
pub async fn connect(&self) -> Result<DebugConnection>
Connect to the probe with default options (starts a GDB server).
Sourcepub async fn connect_with(
&self,
opts: &ConnectOptions,
) -> Result<DebugConnection>
pub async fn connect_with( &self, opts: &ConnectOptions, ) -> Result<DebugConnection>
Connect to the probe with explicit options.
Sourcepub async fn disconnect(&self, keep_running: bool) -> Result<()>
pub async fn disconnect(&self, keep_running: bool) -> Result<()>
Disconnect. If keep_running is true the gdbserver is left running.
Sourcepub async fn reset(&self, halt: bool) -> Result<()>
pub async fn reset(&self, halt: bool) -> Result<()>
Reset the target, optionally halting at the reset vector.
Sourcepub async fn flash(&self, firmware_path: impl AsRef<Path>) -> Result<()>
pub async fn flash(&self, firmware_path: impl AsRef<Path>) -> Result<()>
Flash a firmware file, inferring type from extension.
Sourcepub async fn flash_bin(
&self,
firmware_path: impl AsRef<Path>,
address: u32,
) -> Result<()>
pub async fn flash_bin( &self, firmware_path: impl AsRef<Path>, address: u32, ) -> Result<()>
Flash a raw binary at an explicit base address.
Sourcepub async fn flash_bytes(
&self,
contents: &[u8],
kind: FirmwareKind,
address: Option<u32>,
) -> Result<()>
pub async fn flash_bytes( &self, contents: &[u8], kind: FirmwareKind, address: Option<u32>, ) -> Result<()>
Flash raw firmware bytes of a known kind.
Sourcepub async fn read_memory(&self, address: u64, length: usize) -> Result<Vec<u8>>
pub async fn read_memory(&self, address: u64, length: usize) -> Result<Vec<u8>>
Read length bytes of target memory starting at address.
Sourcepub async fn status(&self) -> Result<DebugStatus>
pub async fn status(&self) -> Result<DebugStatus>
Whether a gdbserver/daemon is currently running for this probe.
Trait Implementations§
Source§impl<'a> Clone for AsyncDebugNet<'a>
impl<'a> Clone for AsyncDebugNet<'a>
Source§fn clone(&self) -> AsyncDebugNet<'a>
fn clone(&self) -> AsyncDebugNet<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> !RefUnwindSafe for AsyncDebugNet<'a>
impl<'a> !UnwindSafe for AsyncDebugNet<'a>
impl<'a> Freeze for AsyncDebugNet<'a>
impl<'a> Send for AsyncDebugNet<'a>
impl<'a> Sync for AsyncDebugNet<'a>
impl<'a> Unpin for AsyncDebugNet<'a>
impl<'a> UnsafeUnpin for AsyncDebugNet<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more