You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Problem adapting FastLED library for stm32l476rg board #975
Im having a hard time adapting the library to my mbed_os
[Error] led_sysdefs.h@50,2: #error "This platform isn't recognized by FastLED... yet. See comments in FastLED/led_sysdefs.h for options." [Fatal Error] clockless_trinket.h@6,10: avr/interrupt.h: No such file or directory [ERROR] In file included from ./FastLED/FastLED.h:41, from ./FastLED/FastLED.cpp:2: ./FastLED/led_sysdefs.h:50:2: error: #error "This platform isn't recognized by FastLED... yet. See comments in FastLED/led_sysdefs.h for options." 50 | #error "This platform isn't recognized by FastLED... yet. See comments in FastLED/led_sysdefs.h for options." | ^~~~~ In file included from ./FastLED/platforms/avr/fastled_avr.h:6, from ./FastLED/platforms.h:39, from ./FastLED/FastLED.h:52, from ./FastLED/FastLED.cpp:2: ./FastLED/platforms/avr/clockless_trinket.h:6:10: fatal error: avr/interrupt.h: No such file or directory 6 | #include <avr/interrupt.h> // for cli/se definitions | ^~~~~~~~~~~~~~~~~ compilation terminated.
Tracked in FastLED/fbuild#385 for STM32 / STM32duino fbuild platform/build support validation.
That fbuild issue is scoped to board metadata, toolchain/backend support, and FastLED smoke-build evidence. Any remaining FastLED source/platform-code blocker should stay linked from both sides.
STM32L476RG (and the wider STM32L4 family) is an fbuild-side gap. fbuild's STM32 orchestrator currently only ships MCU configs for STM32F1, STM32F4, STM32H7, and STM32U5 - the L4 family (Cortex-M4F, no DSP) has no stm32l4.json config yet, so fbuild build ... -e nucleo_l476rg fails with:
A smoke fixture (tests/platform/nucleo_l476rg) has been added as a regression marker so this is unblocked once the L4 config lands. See PR FastLED/fbuild#396 and tracker FastLED/fbuild#385.
Your original error This platform isn't recognized by FastLED... yet. is FastLED-side - even after fbuild adds L4 support, FastLED's src/platforms/arm/stm32/led_sysdefs_arm_stm32.h needs an STM32L4 branch (the existing STM32 detection there is mostly F1/F4/F7).
Deferred by automated triage: STM32L4 pin map is an unstarted port, not a bug: no families/stm32l4.h, no boards/l4/, and fbuild has no stm32l4 MCU config so it cannot be compile-verified here. pins/README.md already lists STM32L4 as 'Future'. Original 2020 symptom is fixed. Status posted on the issue.
Re-surveyed against current master. Marking deferred — the remaining work is a platform port I cannot compile-verify here, not a bug. Posting exactly what has changed and what is left, including a correction to the triage note above.
Your original symptom is gone
The 2020 failure was led_sysdefs.h falling all the way through to "This platform isn't recognized by FastLED... yet" and then pulling in platforms/avr/clockless_trinket.h, hence avr/interrupt.h: No such file or directory. That cannot happen now:
is_stm32.h:49-50 recognises the L4 family in the top-level FL_IS_STM32 test, and is_stm32.h:95-98 defines FL_IS_STM32_L4.
The STM32 tree now has a per-core split (core_detection.h) with a dedicated mbed arm and its own led_sysdefs/led_sysdefs_stm32_mbed.h — relevant since you were on mbed OS rather than STM32duino.
stm32_capabilities.h:50 carries an L4 entry.
So no more AVR headers on an ARM target.
Correction to the triage note above
FastLED's src/platforms/arm/stm32/led_sysdefs_arm_stm32.h needs an STM32L4 branch (the existing STM32 detection there is mostly F1/F4/F7).
That is no longer where the gap is — L4 detection landed. The actual missing piece is the pin map:
src/platforms/arm/stm32/pins/families/ stm32f1.h stm32f2.h stm32f4.h stm32g0.h stm32u5.h ← no stm32l4.h
src/platforms/arm/stm32/pins/boards/ f1/ f2/ f4/ g0/ u5/ ← no l4/
fastpin_dispatcher.h has no ARDUINO_NUCLEO_L476RG arm, so an L4 build reaches the fallback at the end of the chain and stops with a clear, actionable message:
#error "STM32: Unknown board. Check your ARDUINO_* board macro and add it to src/platforms/arm/stm32/pins/fastpin_dispatcher.h. See src/platforms/arm/stm32/pins/README.md for architecture guide and examples."
Which is a considerable improvement on 2020 — you now get told precisely what is missing and where to add it.
This is already tracked in-tree, incidentally: pins/README.md:203 lists STM32L4 → 📋 Future, "Nucleo L476RG, Discovery L4" — your exact board, named.
Why I am not just adding it
The Nucleo-L476RG is a Nucleo-64 board, so it shares the Arduino/ST-Morpho header layout with the F401RE / F411RE / F446RE boards that already have files under boards/f4/. Writing an L4 map by analogy is tempting and would probably be close to right.
"Same connector" does not mean "same pin map." That assumption has bitten this repo before — Zero SAMD, not work using 0 & 1 pin #825 found the ARDUINO_SAMD_ZERO and ARDUINO_SEEED_ZERO maps disagreeing on pins 0/1/2/4 despite being nominally the same board class. A wrong GPIO in a pin map is worse than a clean #error: it compiles, links, and silently drives the wrong pin.
What a complete L4 port needs
pins/families/stm32l4.h — L4 GPIO has BRR, so it should follow the HAS_BRR pattern rather than the F1 legacy path.
pins/boards/l4/nucleo_l476rg.h — pin table verified against the ST UM1724 Nucleo-64 user manual, not inferred from the F4 sibling.
An ARDUINO_NUCLEO_L476RG arm in fastpin_dispatcher.h.
If mbed support is wanted specifically, note that FL_IS_STM32_L4 currently keys on STM32L4 / STM32L4xx — the defines STM32duino emits. Arduino mbed emits TARGET_STM32L4 / STM32L476xx, which are not matched. Adding those is a one-liner, but it only moves the error to the pin dispatcher until step 2 exists.
@rannomspp — if you still have the board and want to finish this, steps 1-3 are self-contained and pins/README.md documents the pattern; a PR with a datasheet-verified table would be very welcome. Otherwise this stays open as a tracked port request.
(Minor in-tree drift noticed while checking: pins/MIGRATION_COMPLETE.md:234 still lists "Add STM32L4/G0/G4/U5 support" as unchecked, though G0 and U5 have since landed.)
Activity
rannomspp commentedon Feb 20, 2020
By far it seems to be defined in "led_sysdefs.h" for STM32F103 / STM32F10X_MD and I am not exactly sure what to add to fix it.
zackees commentedon Jun 3, 2026
Tracked in FastLED/fbuild#385 for STM32 / STM32duino fbuild platform/build support validation.
That fbuild issue is scoped to board metadata, toolchain/backend support, and FastLED smoke-build evidence. Any remaining FastLED source/platform-code blocker should stay linked from both sides.
zackees commentedon Jun 3, 2026
Triage update from fbuild side, tracked under FastLED/fbuild#385.
STM32L476RG (and the wider STM32L4 family) is an fbuild-side gap. fbuild's STM32 orchestrator currently only ships MCU configs for STM32F1, STM32F4, STM32H7, and STM32U5 - the L4 family (Cortex-M4F, no DSP) has no
stm32l4.jsonconfig yet, sofbuild build ... -e nucleo_l476rgfails with:A smoke fixture (
tests/platform/nucleo_l476rg) has been added as a regression marker so this is unblocked once the L4 config lands. See PR FastLED/fbuild#396 and tracker FastLED/fbuild#385.Your original error
This platform isn't recognized by FastLED... yet.is FastLED-side - even after fbuild adds L4 support, FastLED'ssrc/platforms/arm/stm32/led_sysdefs_arm_stm32.hneeds an STM32L4 branch (the existing STM32 detection there is mostly F1/F4/F7).test(stm32): add F0/L4 gap-tracking fixtures and document STM32 MCU c…
zackees commentedon Aug 2, 2026
Deferred by automated triage: STM32L4 pin map is an unstarted port, not a bug: no families/stm32l4.h, no boards/l4/, and fbuild has no stm32l4 MCU config so it cannot be compile-verified here. pins/README.md already lists STM32L4 as 'Future'. Original 2020 symptom is fixed. Status posted on the issue.
zackees commentedon Aug 2, 2026
Re-surveyed against current master. Marking
deferred— the remaining work is a platform port I cannot compile-verify here, not a bug. Posting exactly what has changed and what is left, including a correction to the triage note above.Your original symptom is gone
The 2020 failure was
led_sysdefs.hfalling all the way through to "This platform isn't recognized by FastLED... yet" and then pulling inplatforms/avr/clockless_trinket.h, henceavr/interrupt.h: No such file or directory. That cannot happen now:is_stm32.h:49-50recognises the L4 family in the top-levelFL_IS_STM32test, andis_stm32.h:95-98definesFL_IS_STM32_L4.core_detection.h) with a dedicated mbed arm and its ownled_sysdefs/led_sysdefs_stm32_mbed.h— relevant since you were on mbed OS rather than STM32duino.stm32_capabilities.h:50carries an L4 entry.So no more AVR headers on an ARM target.
Correction to the triage note above
That is no longer where the gap is — L4 detection landed. The actual missing piece is the pin map:
fastpin_dispatcher.hhas noARDUINO_NUCLEO_L476RGarm, so an L4 build reaches the fallback at the end of the chain and stops with a clear, actionable message:Which is a considerable improvement on 2020 — you now get told precisely what is missing and where to add it.
This is already tracked in-tree, incidentally:
pins/README.md:203lists STM32L4 → 📋 Future, "Nucleo L476RG, Discovery L4" — your exact board, named.Why I am not just adding it
The Nucleo-L476RG is a Nucleo-64 board, so it shares the Arduino/ST-Morpho header layout with the F401RE / F411RE / F446RE boards that already have files under
boards/f4/. Writing an L4 map by analogy is tempting and would probably be close to right.I am not doing it blind, for two reasons:
stm32l4is a known gap (track(platform): validate STM32 / STM32duino FastLED build support fbuild#385, smoke fixturetests/platform/nucleo_l476rgstaged in test(stm32): add F0/L4 gap-tracking fixtures and document STM32 MCU coverage fbuild#396). An unbuildable pin map is an untested pin map.ARDUINO_SAMD_ZEROandARDUINO_SEEED_ZEROmaps disagreeing on pins 0/1/2/4 despite being nominally the same board class. A wrong GPIO in a pin map is worse than a clean#error: it compiles, links, and silently drives the wrong pin.What a complete L4 port needs
pins/families/stm32l4.h— L4 GPIO hasBRR, so it should follow theHAS_BRRpattern rather than the F1 legacy path.pins/boards/l4/nucleo_l476rg.h— pin table verified against the ST UM1724 Nucleo-64 user manual, not inferred from the F4 sibling.ARDUINO_NUCLEO_L476RGarm infastpin_dispatcher.h.stm32l4.jsonon the fbuild side (track(platform): validate STM32 / STM32duino FastLED build support fbuild#385) so it can actually be built and smoke-tested.FL_IS_STM32_L4currently keys onSTM32L4/STM32L4xx— the defines STM32duino emits. Arduino mbed emitsTARGET_STM32L4/STM32L476xx, which are not matched. Adding those is a one-liner, but it only moves the error to the pin dispatcher until step 2 exists.@rannomspp — if you still have the board and want to finish this, steps 1-3 are self-contained and
pins/README.mddocuments the pattern; a PR with a datasheet-verified table would be very welcome. Otherwise this stays open as a tracked port request.(Minor in-tree drift noticed while checking:
pins/MIGRATION_COMPLETE.md:234still lists "Add STM32L4/G0/G4/U5 support" as unchecked, though G0 and U5 have since landed.)