Repository navigation
Closed as not planned
Labels
MCUsarea: coreLED drivers, color math, animationsplatform: avrArduino Uno, Mega, ATtinystatus: staleNo activity for 60+ daysstatus: triageNeeds initial assessment
Description
In file included from /root/Arduino/libraries/FastLED/FastLED.h:51:0,
from /root/Arduino/RGB-HUE-RR/RGB-HUE-RR.ino:5:
/root/Arduino/libraries/FastLED/fastpin.h: In instantiation of 'class FastPin<1u>':
/root/Arduino/libraries/FastLED/platforms/avr/clockless_trinket.h:96:49: required from 'class ClocklessController<1u, 3, 3, 6, (EOrder)10u, 0, false, 10>'
/root/Arduino/libraries/FastLED/chipsets.h:460:7: required from 'class WS2811Controller800Khz<1u, (EOrder)10u>'
/root/Arduino/libraries/FastLED/FastLED.h:111:52: required from 'class WS2811<1u, (EOrder)10u>'
/root/Arduino/libraries/FastLED/FastLED.h:304:33: required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = WS2811; unsigned char DATA_PIN = 1u]'
/root/Arduino/RGB-HUE-RR/RGB-HUE-RR.ino:13:43: required from here
/root/Arduino/libraries/FastLED/fastpin.h:207:2: error: static assertion failed: Invalid pin specified
static_assert(validpin(), "Invalid pin specified");
^
exit status 1
Error compiling for board ATtiny13.
Code (it works with arduino atmega and Attiny85 ATTinyCore
// this is temporary workaround for ATTinyCore
extern "C" {
volatile unsigned long timer0_millis = 0; // FAKE FAKE FAKE!
}
#include<FastLED.h>
#define NUM_LEDS 8
CRGBArray<NUM_LEDS> leds;
static uint8_t hue[NUM_LEDS];
void setup(){
FastLED.addLeds<WS2811,1>(leds, NUM_LEDS);
for(int i = 0; i < NUM_LEDS; i++){
hue[i] = i;
}
}
void loop(){
for(int i = 0; i < NUM_LEDS; i++){
leds[i] = CHSV(hue[i],255,255);
FastLED.delay(0);
hue[i] ++;
}
}
Metadata
Metadata
Assignees
Labels
MCUsarea: coreLED drivers, color math, animationsplatform: avrArduino Uno, Mega, ATtinystatus: staleNo activity for 60+ daysstatus: triageNeeds initial assessment
Type
Projects
- StatusShow more project fieldsDone
Activity
focalintent commentedon Mar 21, 2018
The problem is there are no pin definitions for the ATTiny13 in https://github.com/FastLED/FastLED/blob/master/platforms/avr/fastpin_avr.h - you would have to add those, as the attiny13 isn't a supported configuration yet.
[-]unable to compile with MicroCore for attiny13[/-][+]Need ATTiny13 support[/+]Sagar73594 commentedon Aug 10, 2022
It's been almost 2 years, Still no support? @focalintent
marmilicious commentedon Aug 10, 2022
@Sagar73594 Unfortunately Dan (aka focalintent) is no longer with us.
https://laist.com/news/conception-boat-fire-santa-cruz-island
JulianGmp commentedon Jan 22, 2023
For those coming across this in the future, I tried porting over FastLED to the attiny, but I would say it's not really possible.
You can find some discussions on the FastLED reddit, but the tldr is:
For these reasons, I would say using FastLED on the ATtiny13 or ATtiny13A is not possible.
For those who happen to have WS2812 LEDs: you may want to take a look at Tiny WS2812 (platformio, github).
I managed to get that one running and did a simple color cycle for 6 LEDs. This already consumed 480 bytes of the program memory though. Adding any sort of complex functionality like HSV to RGB conversion will exceed the 1024 bytes limitation.
Usable for very, very simple applications, but if you're shopping for micro controllers, I'd say go for one with more storage, I'll probably buy some ATtiny85's.
Update: I am using a simple lookup table for LED values and ran into a problem where the table itself was loaded into the (very limited) RAM. If you run into this (on the ATtiny85 or ATtiny13, or any AVR chip I think), consider reading the values from the program memory directly. That way you can use up the majority of your program memory while keeping your RAM usage very low. I put 480 RGB values (1440 bytes) onto an ATtiny85 with this.
zackees commentedon Jun 3, 2026
Tracked in FastLED/fbuild#389 for AVR / megaAVR / ATtiny 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
fbuild build-system status update (tracker: FastLED/fbuild#389)
Build-tool side is split:
attiny13.json/attiny13a.jsonpresent and declarecore = MicroCore.__AVR_ATtiny13__is already handled insrc/platforms/avr/attiny/pins/fastpin_attiny.h.MicroCore(MCUdude/MicroCore) is not yet wired intocrates/fbuild-packages/assets/avr_frameworks.json, so fbuild's AVR orchestrator currently fails at framework-resolve for ATtiny13. Tracked by tripwire testtest_microcore_gap_trackedand tracker fixturetests/platform/attiny13/(added in test(avr): tracker fixtures + framework gap tripwires for #389 fbuild#397).Once MicroCore is registered, the fixture flips from "tracker" to "real FastLED smoke build" and the static-assert / invalid-pin issue can be debugged on a working pipeline.
test(avr): add tracker fixtures + framework gap tests for #389 (#397)
chore(deps): bump fbuild 2.2.27 -> 2.2.28 (PyPI 2026-06-15) (#3056)
zackees commentedon Aug 1, 2026
Closing as not planned — the ATtiny13 is too small for FastLED, and that isn't something a port can fix.
The specific error you hit is gone. Pin definitions for
__AVR_ATtiny13__now exist atsrc/platforms/avr/attiny/pins/fastpin_attiny.h:101(MAX_PIN 5, PB0-PB5), sostatic_assert(validpin(), "Invalid pin specified")is no longer what stops you. Two other things are.1. It still doesn't assemble. There's a comment sitting right above those pin definitions recording a persistent failure:
The ATtiny13 is
avr25, an instruction-set subset that doesn't include opcodes FastLED's generated code relies on. That's a toolchain-level mismatch, not a missing header.2. The arithmetic doesn't work, and this is the real answer. @JulianGmp's 2023 analysis is correct and worth restating:
FastLED already emits this on the ATtiny25 (
fastpin_attiny.h:54):The ATtiny13 has half the flash of the part we already warn is too small, and half its RAM. There's no version of "add support" that makes a library which overflows 2 KB fit in 1 KB. On top of that, MicroCore provides no millisecond counter, which FastLED's timing depends on.
If you're on an ATtiny13 and want WS2812 output, @JulianGmp's recommendation stands — TinyWS2812 fits, at about 480 B for a simple color cycle. His follow-up note is worth heeding too: keep lookup tables in
PROGMEMrather than RAM, or 64 B disappears immediately. If you have room to change parts, the ATtiny85 is the smallest one where FastLED is genuinely comfortable.@Sagar73594 — sorry your 2022 question went unanswered for so long, and thank you @marmilicious for letting people know about Dan.
For completeness on the build-tool side: fbuild has
attiny13.json/attiny13a.jsonboard metadata, but MicroCore isn't registered in its AVR framework list (tracked bytest_microcore_gap_trackedand thetests/platform/attiny13/fixture). Even with that wired up, the flash and ISA problems above remain, which is why this is being closed rather than left open pending it.