Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Probe Rs Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-probe-rs-knowledge-patch)
---
name: probe-rs-knowledge-patch
description: probe-rs
version: "0.32.0"
license: MIT
metadata:
author: Nevaberry
---
# probe-rs compatibility guidance
Load this skill when updating probe-rs commands, cargo tool configuration,
Rust library integrations, debug sessions, probe drivers, or target definitions.
It also covers flashing, RTT, embedded tests, semihosting, and target-specific
attachment and reset behavior.
Use the quick reference for migrations and common operations. Read the matching
topic reference for complete API details, target constraints, and version
attributions.
## Reference index
| Reference | Topics |
| --- | --- |
| [CLI and configuration](references/cli-and-configuration.md) | Command migrations, presets, cargo-embed, profiling, automation, Linux setup |
| [Debugger and GDB](references/debugger-and-gdb.md) | Console commands, registers, DAP transport, source paths, GDB loading |
| [RTT, tests, and semihosting](references/rtt-tests-and-semihosting.md) | Output, input, timestamps, channel metadata, embedded tests, file handling |
| [Library APIs](references/library-api.md) | Crates, plugins, registries, memory interfaces, core lifecycle, target fields |
| [Architecture and reset](references/architecture-and-reset.md) | ARM access, reset, lockup, RISC-V harts, debug modules, autodetection |
| [Probes and transports](references/probes-and-transports.md) | Selectors, JTAG/SWD APIs, remote connections, probe drivers, permissions |
| [Flashing](references/flashing.md) | Algorithm selection, blank checks, progress callbacks, erase ranges, vendor functions |
| [Targets](references/targets.md) | Device families, firmware requirements, unlock, flash layouts, target-specific fixes |
## CLI migrations and changed defaults
| Existing usage or behavior | Update |
| --- | --- |
| `probe-rs debug --exe` | Supply firmware as an optional positional argument; `--exe` is removed. |
| `--rtt-scan-memory` in `run` or `attach` | Use `--scan-region`, which accepts an address or a range. |
| `rtthost` | Use `probe-rs attach` or `probe-rs run`. |
| Explicit `--catch-reset` and `--catch-hardfault` | `run` and `attach` catch both by default; the old flags are accepted and have no effect. |
| Disabling reset or hardfault catches | Use `--no-catch-reset` or `--no-catch-hardfault`. |
| DAP transport | `probe-rs dap-server` defaults to stdin/stdout; use `--port <port>` for TCP. |
| Detailed chip information | `probe-rs info` attempts autodetection and prints the chip name; use `--verbose` for the previous detailed output. |
| Memory-read console output | `probe-rs read` defaults to `hex-table` and supports multiple console formats. |
| Two-line defmt output | Decoded messages default to one line; select the `twoline` log format for the previous layout. |
`probe-rs attach` can attach without a firmware path. `probe-rs debug` adds
`--launch`, `--verify`, and `--preverify`, and accepts commands through `-c`
or `--command`.
```sh
probe-rs debug -c 'info reg' firmware.elf
probe-rs attach --scan-region 0x20000000
```
`probe-rs run` also works with non-ELF firmware images. Use `probe-rs mi info`
to obtain the chip name as JSON.
## Rust API and packaging migrations
- Low-level debugger APIs moved from the `probe-rs` crate's `debug` feature to
`probe-rs-debug`; update dependencies and imports that use them.
- Replace `vendor::register_vendor` with `plugin::register_plugin` and a
`Plugin` for additional targets, image formats, probe drivers, or vendor
support. Espressif support lives in `probe-rs-espressif`.
- Public `Registry` replaces global target registration and lookup functions.
Use `registry.add_target_from_yaml(...)` and `registry.get_target_by_name(...)`,
then pass the registry to `Probe::attach_with_registry` or
`Probe::attach_under_reset_with_registry`.
- `auto_attach` accepts probe speed, protocol, and permissions through
`SessionConfig`; automatic attachment can use a supplied `Registry`.
- Rename `ArmProbeInterface` to `ArmDebugInterface`. Replace
`ArmMemoryInterface::get_dap_access` and `get_swd_sequence` calls with
`get_arm_debug_interface`. `ArmCommunicationInterface` no longer uses typestate.
- ARM access-port registers generated by `define_ap_register!` are newtypes
over `u32`. Replace public-field access with `reg.Field()` and
`reg.set_Field(value)`; enum getters return `Unknown(bits)` for unknown encodings.
- Obtain JTAG access with `Probe::try_as_jtag_probe`. Rename `JTAGAccess` to
`JtagAccess`, move `select_target` calls from `RawJtagIo` to that trait, and
replace `JtagChainItem` with `ScanChainElement`.
- Replace `Probe::try_into_jlink` with `try_into()` and specify the desired
concrete type. `Probe::try_get_*_interface` returns architecture-specific errors.
- `CoreInterface::on_session_stop` and `debug_on_sw_breakpoint` on `Core` and
`CoreInterface` were removed. Architecture implementations should enable
software breakpoints during connection.
- A non-ARM `Session` omits the initial halt of all cores. Explicitly halt
any cores the workflow needs stopped.
- The GDB server and `FlashLayout` visualizer moved from the library to the CLI.
Start the server with `probe-rs gdb`.
- Disable `coredump` to omit core-dump writing or `builtin-formats` to omit
the built-in bin, hex, ELF, and UF2 firmware image formats.
Building from source requires Rust 2024 edition support. CI binaries are built
on Ubuntu 22.04, which can affect required shared-library versions. Enable
`cmsisdap_v1` for CMSIS-DAP v1 support; that feature gates `hidapi`.
## Flash API and target-definition migrations
- `DownloadOptions<'p>` and `FlashProgress<'p>` carry lifetimes so progress
reporting can borrow short-lived data. `ProgressEvent` uses unified phase
events that also cover flash content verification.
- `FlashProgress` wraps `FnMut`, can update captured state, and no longer
implements `Clone`. Flasher APIs take it by mutable reference (`&mut progress`).
- Replace `erase_sectors` with `flashing::erase`. Supply address ranges to
`flashing::erase` and `flashing::blank_check` when selecting the flash area.
- Library callers must supply `read_flasher_rtt` to
`probe_rs::flashing::{erase, erase_all, run_blank_check}` and can use
`FlashLoader::read_rtt_output` to read flash-loader RTT output.
- Replace ESP32-specific `pc_flash_size` in flash algorithm YAML with a
`FlashSize` entry in `vendor_functions`. `target-gen` extracts symbols such as
`VendorFunc_FlashSize` as vendor function entry points.
- Rename ARM target field `psel` to optional `targetsel`; set the device's
selector value when needed, for example `targetsel: 0x12345678`.
- NXP target names omit the redundant `NXP` prefix. Update names in commands
and configuration that used it.
```yaml
vendor_functions:
FlashSize: 0x100
```
## Configuration and flashing operations
Define named option sets in the probe-rs configuration file and select one with
`--preset my-board`. `cargo flash --preset my-board` and
`cargo embed --preset my-board` also load named presets; without an explicit
selection, their preset lookup falls back to `default` if defined.
Set `PROBE_RS_EMBED_CONFIG_FILE` to select a cargo-embed configuration file:
```sh
PROBE_RS_EMBED_CONFIG_FILE=config/board.toml cargo embed
```
- Use `--skip-section .my_section` on a flashing command to omit that section.
- Use `--prefer-flash-algorithm` to override the algorithm for a memory region.
- Pass `--chip-erase` to `cargo flash` to request a whole-chip erase.
- Set debugger `verifyBeforeFlashing` to check existing flash contents or
`verifyAfterFlashing` to verify the result. `cargo embed` honors
`preverify = true` in its flashing configuration.
- Use `--read-flasher-rtt` to collect flash-loader RTT output. The algorithm's
`rtt_poll_interval` defaults to 20 ms.
- Build `cargo-flash` with `remote` to flash through a remote probe-rs server;
pass the server address with `--host` and authentication token with `--token`.
- Use `idf-target-app-partition` to choose an ESP-IDF application partition;
`--idf-flash-freq` and `--idf-flash-mode` set image flash frequency and mode.
The default ESP32 bootloader supplied by espflash v4 requires an application
descriptor. For `esp-hal` firmware, add `esp_bootloader_esp_idf` and include
its application descriptor.
## Debugging, GDB, and profiling
| Task | Command or behavior |
| --- | --- |
| Short backtrace / YAML backtrace | `bt` / `bt yaml` |
| Inspect breakpoints or registers | `info break` / `info reg`; unreadable registers include their errors |
| Execute one instruction / reset | `step` / `reset` |
| Write a core or peripheral register | `wreg <name> <value>`; DAP Registers scope also writes core registers |
| Register-relative disassembly | `x/8i $lr` disassembles eight instructions at the link-register address |
| Source breakpoint location | `file:line[:column]`, for example `main.rs:42:5` |
| Launch GDB from its server command | `probe-rs gdb --gdb gdb-multiarch` |
| Program through the GDB server | Run `load` in GDB |
| Sample the program counter | `probe-rs profile` through the ARM DWT PCSR |
| Sample call stacks | `probe-rs profile callstack`; view with `samply` in Firefox Profiler |
Call-stack sampling can use DWARF information when frame pointers are unavailable.
The GDB server supports Xtensa, with stack unwinding when unwind information
is available, and exposes RISC-V FPU registers and floating-point width (`flen`).
After DAP `initialize`, other requests are ignored until `launch` or `attach`,
keeping the session open. Remote DAP supports a VS Code client on another host;
DWARF source paths are emitted verbatim. `stack_trace` RPC clients must decode
a structured response instead of the previous plain string.
## RTT, embedded tests, and semihosting
- `probe-rs debug` reads RTT output by default. Disable reads with `--no-rtt`,
or send `status` to down channel 0 with `rtt write 0 status`.
- `run` and `attach` show an input prompt when RTT down channels exist;
Ctrl+D cycles through them. `attach` and `dap-server` include the terminating
newline when sending a line to a down channel.
- `--target-output-file` in `run` and `attach` writes to a file or named pipe.
- `--no-timestamps` suppresses String and defmt timestamps in `run` and `attach`.
Per-channel `show_timestamps` also applies to String channels in DAP and
`cargo embed`.
- RTT flag and offset fields stay 32 bits wide on 64-bit targets.
- The embedded test runner accepts `--ignored` for ignored tests only and
`--include-ignored` for ignored and regular tests. probe-rs can read `embedded_test`
cases directly from ELF. Use console `test` with `embedded-test` firmware.
- The CLI accepts `--semihosting-file`; the debugger handles some semihosting
calls during a session. File opens that do not require write access preserve
existing contents.
- Firmware errors can cause a failure CLI exit status. Shutdown on `SIGTERM`
is graceful.
## Probe selection and target constraints
- For a probe without a serial number, keep the trailing colon in `VID:PID:`,
for example `1234:5678:`. Serialized `DebugProbeSelector` values are selector
strings such as `"0483:374b"`.
- FTDI `--probe VID:PID-INTERFACE` uses the suffix as the channel index;
`--probe 0403:6010-1` selects B, with indices 0 through 3 mapping to A through D.
- Use `--scan-chain` with `probe-rs info` for a manual chain override, or
`force_scan_chain: true` in target YAML JTAG configuration to use its chain
without auto-detection.
- CC2340R5 support requires a valid CCFG. Provision a blank device with UniFlash
before programming through probe-rs.
- Check a MIMXRT device's FlexRAM configuration to determine which of the
target definition's possible memory regions are accessible.
- Select `nRF5340_xxAA_APPONLY` to operate on the application core without
accessing or erasing the network core.
- Declare a 64-bit RISC-V core in target YAML with `type: riscv64`.
- Consult the target reference for initial support, device-specific flash
algorithms, unlock behavior, memory maps, and target-name migrations.