Repository navigation
Description
Summary
The newly-added SAMD CI workflows fail on every PR that touches src/**, with a platform-detection error in GPIO code. It is not caused by any of those PRs — it looks like a pre-existing gap that nothing was watching until the workflows landed.
lib/FastLED/platforms/pin.h:56:6: error: #error "Platform-specific pin implementation
not defined for this Arduino variant. Please add support in src/platforms/pin.h
or update the platform detection logic."
lib/FastLED/fl/system/pin.cpp.hpp:52:16: error: 'digitalWrite' is not a member of 'fl::platforms'
lib/FastLED/fl/system/pin.cpp.hpp:56:23: error: 'digitalRead' is not a member of 'fl::platforms'
lib/FastLED/fl/system/pin.cpp.hpp:60:23: error: 'analogRead' is not a member of 'fl::platforms'
Boards affected: samd21, samd51j (and presumably samd21_zero, samd51).
Why this is a detection gap, not a missing implementation
The dispatch branch exists and the detection chain is wired:
platforms/pin.h:28—#elif defined(FL_IS_SAMD)platforms/is_platform.h:151—#include "platforms/arm/samd/is_samd.h"platforms/arm/samd/is_samd.h:30—#define FL_IS_SAMDwhenFL_IS_SAMD21 || FL_IS_SAMD51 || ARDUINO_ARCH_SAMD
pin.h is self-contained here: it includes is_platform.h itself at line 14, before the dispatch at 19+. So this is not an include-order problem in the consumer.
The #error at line 56 sits in the #elif defined(ARDUINO) fallback, which is only reached when FL_IS_SAMD is undefined. Since is_samd.h keys everything off ARDUINO_ARCH_SAMD, the likely reading is that the SAMD build configuration is not defining ARDUINO_ARCH_SAMD — a board/build-flags issue rather than anything in src/.
Worth checking as part of this: is_samd.h gates FL_IS_SAMD21 on an explicit list of CPU macros (__SAMD21G18A__, __SAMD21J18A__, __SAMD21E17A__, __SAMD21E18A__). If the CI board's variant is outside that list and ARDUINO_ARCH_SAMD is absent, nothing matches.
Why the workflows never caught it before
.github/workflows/build_samd21.yml triggers on push to master, filtered to src/**, examples/**, ci/**. Checking run history:
$ gh run list --workflow build_samd21.yml
failure refactor/fl-fs-subsystem 2906e127
failure feat/littlefs-backend 2a85b4de
failure refactor/fl-fs-subsystem 523fc532
failure feat/littlefs-backend 2445a949
...
Every run belongs to a PR branch; the workflow has never run on master. Merges since it landed did not touch the filtered paths, so master's SAMD status is genuinely unknown — and the first PRs to touch src/** inherited a red check for a platform they never touched.
Evidence the blocked PRs are not the cause
Two unrelated PRs fail identically — #4006 (a storage backend) and #4010 (a filesystem file move). Neither touches GPIO. Confirmed by diff against master:
$ git diff origin/master --stat -- src/platforms/is_platform.h src/platforms/pin.h \
src/fl/system/pin.cpp.hpp src/platforms/arm/
src/platforms/arm/teensy/sdfat/fs_sdfat_teensy.h | 2 +-
One line, in a Teensy SdFat header, from an include-path rename. Nothing in the SAMD or pin paths.
I attempted to confirm directly by building samd21 from a clean origin/master worktree, twice. Neither run reached compilation — one died on a 282 MB toolchain download (failed to read response body), the other on lost connection to daemon mid-build; the daemon process may have died (FastLED/fbuild#1360). So this is a static analysis rather than a reproduced build, and confirming it on master is the first thing to do.
Suggested next steps
- Run the SAMD workflows against master directly (workflow_dispatch, or a no-op commit touching
src/**) to establish whether master is red. - If red: fix the detection — most likely ensuring
ARDUINO_ARCH_SAMDreaches the compile, or widening the CPU-macro list inis_samd.h. - Consider whether a brand-new platform workflow should start as non-blocking until it has passed on master once, so an unproven job cannot block unrelated PRs on day one.
Related
- refactor(fs): expose embedded storage generically as fl::getEmbeddedFs() #4006, refactor(fs): consolidate the filesystem subsystem under fl/fs/ #4010 — blocked by this
- fbuild-daemon grows to ~3.9GB while idle then fails health check; heap-profile entry points not wired fbuild#1360 — the daemon failures that prevented local confirmation
- CI red on master: teensy40 section type conflict in .dmabuffers blocks all PRs #3992 — earlier CI-red-on-master report
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
test(samd): cover metro_m4, a fourth affected board
fix(samd): supply SPI to the now-live SAMD SPI backend (#4011)
fix(samd): hint SPI via LDF instead of per-board lib_deps (#4011)
fix(samd): detect SAMD from part macros, not ARDUINO_ARCH_SAMD (#4015)