esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
291 stars 34 forks source link

FastLED is not compiling in under the 12.0 version. #3906

Open nielsnl68 opened 1 year ago

nielsnl68 commented 1 year ago

The problem

Hello,

Sadly the current FastLED version is not compatible with the current version. I have tried to modifying the component but it was a bit to complicated for me to fix the issue,

this are the errors i see, a lot of register flags that are no more supported:

In file included from /data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/FastLED.h:50,
                 from src/esphome/components/fastled_base/fastled_light.h:16,
                 from src/esphome.h:25,
                 from src/main.cpp:3:
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/fastpin.h:61:37: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   61 |  inline void hi(register port_ptr_t port) __attribute__ ((always_inline)) { *port |= mPinMask; }
      |                                     ^~~~
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/fastspi_types.h:22:82: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   22 |     static __attribute__((always_inline)) inline uint8_t adjust(register uint8_t data) { return data; }
      |                                                                                  ^~~~
In file included from /data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/fastled_esp8266.h:3,
                 from /data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms.h:34,
                 from /data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/FastLED.h:54,
                 from src/esphome/components/fastled_base/fastled_light.h:16,
                 from src/esphome.h:25,
                 from src/main.cpp:3:
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/fastpin_esp8266.h:24:44: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   24 |     inline static void set(register port_t val) __attribute__ ((always_inline)) { if(PIN < 16) { _GPB._GPO = val; } else { GP16O = val; }}
      |                                            ^~~

/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_esp8266.h: In static member function 'static bool ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::writeBits(uint32_t&, uint32_t)':
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_esp8266.h:55:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   55 |     for(register uint32_t i = BITS; i > 0; --i) {
      |                           ^
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_esp8266.h: In static member function 'static uint32_t ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showRGBInternal(PixelController<RGB_ORDER>)':
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_esp8266.h:83:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   83 |   register uint32_t b = pixels.loadAndScale0();
      |                     ^
In file included from /data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/fastled_esp8266.h:5,
                 from /data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms.h:34,
                 from /data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/FastLED.h:54,
                 from src/esphome/components/fastled_base/fastled_light.h:16,
                 from src/esphome.h:25,
                 from src/main.cpp:3:
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_block_esp8266.h: At global scope:
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_block_esp8266.h:73:111: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   73 |    template<int BITS,int PX> __attribute__ ((always_inline)) inline static void writeBits(register uint32_t & last_mark, register Lines & b, PixelController<RGB_ORDER, LANES, PORT_MASK> &pixels) { // , register uint32_t & b2)  {
      |                                                                                                               ^~~~~~~~~

/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_block_esp8266.h: In static member function 'static void InlineBlockClocklessController<LANES, FIRST_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::writeBits(uint32_t&, InlineBlockClocklessController<LANES, FIRST_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::Lines&, PixelController<RGB_ORDER, LANES, (((1 << ((LANES < 6) ? LANES : 6)) - 1) & 65535)>&)':
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_block_esp8266.h:77:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   77 |   register uint8_t d = pixels.template getd<PX>(pixels);
      |                    ^

/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_esp8266.h: In instantiation of 'static bool ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::writeBits(uint32_t&, uint32_t) [with int BITS = 8; int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85; uint32_t = unsigned int]':
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_esp8266.h:113:27:   required from 'static uint32_t ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showRGBInternal(PixelController<RGB_ORDER>) [with int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85; uint32_t = unsigned int]'
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_esp8266.h:41:27:   required from 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showPixels(PixelController<RGB_ORDER>&) [with int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85]'
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_esp8266.h:38:15:   required from here
/data/lum-iot05/.piolibdeps/lum-iot05/FastLED/src/platforms/esp/8266/clockless_esp8266.h:55:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   55 |     for(register uint32_t i = BITS; i > 0; --i) {
      |                           ^

This is just a short list of the error i see.

Which version of ESPHome has the issue?

2022.12+

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

current

What platform are you using?

ESP8266

Board

esp8266 and esp32

Component causing the issue

fastled

Example YAML snippet

light:
  - platform: fastled_clockless
    rgb_order: GRB
    chipset: WS2812
    pin: GPIO4
    num_leds: 30
    restore_mode: RESTORE_AND_OFF
    name: "${device} NeoPixel Light"
    #effect: colored_strobe
    id: my_light

Anything in the logs that might be useful for us?

No response

Additional information

No response

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.