Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastLED and esp8266 v2.5.1 #790

Closed
fabiuz7 opened this issue May 14, 2019 · 6 comments

Comments

Projects
None yet
4 participants
@fabiuz7
Copy link

commented May 14, 2019

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;

@zeitwesen

This comment has been minimized.

Copy link

commented May 15, 2019

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

@kriegsman kriegsman self-assigned this May 15, 2019

@kriegsman

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

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

@kriegsman

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

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.

@kriegsman kriegsman closed this in 6b6c9c1 May 15, 2019

@kriegsman

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

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

@samguyer

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

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

@zeitwesen

This comment has been minimized.

Copy link

commented May 15, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.