diff --git a/docs/rust-port.md b/docs/rust-port.md index 295143c..318916c 100644 --- a/docs/rust-port.md +++ b/docs/rust-port.md @@ -82,11 +82,18 @@ this timeline against the wall clock. (`cargo build --lib --target thumbv8m.main-none-eabihf`) — the codec + scheduler are firmware-ready. ### Stage 3 — drivers (hardware) 🔧 IN PROGRESS (`rust/pm-kit/`) -**Milestone 1 (boot-proof) built:** `rust/pm-kit/` is a minimal RP2350 binary (rp235x-hal) that -blinks GP25 — compiles for the target and packs to `pm-kit.uf2` via `./rust/pm-kit/build.sh`. -Confirms toolchain + RP2350 boot block + flash before any drivers. Once it blinks on the Pico 2 -we add drivers (display first) and link `pm-core`. HAL choice (rp235x-hal vs embassy) finalizes -with the first real driver. +**✅ Milestone 1 (boot) — confirmed on Pico 2:** GP25 blink. Toolchain + RP2350 boot block + flash work. +**✅ Milestone 2 (display) — confirmed on Pico 2:** ST7796 320×480 over SPI0 via `rp235x-hal` + +`mipidsi` + `embedded-graphics`, drawing the shared `pm-ui`. Key fix: **hold CS low for the whole +session** (`NoCs`) — mipidsi toggles CS mid-command and the ST7796 needs it continuous (see +[[rust-st7796-cs-gotcha]]). Diagnosed off-bench with host tools in `rust/uisim`: `uisim` renders +pm-ui to PNG; `--bin panelsim` decodes mipidsi's real command/pixel stream into a PNG (proved the +protocol correct → bug was physical); `--bin initdump` dumps the init + CASET/RASET sequence. + +**Next:** real metronome UI in `pm-ui` (iterate in the simulator/emulator, no bench), then inputs +(buttons GP15/14, joystick GP26/27, GT911 touch on GP8/9), audio (piezo GP13), WS2812 (GP12), +USB-MIDI — then link `pm-core` (the track codec + scheduler, already `no_std` and tested). +HAL stays `rp235x-hal` for now (embassy can come later if async buys us enough). On `embassy` / `rp-hal`: - ST7789 240×320 display → `mipidsi` + `embedded-graphics` (mature; the parts are well-supported).