[−][src]Crate probe_rs
Debugging toolset for embedded devices
Prerequisites
- Udev rules
- libusb
Examples
Halting the attached chip
use probe_rs::Probe; // Get a list of all available debug probes. let probes = Probe::list_all(); // Use the first probe found. let mut probe = probes[0].open()?; // Attach to a chip. let mut session = probe.attach("nrf52")?; // Select a core. let mut core = session.core(0)?; // Halt the attached core. core.halt(std::time::Duration::from_millis(10))?;
Reading from RAM
use probe_rs::Session; use probe_rs::MemoryInterface; let mut session = Session::auto_attach("nrf52")?; let mut core = session.core(0)?; // Read a block of 50 32 bit words. let mut buff = [0u32;50]; core.read_32(0x2000_0000, &mut buff)?; // Read a single 32 bit word. let word = core.read_word_32(0x2000_0000)?; // Writing is just as simple. let buff = [0u32;50]; core.write_32(0x2000_0000, &buff)?; // of course we can also write 8bit words. let buff = [0u8;50]; core.write_8(0x2000_0000, &buff)?;
probe-rs is built around 5 main interfaces: the Probe, Target, Session, Memory and Core strucs.
Modules
| architecture | |
| config | |
| debug | Debugging support for probe-rs |
| flashing | Flash programming operations. |
Macros
| define_ap | |
| define_ap_register | |
| define_dp_register |
Structs
| Breakpoint | |
| BreakpointId | |
| Core | |
| CoreInformation | |
| CoreList | |
| CoreRegisterAddress | |
| DebugProbeInfo | |
| DebugProbeSelector | A struct to describe the way a probe should be selected. |
| Memory | |
| MemoryList | |
| Probe | The Probe struct is a generic wrapper over the different probes supported. |
| Session | |
| Target | This describes a complete target with a fixed chip model and variant. |
Enums
| Architecture | |
| AttachMethod | |
| CoreStatus | |
| CoreType | |
| DebugProbeError | |
| DebugProbeType | |
| Error | |
| HaltReason | |
| WireProtocol |
Traits
| CommunicationInterface | |
| CoreInterface | |
| CoreRegister | |
| DebugProbe | |
| MemoryInterface |