Symptom
For many boards in crates/fbuild-config/assets/boards/json/, the build.extra_flags field is empty/missing — even though the upstream PlatformIO board JSON sets it.
Concrete repro from current master FastLED CI:
| fbuild bundle |
fbuild's build.extra_flags |
Upstream PIO build.extra_flags |
nrf52840_dk.json |
(missing) |
-DARDUINO_NRF52_DK |
nrf52840_dk_adafruit.json |
(missing) |
-DARDUINO_NRF52840_PCA10056 -DNRF52840_XXAA |
adafruit_feather_nrf52840_sense.json |
(missing) |
-DARDUINO_NRF52840_FEATHER_SENSE -DNRF52840_XXAA |
adafruit_feather_nrf52840.json |
(missing) |
-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA |
adafruit_clue_nrf52840.json |
(missing) |
-DARDUINO_NRF52840_CLUE -DNRF52840_XXAA |
adafruit_itsybitsy_nrf52840.json |
(missing) |
-DARDUINO_NRF52840_ITSYBITSY -DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY |
adafruit_metro_nrf52840.json |
(missing) |
-DARDUINO_NRF52840_FEATHER -DARDUINO_NRF52840_METRO -DNRF52840_XXAA |
| ...and ~16 nRF52 boards total + many others |
(missing) |
various |
Why it matters
Most Arduino-framework board headers gate on -DARDUINO_<BOARD> macros. For example, FastLED's src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h is a chain of:
#if defined(ARDUINO_NRF52_DK)
// pin map for nRF52 DK
#elif defined(ARDUINO_NRF52840_FEATHER_SENSE)
// pin map for Feather Sense
...
#elif defined(NRF52840_XXAA) && !defined(__FASTPIN_ARM_NRF52_VARIANT_FOUND)
#warning "Unknown nRF52840 variant -- please report to FastLED developers what your board is."
// fallback that intentionally marks many pins INVALID
#endif
Without extra_flags injected, every nRF52 board falls through to the "Unknown variant" fallback. That fallback marks pin 1 (and many others) invalid, so FastPin<1>::validpin() evaluates to false, and a static_assert in fl/system/fastpin_base.h:146 blows up any example that uses pin 1 for SPI data (e.g. examples/Apa102/Apa102.ino).
Result on master right now:
fl/system/fastpin_base.h:146: error: static assertion failed: This pin has been marked as an invalid pin...
fastspi_arm_nrf52.h:129: error: 'fl::FastPin<PIN>::LowSpeedOnlyRecommended()' is private within this context
CI workflows blocked
nrf52840_dk
nrf52840_supermini (maps via real_board_name="nrf52840_dk_adafruit" in FastLED ci/boards.py)
adafruit_feather_nrf52840_sense
- (and any future nRF52840 board added to FastLED)
Root cause
crates/fbuild-config/src/bin/enrich_boards.rs is the one-off tool that imports build / upload sections from ~/.platformio/platforms/. It evidently dropped extra_flags when run (or was run before this field mattered). Same gap exists across many non-nRF52 boards (IAP15*, LGT8F*, etc.) — visible via:
python -c "import json,glob; [print(f) for f in sorted(glob.glob('crates/fbuild-config/assets/boards/json/*.json')) if 'extra_flags' not in json.load(open(f)).get('build',{})]"
Proposed fix
Either:
- Re-run
enrich_boards with a corrected enrichment loop that copies build.extra_flags straight through (preferred — fixes ALL boards in one shot, scriptable).
- Or patch the bundle JSONs individually for affected board families as they get reported.
Test plan
For each fixed JSON: BoardConfig::from_board_id(...).get_defines() should now include the expected ARDUINO_<BOARD>=1 keys (get_defines already parses extra_flags per crates/fbuild-config/src/board/mod.rs::get_defines; just needs the data present).
Immediate FastLED unblock
Companion fbuild PR adds extra_flags to the 3 nRF52840 boards FastLED CI currently exercises (nrf52840_dk, nrf52840_dk_adafruit, adafruit_feather_nrf52840_sense), values mirrored verbatim from upstream PIO. That's the minimum needed to unblock FastLED master. The broader sweep (all ~16 nRF52 boards + every other board missing extra_flags) is the proper follow-up.
Filed during a coordinated CI-green sweep; immediate-unblock PR coming next.
Symptom
For many boards in
crates/fbuild-config/assets/boards/json/, thebuild.extra_flagsfield is empty/missing — even though the upstream PlatformIO board JSON sets it.Concrete repro from current master FastLED CI:
build.extra_flagsbuild.extra_flagsnrf52840_dk.json-DARDUINO_NRF52_DKnrf52840_dk_adafruit.json-DARDUINO_NRF52840_PCA10056 -DNRF52840_XXAAadafruit_feather_nrf52840_sense.json-DARDUINO_NRF52840_FEATHER_SENSE -DNRF52840_XXAAadafruit_feather_nrf52840.json-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAAadafruit_clue_nrf52840.json-DARDUINO_NRF52840_CLUE -DNRF52840_XXAAadafruit_itsybitsy_nrf52840.json-DARDUINO_NRF52840_ITSYBITSY -DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSYadafruit_metro_nrf52840.json-DARDUINO_NRF52840_FEATHER -DARDUINO_NRF52840_METRO -DNRF52840_XXAAWhy it matters
Most Arduino-framework board headers gate on
-DARDUINO_<BOARD>macros. For example, FastLED'ssrc/platforms/arm/nrf52/fastpin_arm_nrf52_variants.his a chain of:Without
extra_flagsinjected, every nRF52 board falls through to the "Unknown variant" fallback. That fallback marks pin 1 (and many others) invalid, soFastPin<1>::validpin()evaluates tofalse, and a static_assert infl/system/fastpin_base.h:146blows up any example that uses pin 1 for SPI data (e.g.examples/Apa102/Apa102.ino).Result on master right now:
CI workflows blocked
nrf52840_dknrf52840_supermini(maps viareal_board_name="nrf52840_dk_adafruit"in FastLEDci/boards.py)adafruit_feather_nrf52840_senseRoot cause
crates/fbuild-config/src/bin/enrich_boards.rsis the one-off tool that importsbuild/uploadsections from~/.platformio/platforms/. It evidently droppedextra_flagswhen run (or was run before this field mattered). Same gap exists across many non-nRF52 boards (IAP15*, LGT8F*, etc.) — visible via:Proposed fix
Either:
enrich_boardswith a corrected enrichment loop that copiesbuild.extra_flagsstraight through (preferred — fixes ALL boards in one shot, scriptable).Test plan
For each fixed JSON:
BoardConfig::from_board_id(...).get_defines()should now include the expectedARDUINO_<BOARD>=1keys (get_definesalready parsesextra_flagspercrates/fbuild-config/src/board/mod.rs::get_defines; just needs the data present).Immediate FastLED unblock
Companion fbuild PR adds
extra_flagsto the 3 nRF52840 boards FastLED CI currently exercises (nrf52840_dk,nrf52840_dk_adafruit,adafruit_feather_nrf52840_sense), values mirrored verbatim from upstream PIO. That's the minimum needed to unblock FastLED master. The broader sweep (all ~16 nRF52 boards + every other board missingextra_flags) is the proper follow-up.Filed during a coordinated CI-green sweep; immediate-unblock PR coming next.