NOTE: This plan assumes your micro:bit interface firmware has already been updated to v0258+ (or later); firmware upgrade steps are omitted.
Maintain the existing browser/MakeCode flash scripts while also offering a robust, one‑step Python‑in‑VSCode → flash experience—without manual firmware updates.
- Add a shell wrapper script (
scripts/flash_py.sh) that:- Runs
uflashon the specified.pyfile to generate a.hex(e.g., in./build/). - Copies the generated
.hexto the micro:bit mass‑storage drive (MICROBIT), then syncs and optionally unmounts, checking forFAIL.TXT.
- Runs
- Update the VS Code task in
.vscode/tasks.jsonto invoke this wrapper instead of rawuflash ${file}.
- Extend
CONFIGURATION.md/README.mdto document the new Python‑flash wrapper workflow step by step. - Include notes on failure‑mode detection (
FAIL.TXT) and point users toscripts/flash_dbg.shfor debugging.
- Review this plan.
- Implement
scripts/flash_py.sh, update.vscode/tasks.json, and enhance the docs accordingly.