First per-board binary. rust/pm-kit/ is a minimal rp235x-hal firmware that blinks GP25 on the Pico 2 — proves the toolchain, RP2350 boot block (ImageDef), memory layout, and flash before we add any drivers. - src/main.rs + memory.x + build.rs + .cargo/config.toml: rp235x-hal blink, builds for thumbv8m.main-none-eabihf. - build.sh + uf2.py: one command builds the ELF in the container, objcopies to a raw image, and packs pm-kit.uf2 (rp2350-arm-s family). Drag onto the Pico 2 in BOOTSEL. Verified: builds clean; produces a valid 6-block UF2. Runtime (does it blink?) is the on-device check. Next: drivers (display first) + link pm-core. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
16 lines
512 B
Rust
16 lines
512 B
Rust
//! Put `memory.x` on the linker search path (cortex-m-rt's link.x INCLUDEs it).
|
|
use std::env;
|
|
use std::fs::File;
|
|
use std::io::Write;
|
|
use std::path::PathBuf;
|
|
|
|
fn main() {
|
|
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
|
|
File::create(out.join("memory.x"))
|
|
.unwrap()
|
|
.write_all(include_bytes!("memory.x"))
|
|
.unwrap();
|
|
println!("cargo:rustc-link-search={}", out.display());
|
|
println!("cargo:rerun-if-changed=memory.x");
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
}
|