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
Hello,
I'm trying to upload my FastLED program to an Attiny88 (mh-tiny88) card but I get this error:
/tmp/cc9qt6WO.s: Assembler messages:
/tmp/cc9qt6WO.s:4445: Error: illegal opcode mul for mcu avr25
exit status 1
Erreur de compilation pour la carte MH-ET LIVE Tiny88(16.0MHz)
Is there a solution to fix this?
Thanks in advance.
I think the problem is that FastLED doesn’t know to recognizing that particular board as an ATtiny. It’s treating it like an ATmega, which does have the mul[tiply] instruction, while the ATtiny does not.
I think the problem is that FastLED doesn’t know to recognizing that particular board as an ATtiny. It’s treating it like an ATmega, which does have the mul[tiply] instruction, while the ATtiny does not.
I found this code on reddit to insert Attiny88 in fastled, but I still couldn't solve it.
Addition to fastpin_avr.h platform entries for FastLED to make it work with Attiny88. I added this snip right before the section for the ATMega328:
Also need to add an entry for the Attiny88 platform in led_sysdefs_avr.h. Scroll down to the line with entries for the other Tiny platforms, then add another OR condition to cover the 88. Here's the full line from led_sysdefs_avr.h with my addition for the 88:
Where another problem lies is that within FastLED there are implementations of operations done in avr assembly. It's mainly used in the implementation of math functions for avr. At other places avr specific implementations are used when the macro __AVR__ is defined, but there are less places with assembly for that.
Files with mul instructions:
hsv2rgb.cpp
lib8tion.h
math8.h (lib8tion)
scale8.h (lib8tion)
trig8.h (lib8tion)
m0clockless.h (platforms/arm/common -> it's arm, so not important for this)
After these changes I was able to get FastLED working on ATtiny88. Only thing is that the pin mapping is all wonky, but poking all the pins with the LED stripe data line eventually finds it.
If its important, I'm using FastLED 3.002.010
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.
I am Clud, an AI agent working on behalf of Zach Vorhies.
This is fixed in current master. The original failure was FastLED treating ATtiny88 like a non-tiny AVR path; #1209 merged ATtiny88 support into the AVR tiny environment, and current master also has ATtiny88 pin definitions and ATtiny88 board/build metadata.
If an ATtiny88 illegal opcode mul failure is still reproducible on current master, please open a fresh focused issue with the board package, compiler version, FastLED commit/version, and a minimal sketch.
Board metadata attiny88.json and attiny88.json board present.
ATTinyCore (tiny) framework registered.
tests/platform/attiny88/ smoke fixture passes.
The illegal opcode mul for mcu avr25 error is FastLED-side: AVR25 (ATtiny core without hardware multiplier) requires every inline mul to be guarded by #ifndef LIB8_ATTINY / #if !LIB8_ATTINY. The relevant guards live in lib8tion/scale8.h and friends. Already CLOSED upstream; cross-linked from FastLED/fbuild#389.
Activity
breviglieri commentedon Jun 21, 2021
Hi, Same problem here, Do you fix your problem?
philibertc commentedon Jun 21, 2021
nope
kriegsman commentedon Jun 21, 2021
I think the problem is that FastLED doesn’t know to recognizing that particular board as an ATtiny. It’s treating it like an ATmega, which does have the mul[tiply] instruction, while the ATtiny does not.
breviglieri commentedon Jun 22, 2021
I found this code on reddit to insert Attiny88 in fastled, but I still couldn't solve it.
Addition to fastpin_avr.h platform entries for FastLED to make it work with Attiny88. I added this snip right before the section for the ATMega328:
Also need to add an entry for the Attiny88 platform in led_sysdefs_avr.h. Scroll down to the line with entries for the other Tiny platforms, then add another OR condition to cover the 88. Here's the full line from led_sysdefs_avr.h with my addition for the 88:
5chmidti commentedon Jun 22, 2021
Where another problem lies is that within FastLED there are implementations of operations done in avr assembly. It's mainly used in the implementation of math functions for avr. At other places avr specific implementations are used when the macro
__AVR__is defined, but there are less places with assembly for that.Files with
mulinstructions:Alattice commentedon Feb 28, 2022
I had the same issue but had this error:
after comparing the default entry, I managed to get it working by changing the following:
removing the _FL part in _FL_DEFPIN_AVR in fastpin_avr.h:
and keeping the "__" in the definitions for led_sysdefs_avr.h:
After these changes I was able to get FastLED working on ATtiny88. Only thing is that the pin mapping is all wonky, but poking all the pins with the LED stripe data line eventually finds it.
If its important, I'm using FastLED 3.002.010
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
I am
Clud, an AI agent working on behalf of Zach Vorhies.This is fixed in current
master. The original failure was FastLED treating ATtiny88 like a non-tiny AVR path; #1209 merged ATtiny88 support into the AVR tiny environment, and currentmasteralso has ATtiny88 pin definitions and ATtiny88 board/build metadata.If an ATtiny88
illegal opcode mulfailure is still reproducible on currentmaster, please open a fresh focused issue with the board package, compiler version, FastLED commit/version, and a minimal sketch.zackees commentedon Jun 3, 2026
fbuild build-system status update (tracker: FastLED/fbuild#389)
Build-tool side is healthy:
attiny88.jsonandattiny88.jsonboard present.tiny) framework registered.tests/platform/attiny88/smoke fixture passes.The
illegal opcode mul for mcu avr25error is FastLED-side: AVR25 (ATtiny core without hardware multiplier) requires every inlinemulto be guarded by#ifndef LIB8_ATTINY/#if !LIB8_ATTINY. The relevant guards live inlib8tion/scale8.hand friends. Already CLOSED upstream; cross-linked from FastLED/fbuild#389.