Skip to content

Support ATmega4809 (Arduino Uno Wifi Rev. 2, Arduino Nano Every) #716

Closed

Description

@PMPoulsen

Hi,
I have used one of the examples from the library and tried to compile it to my new Arduino wifi rev. 2 board,but I get the following error message:


Arduino: 1.8.8 (Windows 10), Board: "Arduino Uno WiFi Rev2, ATMEGA328"

In file included from C:\Arduino Projects\libraries\FastLED\examples\ColorPalette\ColorPalette.ino:1:0:

C:\Arduino Projects\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.001

pragma message "FastLED version 3.002.001"

                 ^

In file included from C:\Arduino Projects\libraries\FastLED/FastLED.h:65:0,

             from C:\Arduino Projects\libraries\FastLED\examples\ColorPalette\ColorPalette.ino:1:

C:\Arduino Projects\libraries\FastLED/fastspi.h:110:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

In file included from C:\Arduino Projects\libraries\FastLED/FastLED.h:48:0,

             from C:\Arduino Projects\libraries\FastLED\examples\ColorPalette\ColorPalette.ino:1:

C:\Arduino Projects\libraries\FastLED/fastpin.h: In instantiation of 'class FastPin<5u>':

C:\Arduino Projects\libraries\FastLED/platforms/avr/clockless_trinket.h:96:49: required from 'class ClocklessController<5u, 6, 8, 6, (EOrder)66u, 0, false, 10>'

C:\Arduino Projects\libraries\FastLED/chipsets.h:385:7: required from 'class WS2811Controller800Khz<5u, (EOrder)66u>'

C:\Arduino Projects\libraries\FastLED/FastLED.h:108:52: required from 'class WS2811<5u, (EOrder)66u>'

C:\Arduino Projects\libraries\FastLED/FastLED.h:295:39: required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = WS2811; unsigned char DATA_PIN = 5u; EOrder RGB_ORDER = (EOrder)66u]'

C:\Arduino Projects\libraries\FastLED\examples\ColorPalette\ColorPalette.ino:40:67: required from here

C:\Arduino Projects\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 Arduino Uno WiFi Rev2.

I understand that the new Wifi Rev. 2 board uses a different chip hence the pinout may not have been defined in the library yet.

Are there any simple workarrounds for this issue?

Activity

  1. focalintent commented on Jan 9, 2019

    @focalintent
    Contributor

    Nothing simple, no - at the very least there need to be pin definitions setup in fastpin_avr.h - and that’s assuming there’s no major differences between the atmega4809 and the 32u4/328.

  2. PMPoulsen commented on Jan 9, 2019

    @PMPoulsen
    Author

    OK, that is beyond my skills, so I am hoping for an update to the library soon.
    Thanks

  3. scr34m88 commented on Jan 16, 2019

    @scr34m88

    I've got the same problem. I hope you'll update the library soon.
    Thanks

  4. scr34m88 commented on Feb 4, 2019

    @scr34m88

    Does someone fix this problem for himself?
    At the moment I cannot use my Wifi Rev2. anymore because I need this library :)

  5. ngyl88 commented on May 22, 2019

    @ngyl88
    Contributor

    Hi all, I've hit the same issue as well. Well, pin definitions are beyond my skills. Hopefully someone can help to update the library soon.

  6. barnosch commented on Jul 12, 2019

    @barnosch

    Same happens on the new Nano Every Board which is aswell Atmega4809.

    Any news here? Sadly i can't fix that myself.

  7. jvcop commented on Aug 4, 2019

    @jvcop

    Same for me with the Arduino Nano Every. Are there plans on supporting Atmega4809?

    I'm willing to contribute, but this is new ground for me.

  8. focalintent commented on Aug 12, 2019

    @focalintent
    Contributor

    I have a nano every board on order and will be adding support for that soon, depending on when I have time. Once I have that running I might be able to get support for the WiFi uno rev 2 without having to buy a board.

  9. FDelporte commented on Oct 9, 2019

    @FDelporte

    Hello Daniel, any updates on this issue? Just discovered this issue after I bought a uno wifi v2 for a project for which the code was tested OK on an older uno... Would like to help but not enough knowledge of this level of coding for Arduino.

  10. kriegsman commented on Oct 9, 2019

    @kriegsman
    Member

    Hi @FDelporte. I'm sorry to bring the sad news, but Dan passed away just about a month ago. As you can imagine, that's slowed everything down.
    FastLED will continue, but I'm taking a bit of a break first. In the meantime, the FastLED community on Reddit is full of helpful people to assist with general questions -- although that probably doesn't help with the Uno Wifi v2 right now. Sorry to be the bearer of bad news.
    -Mark

  11. FDelporte commented on Oct 9, 2019

    @FDelporte

    Wow @kriegsman what a very bad news! I'm working on a book and am using this library as an integration library between arduino, java and raspberry pi. Was going to try to get in contact with Dan to thank him for this fantastic piece of work. Unfortunately I'm too late for that... My condolences to his family, friends and colleagues!!!
    Never mind the v2 support right now!

  12. kriegsman commented on Oct 9, 2019

    @kriegsman
    Member

    Thank you. It’s great to hear that you’re using FastLED in your book. I’ll let the family know that it was yet another way that Dan was helping people — and still is.

  13. 31 remaining items

  14. RexCyrus530 commented on Apr 30, 2023

    @RexCyrus530

    Hi @RexCyrus530 Thanks for reporting the issues with serial monitor. For your case, is the connection to the WS281x drivers good? Are you using these drivers, by chance? I'm referring something like the previous updates from @dephillipsmichael on Dec 20.

    I think we will need others to support the serial monitor interfaces. I think it's related to the SPI support, which hasn't enabled. Even if it's enabled, we need someone to test if it's works magically just by uncommenting the relevant lines. Not sure if you are up for that exploration?

    Just for a record for other contributors, if it's Arduino Uno WiFi Rev 2, the pin definition is here. https://github.com/FastLED/FastLED/pull/1050/files#diff-fbacd0d9102add5bb88db1941999c09bbab3d6b94d502bff19f10ef37cb5bcbfR227

    Yes, I am using the WS2812 drivers, and they're working just fine. I am also using the <SPI.h> library in the same sketch (for the nRF24L01 module), and it's working just fine too.

  15. ngyl88 commented on Sep 18, 2024

    @ngyl88
    Contributor

    Hi @RexCyrus530 , sorry for the reply after a long while. I would need your help to confirm if the issue "lost all serial communication capabilities with the new pin declarations" you reported on Apr 26, 2023 still exist with the latest release. If the issue still present, please also help us to confirm your setup. Thanks.

    • Board : Arduino Uno WiFi Rev 2
    • FastLED release version
    • other relevant info related to your issue, such as drivers / chipset you are using

    I found that the previous version 3.4.0 doesn't define the SPI interface

    • The SPI interface are added into ATmega4809 support, only starting release version 3.5.0. Ref: changes in fastpin_avr.h
    • In latest release version 3.7.7, the pins SPI_UART0_DATA and SPI_UART0_CLOCK aren't confirmed and enabled yet, but it's likely not required for serial monitor output.
    • FYI the support for ATmega4809 is added incrementally when there's a request / issue, as it powers multiple board.

    Hello, just checking in almost two years later. I downloaded the four edited files and swapped them for the ones in version 3.3.3, but I am still having issues. I can't get it to compile for the Uno WiFi Rev2. Has something changed since then, or am I doing something wrong?

    Hi @RexCyrus530 , please try with release 3.4.0 or the latest. The #1050 should be included in release 3.4.0, end of the year 2020.

    Ok, great. That worked for me. Thanks for the help.

    Just for your reference: it seems that I have lost all serial communication capabilities with the new pin declarations. The code compiles just fine, but the serial monitor always fails to open.

  16. added
    type: feature
    platform: avr
    area: core
    status: stale
    status: triage
    on Apr 16, 2026
  17. zackees commented on Jun 3, 2026

    @zackees
    Member

    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.

  18. zackees commented on Jun 3, 2026

    @zackees
    Member

    fbuild build-system status update (tracker: FastLED/fbuild#389)

    Build-tool side is healthy:

    • Board metadata nano_every.json present (platform = atmelmegaavr, core = arduino, variant = nona4809).
    • arduino_megaavr framework (arduino/ArduinoCore-megaavr) registered in avr_frameworks.json.
    • Smoke fixture at tests/platform/nano_every/ builds cleanly.
    • FastLED has m4809 pin support at src/platforms/avr/atmega/m4809/ (fastpin_avr_atmega4809.h and fastpin_avr_nano_every.h).

    The No hardware SPI pins defined message you saw is a #pragma message from FastLED's fastspi.h indicating the SPI peripheral isn't wired up for this MCU yet — output falls back to bitbang. That's FastLED-side, not a build-tool issue.

  19. zackees commented on Aug 1, 2026

    @zackees
    Member

    Closing as completed — ATmega4809 has been supported since 3.4.0, and there's now CI coverage.

    @PMPoulsen, the static_assert(validpin(), "Invalid pin specified") you hit was exactly what @focalintent diagnosed: no pin definitions for the part. There are now two maps under src/platforms/avr/atmega/m4809/:

    • fastpin_avr_nano_every.h — Nano Every, optimised with VPORTs
    • fastpin_avr_atmega4809.h — the generic map, whose header comment reads "include boards eg. Arduino Uno Wifi Rev 2 or Rev 3" — i.e. your board

    Plus clockless support (clockless_avr.h:429), hardware SPI via PORTMUX_TWISPIROUTEA (fastspi_avr.h:362), a nano_every entry in the CI board matrix, and a dedicated build_nano_every.yml workflow. Verified just now: bash compile nano_every --examples Blink succeeds at 6137 B flash.

    Landed via #1050 in 3.4.0 (end of 2020); the SPI interface followed in 3.5.0.

    Thank you @ngyl88 — you carried this issue for five years, answered people repeatedly, and did the incremental work as boards came up. That's the reason this is closeable.

    Two honest caveats rather than a clean bill of health:

    1. The Uno WiFi Rev2 path is untested. fastpin_avr_atmega4809.h:14 carries a live #warning "Untested platform. Please report any issues...". Only the Nano Every is exercised in CI. The Rev2 map is present and believed correct, not verified.

    2. @RexCyrus530's serial regression was never resolved. From 2023:

    it seems that I have lost all serial communication capabilities with the new pin declarations. The code compiles just fine, but the serial monitor always fails to open.

    That is still visible in the source — SPI_UART0_DATA and SPI_UART0_CLOCK are commented out at fastpin_avr_atmega4809.h:109-110, matching @ngyl88's note that they "aren't confirmed and enabled yet". So the loose end is real, not forgotten.

    @RexCyrus530 — that deserves its own issue rather than being buried at the bottom of a thread about a compile error. If you still see it, please open one with your board, FastLED version, and which pin you're driving LEDs on; a UART/LED pin collision on a board with no CI coverage is a specific, tractable question, unlike this one as originally posed.

  20. moved this from Triage to Done in FastLED Trackeron Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    MCUsarea: coreplatform: avrstatus: stalestatus: triagetype: feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions