Skip to content

feat(rp2040): build the real Arduino Mbed core - #1982

Merged
zackees merged 8 commits into
mainfrom
feat/rp2040-mbed-core
Nov 10, 2026
Merged

zackees merged 8 commits into
mainfrom
feat/rp2040-mbed-core

Conversation

@zackees

@zackees zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #1977. Build stock pico and nanorp2040connect selections with ArduinoCore-mbed rather than substituting Arduino-Pico or only rejecting the core. Explicit Earle Philhower selection remains on its existing builder; unknown core names fail at the boundary.

  • Replay the real variant compile, define, include and linker inputs and prebuilt libmbed.a.
  • Keep the SDK relative include recipe to avoid GCC option-environment overflow.
  • Resolve bundled Arduino libraries, preserve archive policy, and avoid downloading SPI/Wire as foreign dependencies.
  • Apply the canonical global/project compile overlays and unflags to standalone library commands.
  • Preserve the published RP Mbed full-newlib runtime; do not impose nano.specs.
  • Produce ELF and managed-picotool UF2 artifacts; clean-only never attempts conversion.
  • Update provisioning and add real dual-core acceptance, including SPI/Wire, foreign-library flag scopes, UF2 and clean-only behavior.

Real production path

This unblocks the required fbuild reproduction of FastLED/FastLED#5233. FastLED/FastLED#5240 separately fixes the real SDK API mismatches exposed by Mbed. A genuine WS2812B addLeds/show consumer now compiles and links on both Mbed 4.5.0 and Arduino-Pico 5.7.0; prior header-only fixtures were identified, disclosed and replaced before claiming that evidence.

Validation

  • Baseline checkout CLI/daemon reproduced the typed unsupported-Mbed failure.
  • Framework selector RED then GREEN; explicit Pico selection preserved.
  • Final RP2040 unit gate: 50 passed, 1 ignored.
  • Canonical workspace clippy --all-targets with warnings denied: passed.
  • CLI and daemon build: passed. All Rust commands used soldr.
  • Real Mbed empty sketch with ELF/UF2: passed.
  • Bundled SPI/Wire consumer: RED missing SPI.h, then GREEN.
  • Foreign dependency feature flag: RED lost caller define, then GREEN.
  • Runtime policy regression: RED unsolicited nano.specs, then GREEN.
  • Persistent ignored dual-core acceptance explicitly executed: 1 passed, 0 ignored, 69 filtered; includes caller/source flag separation and clean-only.
  • Genuine FastLED WS2812 consumer: Mbed 133,460 bytes flash / 41,276 bytes RAM; Arduino-Pico 359,300 bytes flash / 20,696 bytes RAM.
  • Broader bash test workspace unit gate is running and is not claimed complete yet.

Review and scope

Initial code review identified four gaps above; all corrected and covered by regression/real builds. Follow-up automated review hit an infrastructure bridge-capacity error; an independent read-only fbuild peer review has been requested. Hold merge until review is clear. ci-test coverage is applied at creation; no ci-full or new workflows.

No physical RP board, waveform, timing, or deployment measurement. Build support does not promise every consumer supports both SDKs. No release/tag/version bump is included. The USB lint-annotation experiment was reverted; there is no net unrelated USB change.

Coordinated with FastLED/FastLED#5240 and FastLED/FastLED#5233.

@zackees zackees added the ci-test Run extended CI tests beyond the routine minimal gate label Nov 10, 2026
@coderabbitai

coderabbitai Bot commented Nov 10, 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

@zackees

zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Final local gate update: broader bash test workspace unit run passed. The focused persistent real dual-core acceptance also actually executed and passed (1 test, no ignored test in that invocation), covering SPI/Wire, caller/source flag scope separation, managed UF2 and clean-only behavior. The four review fixes additionally have real RED/GREEN consumer evidence.

I investigated the remaining same-environment cache hypothesis with an actual no-clean Pico -> Mbed -> Pico sequence using the same source and environment. It passed without a production cache change: first and restored Pico ELF SHA256 both 23fcec9868729c780e1175891bad55a6061743587141359ab31b57c4d28f74f4; Mbed SHA256 b30747d8b1e2e3bd42b0d463f127b72c0a98fcf10c30b10e74cae40c8b0aab3b. The final Pico build relinked rather than taking an incorrect no-op shortcut. The shared pipeline rewrites compile_commands.json, which is part of the watched JSON input set, so the old Pico snapshot misses after the Mbed build. No stale-firmware failure was reproduced; I am not adding speculative cache invalidation.

The initial red coverage summaries belong to superseded cancelled run 42766090272. The replacement same-SHA run 42766090865 is the one whose final coverage must pass; no labels were toggled or manual workflow reruns requested.

@zackees

zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Review follow-up is now encoded in commit 4127498: the persistent ignored real-build acceptance also performs a no-clean same-environment Pico -> Mbed -> Pico sequence, asserts the middle ELF differs, and asserts the restored Pico ELF matches the first. It runs in the same test/runtime and compile backend as the existing dual-core acceptance.

That updated acceptance actually executed and passed (1 passed, 0 ignored, 69 filtered; 30.66s execution), followed by a passing canonical workspace all-target Clippy gate. This is characterization of the current safe behavior, not a claim that stale firmware was reproduced or that a production invalidation fix was added. The test documents the compile-database watch dependency so a future change cannot silently remove that protection.

Independent read-only review of the backend has no remaining blockers; initial review points about framework archive compile scopes and unflags were checked against the shared pipeline and withdrawn. Remaining hosted gates must pass at the new head before merging. No workflow reruns, label toggles, or protection bypasses requested.

@zackees

zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Pushed the real hosted Dylint repair in c8962e2. New Bundled/Prepared owned path fields and the helper interface use fbuild_core::path::NormalizedPath; conversions back to raw owned paths exist only at pre-existing compiler/pipeline API boundaries. No allowlist entry, lint exemption, threshold increase, or workflow change was added. Include discovery and shared compiler construction were factored into small private phases to retain the 100-line limit.

The repair passed the related RP2040 tests, canonical workspace Clippy, and the actual dual-core acceptance before this push. Independent read-only review found no conversion, ordering or lifetime errors.

Local custom-lint setup initially selected a stale global Soldr from the Rust bin directory (0.9.41 instead of the ordinary shell’s 0.9.52), failing driver preparation before checking project code. With the current global wrapper selected, preparation succeeded and the pinned lint-library build is still running. I do not claim local Dylint has passed yet. The required clean-runner Dylint gate remains authoritative and must pass at this repair head before merge. This source-fix push triggers normal validation; no workflow reruns or label changes were requested.

@zackees

zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

The normalized-path repair has now passed the actual local custom Dylint for fbuild-build-arm using the current global Soldr and the pinned nightly, in addition to 50 related tests, canonical workspace Clippy and the real dual-core acceptance.

The next hosted failure was confined to one acceptance-fixture literal at rp2040_acceptance.rs:143. Commit 68f295b replaces that raw directory spelling with FBUILD_DIR_NAME and BUILD_DIR_NAME; it preserves the same fixture location and adds no exemption. The acceptance-containing fbuild-build crate is now undergoing the warmed local custom-lint check too. Required hosted all-OS Dylint and other gates must still pass at the final head before merge.

@zackees
zackees added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit b42752c Nov 10, 2026
32 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-test Run extended CI tests beyond the routine minimal gate

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

RP2040: default Arduino Mbed configuration enters Arduino-Pico backend and fails with ENOENT

1 participant