Skip to content

fix(nrf52): unbreak xiaoblesense (no-suffix) — variant.h not found (fixes #2643) - #2644

Merged
zackees merged 2 commits into
masterfrom
fix/xiaoblesense-variant-not-found
May 31, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/xiaoblesense-variant-not-found

Conversation

@zackees

@zackees zackees commented May 31, 2026 •

Copy link
Copy Markdown
Member

Summary

Root cause

XIAOBLESENSE_NRF52 in ci/boards.py still pointed at the maxgerhardt nordicnrf52 platform with real_board_name="xiaoble_adafruit". Adafruit BSP 1.10601.0 ships no variants/xiaoble_adafruit/ directory, so the Adafruit core's #include "variant.h" (from Uart.h, delay.h) fails on every example.

cores/nRF5/Uart.h:27:10: fatal error: variant.h: No such file or directory
cores/nRF5/delay.h:28:10: fatal error: variant.h: No such file or directory

Failing run: 26700353359 on master @ 1d9a638.

Fix

Mirror XIAOBLESENSE_ADAFRUIT_NRF52 (PR #2636): point real_board_name at the shipped nrf52840_dk_adafruit variant, set the BSP package + framework, add TARGET_XIAOBLE_NRF52840_SENSE for the existing FastLED fastpin variant block, and include the same -fno-lto LTO workaround from PR #2642.

No FastLED source changes needed — the fastpin variant block is already in place from PR #2636 / #2638.

Test plan

Fixes #2643

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added manual workflow dispatch capability for nRF52 Xiaoblesense builds.
    • Updated nRF52 Xiaoblesense board configuration with platform package updates and compiler compatibility adjustments.

…dafruit variant

The `xiaoblesense` board (sister to `xiaoblesense_adafruit` fixed in
#2636) is built against the maxgerhardt nordicnrf52 platform pointing
at `real_board_name="xiaoble_adafruit"` — but the Adafruit BSP at
v1.10601.0 ships no `variants/xiaoble_adafruit/` directory, so the
Adafruit core's `#include "variant.h"` (transitively from `Uart.h`,
`delay.h`, ...) fails on every example:

  cores/nRF5/Uart.h:27:10: fatal error: variant.h: No such file
  cores/nRF5/delay.h:28:10: fatal error: variant.h: No such file

Same fix as PR #2636 for the sister board: switch to the stock
nordicnrf52 platform with `framework-arduinoadafruitnrf52@^1.10601.0`,
use `nrf52840_dk_adafruit` (whose variant directory IS shipped) as the
board JSON, and add `TARGET_XIAOBLE_NRF52840_SENSE` so the FastLED
fastpin variant block in
`src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h` (set up by
PR #2636) keeps the correct pin mapping. Also carries the same
arm-gnu 15.2.rel1 LTO workaround (PR #2642) — without it the same
LTO offset-overflow that hit xiaoblesense_adafruit would hit here.

Fixes #2643
@coderabbitai

coderabbitai Bot commented May 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3491065e-80b8-4c5e-9734-200571a1bcdd

📥 Commits

Reviewing files that changed from the base of the PR and between 47e95d8 and f599d18.

📒 Files selected for processing (2)
  • .github/workflows/build_nrf52_xiaoblesense.yml
  • ci/boards.py

📝 Walkthrough

Walkthrough

This PR fixes the failing nrf52_xiaoblesense build by updating the board definition to use the stock nrf52840_dk_adafruit variant on nordicnrf52 platform with pinned Adafruit nRF52 BSP, target defines, and LTO workaround. A workflow dispatch trigger is added to enable manual testing of the build.

Changes

XIAOBLESENSE_NRF52 Build Fix

Layer / File(s) Summary
Board definition update to nrf52840_dk_adafruit variant
ci/boards.py
XIAOBLESENSE_NRF52 board mapping changed from custom xiaoble_adafruit variant to stock nrf52840_dk_adafruit variant on nordicnrf52 platform; framework-arduinoadafruitnrf52 package pinned; TARGET_XIAOBLE_NRF52840_SENSE and FASTLED_USE_COMPILE_TESTS=0 defines added; board_build_core="nRF5" set; -flto disabled via build_unflags/build_flags LTO workaround.
Workflow dispatch trigger for manual testing
.github/workflows/build_nrf52_xiaoblesense.yml
workflow_dispatch event added to allow manual runs of the nrf52 xiaoblesense build workflow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • FastLED/FastLED#2643: Main issue describing the variant.h not-found error and the fix applied in this PR.
  • FastLED/FastLED#2641: Board-variant and LTO-workaround configuration pattern that this PR implements.

Possibly related PRs

  • FastLED/FastLED#2636: Sister board fix that applied the same nrf52840_dk_adafruit/nordicnrf52 mapping and TARGET_XIAOBLE_NRF52840_SENSE approach to XIAOBLESENSE_ADAFRUIT.
  • FastLED/FastLED#2638: Defines the TARGET_XIAOBLE_NRF52840_SENSE guard in fastpin_arm_nrf52_variants.h that this PR's board define now activates.

Poem

🐰 A little board was lost in variant mist,
Till nrf52840 variant fix was grist,
With Adafruit's BSP now pinned just right,
And workflow dispatch for manual test flight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references the issue being fixed (#2643) and clearly describes the primary change: fixing xiaoblesense variant.h not found error.
Linked Issues check ✅ Passed The PR addresses all coding requirements from #2643: repoints XIAOBLESENSE_NRF52 to nrf52840_dk_adafruit, uses nordicnrf52 platform, adds TARGET_XIAOBLE_NRF52840_SENSE define, disables compile tests, applies LTO workaround, and enables workflow dispatch.
Out of Scope Changes check ✅ Passed Both changes are in scope: ci/boards.py fixes the xiaoblesense board configuration per #2643, and the workflow change enables manual CI dispatch for verification, both directly supporting the fix objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/xiaoblesense-variant-not-found

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.

…fication

Allows the workflow to be dispatched against feature branches via
`gh workflow run` so the xiaoblesense build can be verified on Linux CI
before merge. Without this, the workflow only fires on push to master,
which means PRs can't pre-verify and bugs land before CI catches them.

No behavioral change for existing master pushes.
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.

nrf52_xiaoblesense build red: variant.h not found (sister-board to #2634)

1 participant