Skip to content

fix(board-db): emit build_info.json + CMSIS-DSP auto-link + extra_flags sweep#307

Open
zackees wants to merge 1 commit into
mainfrom
fix/enrich-extra-flags-broad
Open

fix(board-db): emit build_info.json + CMSIS-DSP auto-link + extra_flags sweep#307
zackees wants to merge 1 commit into
mainfrom
fix/enrich-extra-flags-broad

Conversation

@zackees
Copy link
Copy Markdown
Member

@zackees zackees commented May 30, 2026

Summary

Bundles three closely-related fbuild gaps that each broke FastLED CI on its own. Each is a self-contained change but they share BoardConfig plumbing — much easier to land as one diff than three separate PRs.

1. #297pio project metadata --json-output emitter

New fbuild_build::build_info module (crates/fbuild-build/src/build_info.rs) emits a PIO-compatible build_info_<example>.json under <project>/.build/pio/<board>/. Gated on --emit-build-info CLI flag and BuildParams::emit_build_info. Wired into the AVR orchestrator (other orchestrators follow in a follow-up PR; the AVR coverage already addresses the check_uno_size + attiny85_binary_size workflows).

Mirrors the JSON layout that FastLED's ci/compiled_size.py + ci/inspect_*.py + ci/symbol_analysis_runner.py already probe via _find_build_info(), so the size-check pipeline can drop the --backend=platformio workaround (FastLED #2591) for AVR builds once the fbuild floor moves.

2. #300 — Teensyduino CMSIS-DSP auto-link

New BoardConfig::cmsis_dsp_lib: Option<String> field, populated from board JSON build.cmsis_dsp_lib. TeensyLinker appends -l<lib> to the link command line when set. Per-MCU values populated for the 8 Teensyduino-shipped variants:

Boards Library
teensy30 / teensy31 arm_cortexM4l_math
teensy35 / teensy36 arm_cortexM4lf_math
teensy40 / teensy41 / teensymm arm_cortexM7lfsp_math
teensylc arm_cortexM0l_math

Mirrors PlatformIO+Teensyduino's SCons-based per-MCU auto-link. Unblocks FastLED teensy36 workflow's Ports/PJRCSpectrumAnalyzer (currently fails: undefined refs arm_cfft_radix4_q15 / arm_cfft_radix4_init_q15). Tested via new teensy_boards_carry_cmsis_dsp_lib integration test that asserts each board's BoardConfig.cmsis_dsp_lib is populated.

3. #298build.extra_flags broad sweep

New ci/enrich_extra_flags.py walks every bundled board JSON, fetches the upstream PIO board JSON from a small set of priority sources (platformio + maxgerhardt forks), and patches build.extra_flags where missing. Never overwrites existing values.

68 boards gained their Arduino board-detection macros: full nRF52 family beyond what #299 covered (xiaoble_adafruit, xiaoblesense_adafruit, etc.), full adafruit SAMD51/M0/M4 line, full Sparkfun nRF52 line, etc. The script is preserved at ci/enrich_extra_flags.py for future re-runs.

Test plan

  • cargo check -p fbuild-build clean.
  • cargo test -p fbuild-build --lib — 551/551 (was 550/550; +1 for the new CMSIS-DSP integration test).
  • cargo test -p fbuild-config --lib — 133/133.
  • CI revival on FastLED side:
    • teensy36 once teensyduino auto-link kicks in
    • Size workflows can drop --backend=platformio workaround
    • 68 boards no longer fall through their "Unknown variant" header fallback

Follow-ups

Refs #297, #298, #300

Generated with Claude Code (https://claude.com/claude-code)

…gs sweep

Bundles three closely-related fbuild gaps that each broke FastLED CI on
its own:

1) #297 — `pio project metadata --json-output` emitter
   New `fbuild_build::build_info` module emits a PIO-compatible
   `build_info_<example>.json` under `<project>/.build/pio/<board>/`.
   Gated on `--emit-build-info` CLI flag (and `BuildParams::emit_build_info`).
   Wired into the AVR orchestrator. Mirrors the JSON layout FastLED's
   `ci/compiled_size.py` + `ci/inspect_*.py` already probe via
   `_find_build_info()`, so the size-check pipeline can drop the
   `--backend=platformio` workaround (FastLED#2591) once the floor moves.

2) #300 — Teensyduino CMSIS-DSP auto-link
   New `BoardConfig::cmsis_dsp_lib` field (Option<String>), populated
   from board JSON `build.cmsis_dsp_lib`. `TeensyLinker` appends
   `-l<lib>` to the link command when set. Populated for the 8
   Teensyduino-shipped variants:

     teensy30 / teensy31         -> arm_cortexM4l_math
     teensy35 / teensy36         -> arm_cortexM4lf_math
     teensy40 / teensy41 / teensymm -> arm_cortexM7lfsp_math
     teensylc                    -> arm_cortexM0l_math

   Unblocks FastLED `teensy36` workflow's `Ports/PJRCSpectrumAnalyzer`
   example (undefined refs `arm_cfft_radix4_q15` /
   `arm_cfft_radix4_init_q15`).

