micro:bit v2.2 bench

nRF52833 target only. Loader and serial, no DAPLink

about, scope, method

About this bench

A lab bench for one board: the BBC micro:bit v2.2 and its nRF52833. It boots real firmware built for flash zero and shows what the silicon would do — matrix, buttons, sensors, serial — with nothing simulated beyond the chip and its parts.

microbit-emu bench running the matrix proof: loader panel, strobing 5 by 5 LED slab, MATRIX:OK on the serial console
The bench running the matrix preset: loader, strobing slab, MATRIX:OK on the console.

What it is

The bench is two layers. The chip core is Rust compiled to WASM: Cortex-M4F plus every nRF52833 peripheral, timed off one instruction-count clock. The virtual board is JavaScript: the LED matrix, the LSM303 motion sensor, the OLED add-on, and the serial line. Firmware stages a transfer, the bench moves the bytes, then completes it — the same take/complete round trip for UARTE, TWIM, SAADC, PDM, USBD, NVMC, radio, I2S, NFCT, the crypto engines, and the BLE SVC jobs (GAP/GATTC/L2CAP staged, resolved over the Bumble air bridge or loopback, GATTS answered synchronously).

It boots MicroPython v2.1.2 to a banner and a live REPL prompt (P116+P117: banner wall time is machine-paced, print(1+2) → 3 in-browser, zero faults — the pre-P116 0x200021B8 park was pump starvation in ad-hoc probes, not a model gap) plus the stock radio API over bare metal (import radio, on(), send('ping') stages a real RADIO TX job — P144 test:mpy-radio; receive() RX leg parked, see STATUS), runs MakeCode arrow/smiley/heart/plot presets lit on the matrix (P158–P160: user programs run and render; scroll/rotation run then take post-render firmware unwind faults — see STATUS), and passes twenty-one GCC-built firmware proofs (C + C++ BLE faces + matrix sweep included) plus the parts smoke test, the handshake run (18/18), the MPY/JS/PY-idiom + TypeScript BLE/RADIO faces, and live BLE-over-air checks (42/42). Suite reads 274 green.

What it is not

How to read a run

  1. Stage firmware and press Run; the status line names the vector table it booted.
  2. Watch the matrix and the console together — a toggling latch on an input pin stays dark, exactly as on silicon.
  3. Press A or B, tilt or shake the sensor, type into the console; each answers through the same peripheral path real firmware uses.
  4. If the core faults, the status line names the program counter and opcode. Nothing fails quietly here.

Docs and method

The docs page holds the run recipes and both support matrices — board hardware and chip peripherals, each with what works, what is left, and why. Firmware proofs rebuild with the GCC flags in docs/README.md; the C recipe is verified bit-identical. The JS driver contract is frozen as v1 in demo/API.md.