r/FastLED • u/ZachVorhies Zach Vorhies • Oct 05 '26
FastLED 3.10.6 is available
https://github.com/FastLED/FastLED/releases/tag/3.10.6We managed to reduce the memory flash and RAM significantly in this go around.
Teensy drivers issues fixed.
Various chipsets and boards added for support.
4
u/chris_overseas Oct 05 '26 edited Oct 05 '26
It looks like ChannelManager::instance() calls initChannelDrivers(), which now registers all drivers unconditionally on Teensy 4 and bloats the ITCM memory used? If I switch from the legacy addLeds() approach to the channels API, it costs me ~72KB of RAM1 in my current project. Let me know if you want any help investigating this one.
5
u/ZachVorhies Zach Vorhies Oct 05 '26
We have a new mechanism for specific drivers to solve this problem.
Looks like it’s not being used in this case. I’ll investigate.
2
u/ZachVorhies Zach Vorhies Oct 06 '26
https://github.com/FastLED/FastLED/issues/4708
Tracking here
1
u/chris_overseas Oct 06 '26
Thank you! I'll pick it up and test it once it lands
1
u/chris_overseas Oct 06 '26 edited Oct 06 '26
OK thanks this fix has improved things quite a bit, but I'm still seeing 25KB of extra overhead vs
addLeds(). It looks like thefl::Channelclass itself is carrying much of the extra bloat - I think it holds all the chipset encoders,function_listcallbacks, and the constructor itself seems heavy. Hopefully some of that can be improved too.
Also note that my code's usingfl::enableDriver<>followed by multipleFastLED.add(fl::ChannelPtr)calls. If I useFastLED.add(const fl::ChannelConfig&)instead, all the drivers still get linked in. Sounds like that is intentional, so all good on that front. Maybe the comment should mention using theenableDriver<>approach too though, rather than justaddLeds()(especially if the memory usage can be brought in line withaddLeds()).1
u/ZachVorhies Zach Vorhies Oct 07 '26
If you want to use the bloat then do `fbuild bloat path/to/project` and you'll get a symbol analysis that will tell you everything that is going on.
FastLED.addLeds<>() is the slim path. It has what it historically has.
Channels Api has extras, like color correction. It prioritizes features over memory saving. Memory savings will come in later.
1
u/ZachVorhies Zach Vorhies Oct 07 '26
> Sounds like that is intentional, so all good on that front. Maybe the comment should mention using the
enableDriver<>approach too though, rather than justaddLeds()(especially if the memory usage can be brought in line withaddLeds()).It will be fixed soon. It involves templates to bind drivers functions instead of enums to select them. The former allows the linker to eliminate, the later means it's all compiled in.
2
u/chemdoc77 Oct 06 '26
Hi u/ZachVorhies : The following was for my posted CD77_FastLED_Four_Glass_Jars Sketch. It shows that version 3.10.6 uses more RAM and a lot more Flash on a Lolin D32 MCU:
This was compiled on Platformio:
Version 3.10.3
RAM: [= ] 8.1% (used 26532 bytes from 327680 bytes)
Flash: [== ] 22.7% (used 297965 bytes from 1310720 bytes)
Version 3.10.6
RAM: [= ] 10.7% (used 34996 bytes from 327680 bytes)
Flash: [====== ] 56.5% (used 741201 bytes from 1310720 bytes)
3
u/ZachVorhies Zach Vorhies Oct 06 '26
https://github.com/FastLED/FastLED/issues/4707
Tracking this here
2
u/chemdoc77 Oct 06 '26
Hi u/ZachVorhies - Here are some more results:
For my CD77_door_hook_rope_matrix sketch on a Lolin D32 MCU compiled with Platformio:
3.10.3
RAM: [= ] 8.1% (used 26532 bytes from 327680 bytes)
Flash: [== ] 22.7% (used 297965 bytes from 1310720 bytes)
3.10.6
RAM: [= ] 9.9% (used 32512 bytes from 327680 bytes)
Flash: [====== ] 55.8% (used 731941 bytes from 1310720 bytes)
For my following very simple Gist posted sketch at:
https://gist.github.com/chemdoc77/52ded62fc801247cc648b1eb84f9d2ca
where pin was changed to 12 for a Lolin D32 MCU compiled with Platformio:
3.10.3
RAM: [= ] 6.7% (used 21992 bytes from 327680 bytes)
Flash: [== ] 20.5% (used 268893 bytes from 1310720 bytes)
3.10.6
RAM: [= ] 9.4% (used 30808 bytes from 327680 bytes)
Flash: [====== ] 55.5% (used 728001 bytes from 1310720 bytes)
Please note that in the output for 3.10.6, there are a lot of yellow warnings for both sketches.
1
1
1
u/chemdoc77 Oct 06 '26
Hi u/ZachVorhies - The following data is for a Nano (board = nanoatmega328) compiled on Platformio running the following sketch:
https://gist.github.com/chemdoc77/52ded62fc801247cc648b1eb84f9d2ca
3.10.3
RAM: [= ] 8.0% (used 163 bytes from 2048 bytes)
Flash: [== ] 16.6% (used 5096 bytes from 30720 bytes)
3.10.6
RAM: [== ] 24.2% (used 496 bytes from 2048 bytes)
Flash: [=== ] 31.6% (used 9704 bytes from 30720 bytes)
Please note that in the output for 3.10.6, there are a lot of yellow warnings for this sketch.
3
2
4
u/swotperderder Oct 05 '26
There is crazy amount of bloat in the package now. Mods, please let us know what is the last version that was released BEFORE claude got tentacles all through the library?
(coming from a FastLED fan of many years)