Repository navigation
Description
Symptom
CI job build_xiaoblesense_adafruit red on master, reproduces locally with bash compile xiaoblesense_adafruit --examples Blink:
```
.../dl-framework-arduinoadafruitnrf52-1.10601.0/.../cores/nRF5/delay.h:28:10: fatal error: variant.h: No such file or directory
28 | #include "variant.h"
| ^~~~~~~~~~~
```
(Also surfaces on Uart.h / WInterrupts.c — anything in the Adafruit nRF5 core path that pulls in `variant.h` via `Arduino.h`.)
Root cause
The current `XIAOBLESENSE_ADAFRUIT_NRF52` board entry in `ci/boards.py` uses the upstream `https://github.com/maxgerhardt/platform-nordicnrf52\` platform package and the `framework-arduinoadafruitnrf52@^1.10601.0` Arduino framework. The Adafruit nRF52 BSP at 1.10601.0 does NOT ship a `xiaoblesense_adafruit` (or `Seeed_XIAO_nRF52840_Sense`) variant — the BSP variants folder only contains Adafruit's own boards (`feather_nrf52840_*`, `clue_nrf52840`, `itsybitsy_nrf52840_express`, `metro_nrf52840_express`, `pca10056`, etc.). Verified by listing `variants/` in the cached framework dir.
So the maxgerhardt board JSON points `build.variant` at a variant directory that doesn't exist, the Adafruit core source includes `variant.h`, the compile dies.
Proposed fix
Mirror the SuperMini / nice!nano / nRFMicro pattern from `ci/boards.py` (#2422 / commit 1a62b13):
- 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 `TARGET_XIAOBLE_NRF52840_SENSE` define (or reuse `ARDUINO_Seeed_XIAO_nRF52840_Sense`) so the existing XIAO BLE Sense fastpin variant block in `src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h` (line 830) selects the correct pin mapping for the Seeed XIAO physical layout.
This unblocks CI immediately and keeps the FastLED-side pin mapping correct. Same approach applied to the `xiaoblesense_adafrui` typo-alias and (optionally) the `xiaoblesense` board entry.
Verification plan
- `bash compile xiaoblesense_adafruit --examples Blink` succeeds locally.
- CI `build_xiaoblesense_adafruit` and `adafruit_xiaoblesense` workflows go green.
- Spot-check that the existing fastpin variant block stays active by grepping for the TARGET define / ARDUINO_ define in the build flag dump.
Activity
fix(nrf52): defer PCA10056 pin map for TARGET_XIAOBLE_NRF52840_SENSE (#…
ci(nrf52): disable LTO on xiaoblesense_adafruit to dodge arm-gnu 15.2…
fix(nrf52): unbreak xiaoblesense_adafruit by reusing nrf52840_dk_adaf…