Repository navigation
fix(nrf52): unbreak xiaoblesense_adafruit by reusing nrf52840_dk_adafruit variant - #2636
Conversation
…ruit variant CI job `build_xiaoblesense_adafruit` red on master with: cores/nRF5/delay.h:28:10: fatal error: variant.h: No such file or directory Root cause: the previous `XIAOBLESENSE_ADAFRUIT_NRF52` board entry pointed at the `https://github.com/maxgerhardt/platform-nordicnrf52` platform fork, whose `xiaoblesense_adafruit` board JSON sets `build.variant` at a variant directory that does NOT ship in `framework-arduinoadafruitnrf52` 1.10601.0. The Adafruit BSP variants folder only contains Adafruit's own boards (feather/clue/itsybitsy/metro/pca10056) plus a couple of community ones — no Seeed XIAO. Mirror the SuperMini / nice!nano / nRFMicro pattern from #2422: - Switch `platform` to stock `nordicnrf52`. - Keep `framework-arduinoadafruitnrf52@^1.10601.0`. - Set `real_board_name="nrf52840_dk_adafruit"` so the BSP picks a variant that actually exists. - Add a new `TARGET_XIAOBLE_NRF52840_SENSE` define and have the existing fastpin variant block (`ARDUINO_Seeed_XIAO_nRF52840_Sense`) in `src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h` also fire on that target so the FastLED pin mapping for the Seeed XIAO BLE Sense physical layout stays correct without depending on the Seeed variant folder being present in the framework package. Applied to both `xiaoblesense_adafruit` and the `xiaoblesense_adafrui` typo-alias. Closes #2634 Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughUpdated CI board definitions for Seeed XIAO BLE Sense nRF52840 to use the nordicnrf52 platform with Adafruit nRF52 BSP and an explicit TARGET define, and extended code-side FastPin variant selection to recognize this define so correct pin mapping is selected when the Seeed variant folder is absent. ChangesnRF52 XIAO BLE Sense Platform Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
…2638) Follow-up to #2636. After switching `xiaoblesense_adafruit` to reuse the `nrf52840_dk_adafruit` BSP variant (which defines `ARDUINO_NRF52840_PCA10056`), the master post-merge build failed with "#error Cannot define more than one board at a time": both the PCA10056 pin map block and the new TARGET_XIAOBLE block fired. Same shape as PR #2627 fixed for SuperMini / nice!nano / nRFMicro. Add `TARGET_XIAOBLE_NRF52840_SENSE` to the `__FASTLED_NRF52_USER_TARGET_OVERRIDE` OR-chain at the top of `fastpin_arm_nrf52_variants.h` so the PCA10056 block stands down when the XIAO target is set. Refs #2634 (#2636 post-merge run 26700041082). Co-authored-by: Claude Opus 4.7 <[email protected]>
… LTO bug (#2642) Post-#2636 / #2638 post-merge build still fails — but now on a pre-existing toolchain bug, not on the variant.h issue this PR addressed. arm-gnu-toolchain 15.2.rel1 + Adafruit nRF52 BSP + LTO emits thousands of "offset out of range" assembler errors in the LTO-temp output: .lto-tmp/ccXXXXXX.s:13834: Error: offset out of range lto-wrapper: fatal error: arm-none-eabi-gcc returned 1 exit status collect2: error: ld returned 1 exit status Affects xiaoblesense_adafruit, supermini_nrf52840, and likely the other nRF52840 Adafruit-BSP boards. Tracked separately in #2641. CI-unblock: add `build_unflags=[-flto]` + `build_flags=[-fno-lto]` to the xiaoblesense_adafruit board entries so this board's CI goes green now. Other affected boards can adopt the same workaround once verified. Refs #2634 (variant.h), #2636 (variant fix), #2638 (PCA10056 guard), #2641 (LTO toolchain bug). Co-authored-by: Claude Opus 4.7 <[email protected]>
#2655) xiaoblesense_adafruit post-merge run 26700835813 succeeded at every compile step (all 65 example builds green — the variant.h / PCA10056 / LTO fixes from #2636 / #2638 / #2642 all worked) but the runner was killed 37 minutes after the last log line during the Optimization Report step (`uv run ci/optimization_report.py --first`). Both Symbol Analysis and Optimization Report are post-build analysis steps already marked `continue-on-error: true`, so they should never turn a green build red. A 5-minute `timeout-minutes` cap keeps them from hanging the entire job when a downstream script (e.g. fbuild vs PIO artifact-path divergence — readelf/nm/objdump returned exit 1 on the firmware.elf earlier in the same run) gets stuck in a wait loop. The build itself still passes; the report is just skipped for that run. Filed the underlying optimization_report.py / symbol_analysis_runner.py fbuild-path bug separately for proper investigation. Refs #2641. Co-authored-by: Claude Opus 4.7 <[email protected]>
Summary
Unblock CI job
build_xiaoblesense_adafruit(and itsadafruit_xiaoblesenseworkflow). The board was usinghttps://github.com/maxgerhardt/platform-nordicnrf52, whosexiaoblesense_adafruitboard JSON references abuild.variantdirectory that the Adafruit nRF52 BSP at 1.10601.0 doesn't ship.XIAOBLESENSE_ADAFRUIT_NRF52(and its typo-alias) to the stocknordicnrf52platform withframework-arduinoadafruitnrf52@^1.10601.0andreal_board_name="nrf52840_dk_adafruit"— a board JSON whose variant actually exists in the framework package.TARGET_XIAOBLE_NRF52840_SENSEdefine so the existing Seeed XIAO BLE Sense fastpin variant block insrc/platforms/arm/nrf52/fastpin_arm_nrf52_variants.hfires regardless of which BSP variant directory providedArduino.h— keeping the FastLED-side pin mapping correct for the actual XIAO physical layout.Same shape as the SuperMini / nice!nano / nRFMicro fixes from #2422 / commit 1a62b13.
Closes #2634.
Failing run before fix
https://github.com/FastLED/FastLED/actions/runs/26698725759/job/78687852124 —
delay.h:28:10: fatal error: variant.h: No such file or directory.Test plan
bash compile xiaoblesense_adafruit --examples Blinksucceeds on Linux CI (Windows local hits a separate Adafruit BSPARDUINO_BSP_VERSIONquote-stripping bug in fbuild — out of scope here, affects all Adafruit-BSP nRF52 boards on Windows).build_xiaoblesense_adafruitandadafruit_xiaoblesenseworkflows go green.ARDUINO_Seeed_XIAO_nRF52840_Sense-keyed variant block continues to work unchanged for users compiling against a BSP that ships the Seeed variant directly.🤖 Generated with Claude Code
Summary by CodeRabbit