opentitanlib::debug::openocd

Struct OpenOcdJtagTap

Source
pub struct OpenOcdJtagTap { /* private fields */ }
Expand description

An JTAG interface driver over OpenOCD.

Trait Implementations§

Source§

impl Jtag for OpenOcdJtagTap

Source§

fn into_raw(self: Box<Self>) -> Result<OpenOcd>

Stop further operation and returns raw OpenOCD instance.
Source§

fn as_raw(&mut self) -> Result<&mut OpenOcd>

Returns the underlying OpenOCD instance.
Source§

fn disconnect(self: Box<Self>) -> Result<()>

Disconnect from the TAP.
Source§

fn tap(&self) -> JtagTap

Get TAP we are currently connected too.
Source§

fn read_lc_ctrl_reg(&mut self, reg: &LcCtrlReg) -> Result<u32>

Read a lifecycle controller register.
Source§

fn write_lc_ctrl_reg(&mut self, reg: &LcCtrlReg, value: u32) -> Result<()>

Write a value to a lifecycle controller register.
Source§

fn read_memory(&mut self, addr: u32, buf: &mut [u8]) -> Result<usize>

Read bytes/words from memory into the provided buffer. When reading bytes, each memory access is 8 bits. When reading words, each memory access is 32 bit. If the hardware does not support unaligned memory accesses, this function will fail. Read more
Source§

fn read_memory32(&mut self, addr: u32, buf: &mut [u32]) -> Result<usize>

Source§

fn write_memory(&mut self, addr: u32, buf: &[u8]) -> Result<()>

Write bytes/words to memory.
Source§

fn write_memory32(&mut self, addr: u32, buf: &[u32]) -> Result<()>

Source§

fn halt(&mut self) -> Result<()>

Halt execution.
Source§

fn wait_halt(&mut self, timeout: Duration) -> Result<()>

Wait until the target halt. This does NOT halt the target on timeout.
Source§

fn resume(&mut self) -> Result<()>

Resume execution at its current code position.
Source§

fn resume_at(&mut self, addr: u32) -> Result<()>

Resume execution at the specified address.
Source§

fn reset(&mut self, run: bool) -> Result<()>

Reset the target as hard as possible. If run is true, the target will start running code immediately after reset, otherwise it will be halted immediately.
Source§

fn step(&mut self) -> Result<()>

Single-step the target at its current code position.
Source§

fn step_at(&mut self, addr: u32) -> Result<()>

Single-step the target at the specified address.
Source§

fn read_riscv_reg(&mut self, reg: &RiscvReg) -> Result<u32>

Read/write a RISC-V register
Source§

fn write_riscv_reg(&mut self, reg: &RiscvReg, val: u32) -> Result<()>

Source§

fn set_breakpoint(&mut self, address: u32, hw: bool) -> Result<()>

Set a breakpoint at the given address.
Source§

fn remove_breakpoint(&mut self, addr: u32) -> Result<()>

Source§

fn remove_all_breakpoints(&mut self) -> Result<()>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V