3) #298 — `build.extra_flags` broad sweep
   New `ci/enrich_extra_flags.py` walks the bundled JSONs, fetches
   upstream PIO board JSONs (platformio + maxgerhardt forks) and
   patches missing `build.extra_flags`. 68 boards gained Arduino
   board-detection macros they were missing (full nRF52 family,
   adafruit SAMD51/M0/M4 line, etc.).

All 551 `fbuild-build` lib tests pass; all 133 `fbuild-config` lib
tests pass (688 total). Existing PRs #294 / #299 / #302 contribute
the immediate FastLED unblocks; this PR is the broader generic fix.

Refs #297, #298, #300
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Warning

Review limit reached

@zackees, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 39 minutes and 52 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dafc903f-8717-4f89-99f2-5ad8571f161f

📥 Commits

Reviewing files that changed from the base of the PR and between 57ce6af and 8071487.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (115)
  • ci/enrich_extra_flags.py
  • crates/fbuild-build/src/avr/avr_linker.rs
  • crates/fbuild-build/src/avr/orchestrator.rs
  • crates/fbuild-build/src/build_info.rs
  • crates/fbuild-build/src/compile_many.rs
  • crates/fbuild-build/src/esp32/esp32_linker.rs
  • crates/fbuild-build/src/esp32/orchestrator/build.rs
  • crates/fbuild-build/src/generic_arm/arm_linker.rs
  • crates/fbuild-build/src/lib.rs
  • crates/fbuild-build/src/linker.rs
  • crates/fbuild-build/src/stm32/orchestrator/mod.rs
  • crates/fbuild-build/src/teensy/configs/teensy4x.json
  • crates/fbuild-build/src/teensy/mcu_config.rs
  • crates/fbuild-build/src/teensy/orchestrator.rs
  • crates/fbuild-build/src/teensy/teensy_linker.rs
  • crates/fbuild-build/tests/avr_build.rs
  • crates/fbuild-build/tests/eh_frame_strip_esp32.rs
  • crates/fbuild-build/tests/esp32_build.rs
  • crates/fbuild-build/tests/stm32_acceptance.rs
  • crates/fbuild-build/tests/teensy30_acceptance.rs
  • crates/fbuild-build/tests/teensy_build.rs
  • crates/fbuild-build/tests/teensylc_acceptance.rs
  • crates/fbuild-cli/src/cli/args.rs
  • crates/fbuild-cli/src/cli/build.rs
  • crates/fbuild-cli/src/cli/clang_tools.rs
  • crates/fbuild-cli/src/cli/dispatch.rs
  • crates/fbuild-cli/src/daemon_client.rs
  • crates/fbuild-cli/src/mcp/tools.rs
  • crates/fbuild-config/assets/boards/json/Sinobit.json
  • crates/fbuild-config/assets/boards/json/genuino101.json
  • crates/fbuild-config/assets/boards/json/hackaBLE.json
  • crates/fbuild-config/assets/boards/json/minitronics20.json
  • crates/fbuild-config/assets/boards/json/mkr1000USB.json
  • crates/fbuild-config/assets/boards/json/mkrfox1200.json
  • crates/fbuild-config/assets/boards/json/mkrgsm1400.json
  • crates/fbuild-config/assets/boards/json/mkrnb1500.json
  • crates/fbuild-config/assets/boards/json/mkrvidor4000.json
  • crates/fbuild-config/assets/boards/json/mkrwan1300.json
  • crates/fbuild-config/assets/boards/json/mkrwan1310.json
  • crates/fbuild-config/assets/boards/json/mkrwifi1010.json
  • crates/fbuild-config/assets/boards/json/mkrzero.json
  • crates/fbuild-config/assets/boards/json/moteino_zero.json
  • crates/fbuild-config/assets/boards/json/mzeroUSB.json
  • crates/fbuild-config/assets/boards/json/mzeropro.json
  • crates/fbuild-config/assets/boards/json/mzeroproUSB.json
  • crates/fbuild-config/assets/boards/json/nano33ble.json
  • crates/fbuild-config/assets/boards/json/nano_33_iot.json
  • crates/fbuild-config/assets/boards/json/nano_r4.json
  • crates/fbuild-config/assets/boards/json/ng_beacon.json
  • crates/fbuild-config/assets/boards/json/nicla_sense_me.json
  • crates/fbuild-config/assets/boards/json/nrf51_beacon.json
  • crates/fbuild-config/assets/boards/json/nrf51_dk.json
  • crates/fbuild-config/assets/boards/json/nrf51_dongle.json
  • crates/fbuild-config/assets/boards/json/nrf52_dk.json
  • crates/fbuild-config/assets/boards/json/oshchip.json
  • crates/fbuild-config/assets/boards/json/particle_xenon.json
  • crates/fbuild-config/assets/boards/json/portenta_c33.json
  • crates/fbuild-config/assets/boards/json/raytac_mdbt50q_rx.json
  • crates/fbuild-config/assets/boards/json/redBearLab.json
  • crates/fbuild-config/assets/boards/json/redBearLabBLENano.json
  • crates/fbuild-config/assets/boards/json/redbear_blenano2.json
  • crates/fbuild-config/assets/boards/json/redbear_blend2.json
  • crates/fbuild-config/assets/boards/json/sainSmartDue.json
  • crates/fbuild-config/assets/boards/json/sainSmartDueUSB.json
  • crates/fbuild-config/assets/boards/json/samd21g18a.json
  • crates/fbuild-config/assets/boards/json/sdt52832b.json
  • crates/fbuild-config/assets/boards/json/seeedTinyBLE.json
  • crates/fbuild-config/assets/boards/json/seeed_femto.json
  • crates/fbuild-config/assets/boards/json/seeed_wio_lite_mg126.json
  • crates/fbuild-config/assets/boards/json/seeed_wio_terminal.json
  • crates/fbuild-config/assets/boards/json/seeed_xiao.json
  • crates/fbuild-config/assets/boards/json/seeed_zero.json
  • crates/fbuild-config/assets/boards/json/seeeduino_lorawan.json
  • crates/fbuild-config/assets/boards/json/sodaq_autonomo.json
  • crates/fbuild-config/assets/boards/json/sodaq_explorer.json
  • crates/fbuild-config/assets/boards/json/sodaq_one.json
  • crates/fbuild-config/assets/boards/json/sodaq_sara.json
  • crates/fbuild-config/assets/boards/json/sodaq_sff.json
  • crates/fbuild-config/assets/boards/json/sparkfun_qwiic_micro_samd21e.json
  • crates/fbuild-config/assets/boards/json/sparkfun_redboard_turbo.json
  • crates/fbuild-config/assets/boards/json/sparkfun_samd21_9dof.json
  • crates/fbuild-config/assets/boards/json/sparkfun_samd21_dev_usb.json
  • crates/fbuild-config/assets/boards/json/sparkfun_samd21_mini_usb.json
  • crates/fbuild-config/assets/boards/json/sparkfun_samd21_proRF.json
  • crates/fbuild-config/assets/boards/json/sparkfun_samd51_micromod.json
  • crates/fbuild-config/assets/boards/json/sparkfun_samd51_thing_plus.json
  • crates/fbuild-config/assets/boards/json/stct_nrf52_minidev.json
  • crates/fbuild-config/assets/boards/json/teensy30.json
  • crates/fbuild-config/assets/boards/json/teensy31.json
  • crates/fbuild-config/assets/boards/json/teensy35.json
  • crates/fbuild-config/assets/boards/json/teensy36.json
  • crates/fbuild-config/assets/boards/json/teensy40.json
  • crates/fbuild-config/assets/boards/json/teensy41.json
  • crates/fbuild-config/assets/boards/json/teensylc.json
  • crates/fbuild-config/assets/boards/json/teensymm.json
  • crates/fbuild-config/assets/boards/json/tian.json
  • crates/fbuild-config/assets/boards/json/tuinozero96.json
  • crates/fbuild-config/assets/boards/json/ublox_evk_nina_b1.json
  • crates/fbuild-config/assets/boards/json/uno_r4_minima.json
  • crates/fbuild-config/assets/boards/json/waveshare_ble400.json
  • crates/fbuild-config/assets/boards/json/xiaoble_adafruit.json
  • crates/fbuild-config/assets/boards/json/xiaoblesense_adafruit.json
  • crates/fbuild-config/assets/boards/json/zero.json
  • crates/fbuild-config/assets/boards/json/zeroUSB.json
  • crates/fbuild-config/src/board/db.rs
  • crates/fbuild-config/src/board/loaders.rs
  • crates/fbuild-config/src/board/tests.rs
  • crates/fbuild-config/src/board/types.rs
  • crates/fbuild-daemon/src/handlers/emulator/select.rs
  • crates/fbuild-daemon/src/handlers/emulator/tests_process.rs
  • crates/fbuild-daemon/src/handlers/operations/build.rs
  • crates/fbuild-daemon/src/handlers/operations/deploy.rs
  • crates/fbuild-daemon/src/models.rs
  • crates/fbuild-python/Cargo.toml
  • crates/fbuild-python/src/daemon.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/enrich-extra-flags-broad

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant