Skip to content

FastLED and esp8266 v2.5.1 #790

Closed
Closed

Description

@fabianoriccardi

Hi,
It seems there is an incompatibility with new esp8266-arduino release v2.5.1. The previous version 2.5.0 was fine. Even the simplest example (blink.ino) fails:

C:\Users\myuser\arduino\libraries\FastLED/platforms/esp/8266/led_sysdefs_esp8266.h:15:17: error: conflicting declaration 'typedef uint8_t boolean'

typedef uint8_t boolean;

Activity

  1. zeitwesen commented on May 15, 2019

    @zeitwesen

    can also confirm the problem. compiling on 2.5.0 is fine, build breaking with 2.5.1

  2. self-assigned this
    on May 15, 2019
  3. kriegsman commented on May 15, 2019

    @kriegsman
    Member

    Thank you for the reports. I'll try to take a look at this today.

  4. kriegsman commented on May 15, 2019

    @kriegsman
    Member

    Looks like they (ESP) changed their definition from
    typedef uint8_t boolean;
    to
    typedef bool boolean;
    and we (FastLED) had a copy of the old definition in our header file, possibly from when we were working with the pre-2.0 versions of the ESP toolchain.

    Simply commenting out line 15 from led_sysdefs_esp8266.h allows the compilation to succeed.

    There could potentially be some extremely small and subtle semantic differences form this change, as has been discussed over in this related Arduino/esp issue esp8266/Arduino#5440 but I really don't think that we're going to run into any of those problems in real life, as we don't actually use boolean at all in any of our ESP code.

    "Official" fix committed below; in the meantime if you need to you're welcome to do your own local work-around by opening arduino/libraries/FastLED/platforms/esp/8266/led_sysdefs_esp8266.h and deleting line 15, the one that says typedef uint8_t boolean;. Likewise, arduino/libraries/FastLED/platforms/esp/32/led_sysdefs_esp8266.h needed the same change for ESP32.

    Tested that compilation succeeds with this change under all published ESP8266 toolchains from 2.0.0 through 2.5.1.

  5. kriegsman commented on May 15, 2019

    @kriegsman
    Member

    cc'ing @samguyer as a heads-up, just in case.

  6. samguyer commented on May 15, 2019

    @samguyer
    Contributor

    Thanks @kriegsman. There have been a few of these weird collisions with ESP32 definitions.

  7. zeitwesen commented on May 15, 2019

    @zeitwesen

    Thanks @kriegsman. I can confirm it is working with your fix. Nice work!

  8. added 2 commits that reference this issue on Nov 30, 2019
    fe2a30a
    c3b7a15
  9. added a commit that references this issue on Nov 10, 2020
    e61e95a
  10. added a commit that references this issue on Feb 29, 2024
    6b6c9c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions