{"record":{"id":"f644a7c7fd682194","repo":"zeroclaw-labs/zeroclaw","slug":"bundled-uf2-is-a-placeholder-download-the-real-m","errorCode":null,"errorMessage":"Bundled UF2 is a placeholder — download the real MicroPython UF2 from https://micropython.org/download/RPI_PICO/ and place it at src/firmware/pico/zeroclaw-pico.uf2, then rebuild ZeroClaw.","messagePattern":"Bundled UF2 is a placeholder — download the real MicroPython UF2 from https://micropython\\.org/download/RPI_PICO/ and place it at src/firmware/pico/zeroclaw-pico\\.uf2, then rebuild ZeroClaw\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-hardware/src/uf2.rs","lineNumber":67,"sourceCode":"            ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Fail)\n                .with_outcome(::zeroclaw_log::EventOutcome::Failure),\n            \"cannot determine the user home directory\"\n        );\n        anyhow::Error::msg(\"cannot determine home directory\")\n    })?;\n\n    let firmware_dir = base\n        .home_dir()\n        .join(\".zeroclaw\")\n        .join(\"firmware\")\n        .join(\"pico\");\n    std::fs::create_dir_all(&firmware_dir)?;\n\n    // UF2 — validate magic before writing so a broken stub is caught early.\n    let uf2_path = firmware_dir.join(\"zeroclaw-pico.uf2\");\n    if !uf2_path.exists() {\n        if PICO_UF2.len() < 8 || PICO_UF2[..4] != UF2_MAGIC1 {\n            bail!(\n                \"Bundled UF2 is a placeholder — download the real MicroPython UF2 from \\\n                 https://micropython.org/download/RPI_PICO/ and place it at \\\n                 src/firmware/pico/zeroclaw-pico.uf2, then rebuild ZeroClaw.\"\n            );\n        }\n        std::fs::write(&uf2_path, PICO_UF2)?;\n        ::zeroclaw_log::record!(\n            INFO,\n            ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Note)\n                .with_attrs(::serde_json::json!({\"path\": uf2_path.display().to_string()})),\n            \"extracted bundled UF2\"\n        );\n    }\n\n    Ok(firmware_dir)\n}\n\n// ── Flashing ──────────────────────────────────────────────────────────────────","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-hardware/src/uf2.rs#L49-L85","documentation":"Error \"Bundled UF2 is a placeholder — download the real MicroPython UF2 from https://micropython.org/download/RPI_PICO/ and place it at src/firmware/pico/zeroclaw-pico.uf2, then rebuild ZeroClaw.\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-hardware/src/uf2.rs:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Download the real MicroPython UF2 from https://micropython.org/download/RPI_PICO/, place it at src/firmware/pico/zeroclaw-pico.uf2, and rebuild ZeroClaw."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}