Skip to content

feat(nrf51): native nordicnrf51 platform support (BBC micro:bit) - #1955

Merged
zackees merged 1 commit into
mainfrom
feat/nordicnrf51
Nov 8, 2026
Merged

zackees merged 1 commit into
mainfrom
feat/nordicnrf51

Conversation

@zackees

@zackees zackees commented Nov 8, 2026

Copy link
Copy Markdown
Member

Adds native nordicnrf51 platform support (BBC micro:bit v1 / nRF51822), unblocking FastLED/FastLED#5119 (nRF51 has no build coverage because fbuild 2.5.51 reports unsupported platform: nordicnrf51).

Change

  • New fbuild-build-arm/src/nrf51/ module (Cortex-M0, -mcpu=cortex-m0 -mthumb, no FPU, no-SoftDevice nrf51_xxaa.ld), reusing the generic ARM compiler/linker like the LPC M0+ path. Separate from nRF52 because that path is tied to the Adafruit core (TinyUSB/FreeRTOS/SoftDevice).
  • New fbuild-library/src/library/nrf51_core.rs: checksum-pinned framework-arduinonordicnrf5 1.700.240108 (the version PlatformIO's nordicnrf51 platform pins).
  • Defines ARDUINO=10805 ARDUINO_ARCH_NRF5 NRF5 NRF51, board clock define (USE_LFRC for micro:bit; USE_LFXO default). -Wno-register for C++ (core CMSIS headers under C++17).
  • Platform enum/dispatch/shrink/lib_select/board-method wiring; fixture tests/platform/bbcmicrobit/.

Evidence

  • Fixture build with the dev binary (--clean): Flash 2.68KB / 256KB, RAM 232 B / 16KB, firmware.elf + firmware.hex produced.
  • A FastLED Blink build gets through toolchain/core/link setup and fails only inside FastLED's own nRF51 headers (fix(nrf51): platform does not compile; SPIOutput has no definition and no board covers it FastLED#5119, fixed separately).
  • bash test passes (incl. 12 new nrf51 unit tests); soldr cargo clippy --workspace --all-targets -- -D warnings and soldr cargo fmt --all clean; uv run --script lint exit 0.

Limits

  • No deploy / USB matching for nRF51 yet (build only).
  • No per-board workflow (no new workflow files by policy).
  • nrf51_core.rs is added to dylints/ban_std_pathbuf/src/allowlist.txt: the remaining PathBuf is forced by the shared Package::ensure_installed signature, as for every other package file.

Add Platform::NordicNrf51 and an nrf51 orchestrator that builds Arduino
sketches against sandeepmistry arduino-nRF5 (framework-arduinonordicnrf5
1.700.240108, platform-nordicnrf51's ~1.700.0 pin) on the shared
arm-none-eabi toolchain with the generic_arm compiler/linker:
Cortex-M0, no FPU, no-SoftDevice board ldscript (nrf51_xxaa.ld) from
SDK/components/toolchain/gcc, PIO nrf5.py include paths and defines
(ARDUINO=10805, ARDUINO_ARCH_NRF5, NRF5, NRF51, USE_LFXO default).

Adds tests/platform/bbcmicrobit fixture.
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant