> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# probe-rs

> Flash a board and read RTT output through a bench with probe-rs.

This page is for a board attached to a [bench](/docs/integrations/benches.md). Inlay runs probe-rs on the bench to program the board, whenever the bench target has a known MCU, and to capture RTT output from the firmware you just flashed.

If the board is attached to your own machine, this page doesn't apply. Put your probe-rs command in the project's flash command instead; see [Flashing firmware](/docs/debug-mode/flashing.md).

The probe-rs version installed on the bench must support the exact chip and debug probe. A board's presence in the hardware catalog doesn't establish that support.

## Prepare the bench

1. Set up the [bench](/docs/integrations/benches.md), then [choose it for the session](/docs/integrations/benches.md#use-a-bench-in-a-session).
2. Install probe-rs on the bench machine as your normal user, not as root, so the bench can find it:

   | Bench machine | Command |
   | - | - |
   | macOS | `brew install probe-rs-tools` |
   | Linux | `cargo install probe-rs-tools` |
   | Windows | `winget install probe-rs.probe-rs` |

   The bench must also have permission to access the USB probe.
3. Connect the probe to the target's reference voltage, ground, and the SWD or JTAG signals the board requires. Power the target as its board documentation describes.
4. Identify the exact chip and probe. List probes with `inlay bench exec <name> probe-rs list`, and check chip names with `inlay bench exec <name> probe-rs chip list`.
5. Build an ELF for that target and note its path in the project.

Check the bench from your computer:

```bash theme={"theme":"css-variables"}
inlay bench verify <name>
```

The **Flasher** line lists the flashing tools found, or `none installed` with a fix. Then ask Inlay to confirm the target:

```text theme={"theme":"css-variables"}
Check whether probe-rs on the selected bench supports this board's exact MCU
and can see the connected probe. Report the chip and probe before programming.
```

## Program and start the target

```text theme={"theme":"css-variables"}
Flash build/firmware.elf to the confirmed target on the selected bench.
Report whether programming and the final reset succeeded, then read boot output.
```

Replace the artifact path with your build output. Inlay asks you to approve the flash, unless your [approval settings](/docs/core-concepts/approvals.md) already allow it. It then uploads the artifact to the bench, programs it with probe-rs, and resets the target to start the firmware. Serial connections in the Monitor pause during programming and reconnect afterward.

Inlay picks the chip and probe like this:

| Situation | What to do |
| - | - |
| The bench has one saved board with an MCU | Nothing. Inlay uses that board. |
| The bench has several saved boards | Name the board or the chip in your request. |
| The bench has no saved board | Give the exact probe-rs chip name, such as `STM32F407VG` or `nRF52832_xxAA`. |
| Several probes can flash the chip | Give the probe as `VID:PID:Serial`, as `probe-rs list` shows it. A serial number on its own is not used to select a probe. |

After a successful flash with a chip you named, Inlay saves the board on the bench so later flash and RTT requests find it.

> [!WARNING]
>
> Programming replaces the firmware and changes the target's execution state. Don't substitute a similar MCU to get past an unsupported-chip error.

A successful download can still be followed by a failed reset. The result then ends with a warning that the firmware may not be running. Check it before you assume the application started.

When a board on a bench has no MCU but has an OpenOCD target and a supported debug interface, Inlay flashes it with OpenOCD instead. See [Flashing firmware](/docs/debug-mode/flashing.md#flash-through-a-bridge).

## Capture RTT after programming

The firmware must include RTT output. On a bench, Inlay reads RTT from the artifact you flashed through Inlay earlier in the same session, so flash the matching ELF first. Then request a bounded capture:

```text theme={"theme":"css-variables"}
Read RTT from the target just flashed on the selected bench for ten seconds.
Stop early if READY appears and report the captured output.
```

The capture ends at the time limit or when the stop text appears. The bench manages probe speed on this path, so a frequency you give is ignored.

If the current fault or RAM contents must be preserved, don't flash only to use this workflow. Use an existing [RTT connection](/docs/debug-mode/rtt.md) instead, or review the [debugger attachment precautions](/docs/debug-mode/gdb.md#attach-to-a-running-target).

## Choose debugging separately

For breakpoints, stepping, and memory inspection, use the [J-Link](/docs/debug-mode/jlink.md) or [OpenOCD](/docs/debug-mode/openocd.md) guide. Using probe-rs for bench flashing doesn't make it Inlay's debugger.

## Troubleshoot

* **probe-rs not installed:** `inlay bench verify` reports **Flasher** as `none installed`. Install probe-rs on the bench machine as your normal user, then run the check again.
* **Chip unsupported:** compare the exact chip name with `probe-rs chip list` on the bench.
* **No auto-detectable target:** the bench has no saved board. Give the exact chip name in your request.
* **Multiple probes or multiple targets:** give the intended probe as `VID:PID:Serial`, or name the board or chip.
* **Probe busy:** Inlay retries briefly when a previous command still holds the probe. A `device busy` result means another operation on the bench still holds that probe or board. Wait for it to finish, then retry.
* **Download succeeded but no boot:** check the reset result, target power, and the firmware's output transport.
* **RTT needs a flashed ELF:** nothing was flashed to this bench in the current session. Preserve any fault evidence before you decide to program.

See [Flashing firmware](/docs/debug-mode/flashing.md) for checking boot results and [Hardware scripts](/docs/debug-mode/hardware-scripts.md) for repeatable checks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.