{"record":{"id":"bc347d06aa46fc9c","repo":"zeroclaw-labs/zeroclaw","slug":"probe-rs-not-found-install-it-cargo-install-pr","errorCode":null,"errorMessage":"probe-rs not found. Install it:\n  cargo install probe-rs-tools --locked\n\nOr: curl -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh\n\nConnect Nucleo via USB (ST-Link). Then run this command again.","messagePattern":"probe-rs not found\\. Install it:\n  cargo install probe-rs-tools --locked\n\nOr: curl -LsSf https://github\\.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer\\.sh \\| sh\n\nConnect Nucleo via USB \\(ST-Link\\)\\. Then run this command again\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-hardware/src/peripherals/nucleo_flash.rs","lineNumber":24,"sourceCode":"use std::path::PathBuf;\nuse std::process::Command;\n\nconst CHIP: &str = \"STM32F401RETx\";\nconst TARGET: &str = \"thumbv7em-none-eabihf\";\n\n/// Check if probe-rs CLI is available (from probe-rs-tools).\npub fn probe_rs_available() -> bool {\n    Command::new(\"probe-rs\")\n        .arg(\"--version\")\n        .output()\n        .map(|o| o.status.success())\n        .unwrap_or(false)\n}\n\n/// Flash ZeroClaw Nucleo firmware. Builds from firmware/nucleo.\npub fn flash_nucleo_firmware() -> Result<()> {\n    if !probe_rs_available() {\n        anyhow::bail!(\n            \"probe-rs not found. Install it:\\n  cargo install probe-rs-tools --locked\\n\\n\\\n             Or: curl -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh\\n\\n\\\n             Connect Nucleo via USB (ST-Link). Then run this command again.\"\n        );\n    }\n\n    // CARGO_MANIFEST_DIR = repo root (zeroclaw's Cargo.toml)\n    let repo_root = PathBuf::from(env!(\"CARGO_MANIFEST_DIR\"));\n    let firmware_dir = repo_root.join(\"firmware\").join(\"nucleo\");\n    if !firmware_dir.join(\"Cargo.toml\").exists() {\n        anyhow::bail!(\n            \"Nucleo firmware not found at {}. Run from zeroclaw repo root.\",\n            firmware_dir.display()\n        );\n    }\n\n    println!(\"Building ZeroClaw Nucleo firmware...\");\n    let build = Command::new(\"cargo\")","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-hardware/src/peripherals/nucleo_flash.rs#L6-L42","documentation":"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).","triggerScenarios":"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`.","commonSituations":"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.","solutions":["Install the CLI: `cargo install probe-rs-tools --locked` (or run the installer script printed in the message)","Verify in the same environment that runs the flash: `probe-rs --version`","If installed but not found, ensure ~/.cargo/bin (or the script's install dir) is on PATH","Connect the Nucleo via USB (built-in ST-Link) before retrying"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if !probe_rs_available() {\n    anyhow::bail!(\"probe-rs CLI missing: run `cargo install probe-rs-tools --locked` first\");\n}\nflash_nucleo_firmware()?;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install probe-rs-tools as part of the machine/CI image setup","Verify with `probe-rs --version` in the same environment that runs the flash","Keep ~/.cargo/bin on PATH in service/CI shells"],"tags":["probe-rs","nucleo","toolchain","path","hardware-flashing"],"backgroundTag":"missing-required-tool","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}