zeroclaw-labs/zeroclaw · error

probe-rs not found. Install it: cargo install probe-rs-too

Error message

probe-rs not found. Install it:
  cargo install probe-rs-tools --locked

Or: curl -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh

Connect Nucleo via USB (ST-Link). Then run this command again.

What it means

flash_nucleo_firmware first calls probe_rs_available(), which runs `probe-rs --version` and treats any spawn failure or non-zero exit as unavailable. This bail fires when the probe-rs CLI is missing from PATH or broken, and the message embeds both supported install commands plus the reminder to connect the Nucleo over USB (ST-Link).

Source

Thrown at crates/zeroclaw-hardware/src/peripherals/nucleo_flash.rs:24

use std::path::PathBuf;
use std::process::Command;

const CHIP: &str = "STM32F401RETx";
const TARGET: &str = "thumbv7em-none-eabihf";

/// Check if probe-rs CLI is available (from probe-rs-tools).
pub fn probe_rs_available() -> bool {
    Command::new("probe-rs")
        .arg("--version")
        .output()
        .map(|o| o.status.success())
        .unwrap_or(false)
}

/// Flash ZeroClaw Nucleo firmware. Builds from firmware/nucleo.
pub fn flash_nucleo_firmware() -> Result<()> {
    if !probe_rs_available() {
        anyhow::bail!(
            "probe-rs not found. Install it:\n  cargo install probe-rs-tools --locked\n\n\
             Or: curl -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh\n\n\
             Connect Nucleo via USB (ST-Link). Then run this command again."
        );
    }

    // CARGO_MANIFEST_DIR = repo root (zeroclaw's Cargo.toml)
    let repo_root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
    let firmware_dir = repo_root.join("firmware").join("nucleo");
    if !firmware_dir.join("Cargo.toml").exists() {
        anyhow::bail!(
            "Nucleo firmware not found at {}. Run from zeroclaw repo root.",
            firmware_dir.display()
        );
    }

    println!("Building ZeroClaw Nucleo firmware...");
    let build = Command::new("cargo")

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Install the CLI: `cargo install probe-rs-tools --locked` (or run the installer script printed in the message)
  2. Verify in the same environment that runs the flash: `probe-rs --version`
  3. If installed but not found, ensure ~/.cargo/bin (or the script's install dir) is on PATH
  4. Connect the Nucleo via USB (built-in ST-Link) before retrying
Defensive patterns

Strategy: validation

Validate before calling

if !probe_rs_available() {
    anyhow::bail!("probe-rs CLI missing: run `cargo install probe-rs-tools --locked` first");
}
flash_nucleo_firmware()?;

Prevention

When it happens

Trigger: Calling flash_nucleo_firmware() on a machine without the probe-rs CLI, with probe-rs installed but ~/.cargo/bin not on PATH, or with a stale/broken probe-rs binary that fails `probe-rs --version`.

Common situations: Fresh CI or container images without embedded toolchains; installing via the release script into a directory not on PATH; leftover shims after the probe-rs to probe-rs-tools packaging change.

Related errors


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/bc347d06aa46fc9c. Report an issue: GitHub.