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
FastLED not functional on Trinket M0 with WS2812B #1363
I've been trying to get the blink sketch running on a Trinket M0 but have so far been unsuccessful. Output from pin 1 is buffered to through a 1g126 to 5V. The same setup works just fine with the Neopixel library.
I have a picoprobe SWD hooked up to it and it's not stuck or in hardfault. I'm not sure what to look at to debug this issue.
@Spegs21 which config are you referring to? I'm having a similar problem with on the QtPy SAMD21. Works with Neopixel library, but not FastLED. weird part is it worked before, can't figure out what changed
@Spegs21 I'm not an expert in the ARM support for FastLED. I wonder if it's just a pin naming problem? But @JesseMFrey , you are saying that it used to work and now it doesn't?
@JesseMFrey That's strange. Looking at the history, I don't see anything substantial committed in some time. Do you know which specific ARM platform was affected? The D21?
Seeing as these are both Adafruit boards I wonder if it's related to a Adafruit SAMD Core change. @JesseMFrey have you updated the boards package recently?
Oh! I just solved this issue with my Gemma M0! This issue is with the fact that this chunk of the pin definitions is before the rest of the board definitions! When the Arduino library is compiling, it spits out two defines, one for the board and one for the core (e.g. "ADAFRUIT_GEMMA_M0" and "ARDUINO_SAMD_ZERO"). But, because the default pin definition for "ARDUINO_SAMD_ZERO" is before the platform definition, that is the set of pins that is chosen.
A temporary solution is putting your platform above the "ARDUINO_SAMD_ZERO" core definition, but maybe that definition should be placed last in the config since it's the most generic? Otherwise, I'm not sure if it is proper for both of those defines to be specified for the compiler, so one could be removed or an Adafruit configuration updated to only include one of the defines. Ether way, this seems to be the issue at hand.
@Sheepybloke2-0 This is a really interesting find. My understanding of those pin definitions is that they are supposed to be for specific boards but the ARDUINO_SAMD_ZERO block you linked is really weird. I'd expect it to the the Arduino Zero (SAMD21) but it has way too many pins. Maybe it's checking the wrong define for that block and it is supposed to be referring to a different board.
I'll play around with compiling for different boards to look at what all is defined.
This issue was killing me the prior week i.e. FastLED on a trinket M0. I wasted much time before properly googling the solution found here. Code that has worked well in the past suddenly stopped working on the exact same hardware. thanks for solving this one.
Oh! I just solved this issue with my Gemma M0! This issue is with the fact that this chunk of the pin definitions is before the rest of the board definitions! When the Arduino library is compiling, it spits out two defines, one for the board and one for the core (e.g. "ADAFRUIT_GEMMA_M0" and "ARDUINO_SAMD_ZERO"). But, because the default pin definition for "ARDUINO_SAMD_ZERO" is before the platform definition, that is the set of pins that is chosen.
A temporary solution is putting your platform above the "ARDUINO_SAMD_ZERO" core definition, but maybe that definition should be placed last in the config since it's the most generic? Otherwise, I'm not sure if it is proper for both of those defines to be specified for the compiler, so one could be removed or an Adafruit configuration updated to only include one of the defines. Ether way, this seems to be the issue at hand.
I believe the work-around is to edit fastled_config.h to uncomment this line (line 11 methinks)
#define FASTLED_FORCE_SOFTWARE_PINS//uncomment for trinket m0
you may have to re-comment those lines for other boars. (at least I do)
On Saturday, October 29, 2022 at 05:00:43 PM PDT, Bill Pugh ***@***.***> wrote:
I did some exploration; using FastLED on a Trinket M0 works through version Adafruit SAMD 1.7.7.
In Adafruit SAMD 1.7.8, I get a verification error when uploading to the trinket M0.
The bug described above is present in versions 1.7.9 and 1.7.10.
I've posted this in the Adafruit forums, which is their recommended way to get their attention.
https://forums.adafruit.com/viewtopic.php?t=195647
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
I know this is an older issue but it seems the problem cropped up again for me in 3.10.2. Earlier versions including 3.10.0 and 3.10.1 compile.
There were quite a few changes between 3.10.1 and 3.10.2: 3.10.1...3.10.2 so hoping someone more familiar with the changes can take a look.
I am using a Trinket M0 with board version 1.7.16.
FastLED/src/platforms/compile_test.cpp: In function 'void fl::compile_tests()':
FastLED/src/platforms/compile_test.cpp:48:47: error: static assertion failed: u32 must be exactly uint32_t
48 | static_assert(fl::is_same<u32, uint32_t>::value, "u32 must be exactly uint32_t");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
FastLED/src/platforms/compile_test.cpp:51:46: error: static assertion failed: i32 must be exactly int32_t
51 | static_assert(fl::is_same<i32, int32_t>::value, "i32 must be exactly int32_t");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
FastLED/src/platforms/shared/active_strip_data/active_strip_data.cpp: In member function 'fl::string fl::ActiveStripData::infoJsonString()':
FastLED/src/platforms/shared/active_strip_data/active_strip_data.cpp:81:22: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
81 | for (const auto &[stripIndex, stripData] : mStripMap) {
| ^
FastLED/src/platforms/shared/active_strip_data/active_strip_data.cpp: In member function 'fl::string fl::ActiveStripData::infoJsonStringNew()':
FastLED/src/platforms/shared/active_strip_data/active_strip_data.cpp:116:22: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
116 | for (const auto &[stripIndex, stripData] : mStripMap) {
| ^
exit status 1
Compilation error: exit status 1
I get the same thing when I use the latest rev. So Idepreciated to an older rev. The cost of progress.
Yahoo Mail: Search, Organize, Conquer
On Sun, Sep 14, 2025 at 4:28 PM, ***@***.***> wrote: BrookeDot left a comment (FastLED/FastLED#1363)
I know this is an older issue but it seems the problem cropped up again for me in 3.10.2. Earlier versions including 3.10.0 and 3.10.1 compile.
There were quite a few changes between 3.10.1 and 3.10.2: 3.10.1...3.10.2 so hoping someone more familiar with the changes can take a look.
I am using a Trinket M0 with board version 1.7.16.
FastLED/src/platforms/compile_test.cpp: In function 'void fl::compile_tests()':
FastLED/src/platforms/compile_test.cpp:48:47: error: static assertion failed: u32 must be exactly uint32_t
48 | static_assert(fl::is_same<u32, uint32_t>::value, "u32 must be exactly uint32_t");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
FastLED/src/platforms/compile_test.cpp:51:46: error: static assertion failed: i32 must be exactly int32_t
51 | static_assert(fl::is_same<i32, int32_t>::value, "i32 must be exactly int32_t");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
FastLED/src/platforms/shared/active_strip_data/active_strip_data.cpp: In member function 'fl::string fl::ActiveStripData::infoJsonString()':
FastLED/src/platforms/shared/active_strip_data/active_strip_data.cpp:81:22: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
81 | for (const auto &[stripIndex, stripData] : mStripMap) {
| ^
FastLED/src/platforms/shared/active_strip_data/active_strip_data.cpp: In member function 'fl::string fl::ActiveStripData::infoJsonStringNew()':
FastLED/src/platforms/shared/active_strip_data/active_strip_data.cpp:116:22: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
116 | for (const auto &[stripIndex, stripData] : mStripMap) {
| ^
exit status 1
Compilation error: exit status 1
Thanks!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
@zackees do you have a moment to point us in the right direction here, also let me know if you'd prefer a new issue be opened as this one is old and best I can tell the original issue was fixed upstream by Adafruit so this is a new (unrelated?) regression.
Boards affected: Adafruit Trinket M0 (and other SAMD21-based boards such as Gemma M0 and QtPy SAMD21).
Symptoms: FastLED “blink” sketch would not drive WS2812B LEDs, while the Adafruit NeoPixel library worked.
Early finding: Forcing software pins (#define FASTLED_FORCE_SOFTWARE_PINS in fastled_config.h) made it work, but with hardware-driven pins there was no output.
Root Cause Identified
Pin-definition conflict in Adafruit’s SAMD core.
When compiling, both a board-specific macro (e.g. ADAFRUIT_GEMMA_M0) and the generic ARDUINO_SAMD_ZERO macro were defined.
The FastLED configuration chose the generic ARDUINO_SAMD_ZERO block first, giving the wrong pin map.
Workarounds / fixes:
Temporarily reorder or edit the pin-definition blocks, or
Uncomment FASTLED_FORCE_SOFTWARE_PINS.
Upstream Resolution
Adafruit corrected the macro definitions in their core (fixed in Adafruit SAMD core 1.7.11).
After those changes the original 2022 problem was considered fixed.
New Regression (Sept 2025)
BrookeDot reports that with FastLED 3.10.2 (using Trinket M0, Adafruit SAMD core 1.7.16) the sketch no longer compiles.
Compiler errors:
static assertion failed: u32 must be exactly uint32_t
static assertion failed: i32 must be exactly int32_t
plus C++17 “structured bindings” warnings.
Earlier FastLED versions 3.10.0 and 3.10.1 compile fine, so something introduced in 3.10.2 broke the build for this board.
Another user (lemuroid) confirmed the same failure and reverted to an older FastLED revision.
Current Status & Maintainer Guidance
The original 2022 hardware/pin-definition bug is resolved upstream.
The latest compilation failure is a new and different issue, introduced between FastLED 3.10.1 and 3.10.2.
Maintainer @zackees notes the thread now mixes the old fixed bug with this new regression and asks for “a new issue that’s clean” so the 3.10.2 compilation problem can be tracked separately.
In short:
This GitHub thread originally tracked a SAMD21 pin-definition bug that Adafruit and FastLED already fixed. In September 2025 a different problem appeared: FastLED 3.10.2 no longer compiles on the Trinket M0 due to uint32_t/int32_t type assertions. The maintainer has requested that anyone investigating the 3.10.2 regression open a new GitHub issue dedicated to that fresh problem.
Activity
Spegs21 commentedon Feb 9, 2022
Forcing software pins in the config allows it to function. I checked the pin with a scope in hardware mode and there is no activity.
JesseMFrey commentedon Feb 25, 2022
@Spegs21 which config are you referring to? I'm having a similar problem with on the QtPy SAMD21. Works with Neopixel library, but not FastLED. weird part is it worked before, can't figure out what changed
Spegs21 commentedon Feb 25, 2022
@JesseMFrey In the fastled_config.h file:
FastLED/src/fastled_config.h
Line 12 in 4d73cdd
You have to uncomment the line.
JesseMFrey commentedon Feb 25, 2022
Thanks, I'm seeing the same thing as you on the QtPy SAMD21
Spegs21 commentedon Feb 25, 2022
It's probably just all SAMD21 based boards. @samguyer can you comment on why this might be happening?
samguyer commentedon Feb 25, 2022
@Spegs21 I'm not an expert in the ARM support for FastLED. I wonder if it's just a pin naming problem? But @JesseMFrey , you are saying that it used to work and now it doesn't?
JesseMFrey commentedon Feb 25, 2022
@samguyer yes, it used to work. Sadly I was not paying enough attention to know which versions of things I was using before that worked.
samguyer commentedon Feb 25, 2022
@JesseMFrey That's strange. Looking at the history, I don't see anything substantial committed in some time. Do you know which specific ARM platform was affected? The D21?
JesseMFrey commentedon Feb 25, 2022
@samguyer presumably, I've only used it with the QtPy SAMD21
Spegs21 commentedon Feb 25, 2022
Seeing as these are both Adafruit boards I wonder if it's related to a Adafruit SAMD Core change.
@JesseMFrey have you updated the boards package recently?
Sheepybloke2-0 commentedon Mar 12, 2022
Oh! I just solved this issue with my Gemma M0! This issue is with the fact that this chunk of the pin definitions is before the rest of the board definitions! When the Arduino library is compiling, it spits out two defines, one for the board and one for the core (e.g. "ADAFRUIT_GEMMA_M0" and "ARDUINO_SAMD_ZERO"). But, because the default pin definition for "ARDUINO_SAMD_ZERO" is before the platform definition, that is the set of pins that is chosen.
A temporary solution is putting your platform above the "ARDUINO_SAMD_ZERO" core definition, but maybe that definition should be placed last in the config since it's the most generic? Otherwise, I'm not sure if it is proper for both of those defines to be specified for the compiler, so one could be removed or an Adafruit configuration updated to only include one of the defines. Ether way, this seems to be the issue at hand.
Spegs21 commentedon Mar 14, 2022
@Sheepybloke2-0 This is a really interesting find. My understanding of those pin definitions is that they are supposed to be for specific boards but the ARDUINO_SAMD_ZERO block you linked is really weird. I'd expect it to the the Arduino Zero (SAMD21) but it has way too many pins. Maybe it's checking the wrong define for that block and it is supposed to be referring to a different board.
I'll play around with compiling for different boards to look at what all is defined.
lemuroid commentedon Jun 3, 2022
This issue was killing me the prior week i.e. FastLED on a trinket M0. I wasted much time before properly googling the solution found here. Code that has worked well in the past suddenly stopped working on the exact same hardware. thanks for solving this one.
Fix issue FastLED#1363 for adafruit d21 based boards
CsVance82 commentedon Sep 15, 2022
This worked.
billpugh commentedon Oct 30, 2022
I did some exploration; using FastLED on a Trinket M0 works through version Adafruit SAMD 1.7.7.
In Adafruit SAMD 1.7.8, I get a verification error when uploading to the trinket M0.
The bug described above is present in versions 1.7.9 and 1.7.10.
I've posted this in the Adafruit forums, which is their recommended way to get their attention.
https://forums.adafruit.com/viewtopic.php?t=195647
lemuroid commentedon Oct 31, 2022
hathach commentedon Nov 2, 2022
this should be fixed in Adafruit core release 1.7.11
Merge pull request #1424 from chroma-tech/fix_adafruit_d21
BrookeDot commentedon Sep 14, 2025
I know this is an older issue but it seems the problem cropped up again for me in 3.10.2. Earlier versions including 3.10.0 and 3.10.1 compile.
There were quite a few changes between 3.10.1 and 3.10.2: 3.10.1...3.10.2 so hoping someone more familiar with the changes can take a look.
I am using a Trinket M0 with board version 1.7.16.
Thanks!
lemuroid commentedon Sep 15, 2025
BrookeDot commentedon Sep 15, 2025
@zackees do you have a moment to point us in the right direction here, also let me know if you'd prefer a new issue be opened as this one is old and best I can tell the original issue was fixed upstream by Adafruit so this is a new (unrelated?) regression.
Most recent update is in my comment here: #1363 (comment)
zackees commentedon Sep 16, 2025
This is a great idea. This issue now has contradictory information and the issue has to be extracted out.
It would be great to have a new issue that's clean.
zackees commentedon Sep 16, 2025
Here is a report on the current state of this bug according to chat gpt:
Summary of the GitHub issue FastLED/FastLED #1363
Original Problem (2022)
#define FASTLED_FORCE_SOFTWARE_PINSinfastled_config.h) made it work, but with hardware-driven pins there was no output.Root Cause Identified
Pin-definition conflict in Adafruit’s SAMD core.
When compiling, both a board-specific macro (e.g.
ADAFRUIT_GEMMA_M0) and the genericARDUINO_SAMD_ZEROmacro were defined.The FastLED configuration chose the generic
ARDUINO_SAMD_ZEROblock first, giving the wrong pin map.Workarounds / fixes:
FASTLED_FORCE_SOFTWARE_PINS.Upstream Resolution
New Regression (Sept 2025)
BrookeDot reports that with FastLED 3.10.2 (using Trinket M0, Adafruit SAMD core 1.7.16) the sketch no longer compiles.
Compiler errors:
plus C++17 “structured bindings” warnings.
Earlier FastLED versions 3.10.0 and 3.10.1 compile fine, so something introduced in 3.10.2 broke the build for this board.
Another user (lemuroid) confirmed the same failure and reverted to an older FastLED revision.
Current Status & Maintainer Guidance
In short:
This GitHub thread originally tracked a SAMD21 pin-definition bug that Adafruit and FastLED already fixed. In September 2025 a different problem appeared: FastLED 3.10.2 no longer compiles on the Trinket M0 due to
uint32_t/int32_ttype assertions. The maintainer has requested that anyone investigating the 3.10.2 regression open a new GitHub issue dedicated to that fresh problem.zackees commentedon Sep 16, 2025
In summary, yes, you had a new issue that's unrelated to this issue.
You should have filed that as a new bug.
It looks like this original issue is fixed now and will be closed. The int compile issue will be solved shortly.
BrookeDot commentedon Sep 16, 2025
Thanks Zack! Sorry for not opening up a new issue, sometimes it's hard to know what a project prefers but got it for next time :D
fixes FastLED#1363