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

Throws FastLED errors for ESP32-S2 and ESP32-S3 #68

Open
romkey opened this issue Sep 23, 2022 · 1 comment
Open

Throws FastLED errors for ESP32-S2 and ESP32-S3 #68

romkey opened this issue Sep 23, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@romkey
Copy link

romkey commented Sep 23, 2022

Describe the bug
When building for an ESP32-S2 or ESP32-S3, Pixie_Chroma configures FastLED to use I2S support. Unfortunately FastLED's I2S code doesn't compile properly for these targets and throws errors.

The code in Pixie_Chroma that calls FastLED.addLeds<>() for different pins uses pins that are not available on the ESP32-S2 and ESP32-S3, causing FastLED to throw compile-time errors. It also doesn't allow for a few pins that are only available on those targets.

Pixie_Chroma also tries to use pin 27 for Quad Mode support. Pin 27 isn't available on the ESP32-S2 or ESP32-S3, and FastLED disallows it, throwing another error.

To Reproduce
Steps to reproduce the behavior:

  1. Build any example using an ESP32-S2 or ESP32-S3 board as a target.

Expected behavior
Pixie Chroma should configure FastLED properly to build for ESP32-S2 and ESP32-S3 targets. FastLED's I2S support doesn't build properly for these targets, and it allows and disallows the use of different pins for these targets.

When building for an ESP32-S2 or ESP32-S3 Pixie Chroma should let FastLED use its default configuration and should allow the use of all available pins on those boards and not try to use unavailable pins (like pin 27).

Screenshots
FastLED I2S issues:

Compiling .pio/build/lolin_s2_mini/lib46f/Pixie_Chroma/utility/pixie_animations.cpp.o
In file included from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/fastled_esp32.h:10,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms.h:36,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:54,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/Pixie_Chroma.h:74,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/pixie_chroma_internal.cpp:13:
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h: In static member function 'static void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::i2sInit()':
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:458:20: error: 'I2S1' was not declared in this scope
             i2s = &I2S1;
                    ^~~~
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:458:20: note: suggested alternative: 'I2S0'
             i2s = &I2S1;
                    ^~~~
                    I2S0
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:459:34: error: 'PERIPH_I2S1_MODULE' was not declared in this scope
             periph_module_enable(PERIPH_I2S1_MODULE);
                                  ^~~~~~~~~~~~~~~~~~
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:459:34: note: suggested alternative: 'PERIPH_I2S0_MODULE'
             periph_module_enable(PERIPH_I2S1_MODULE);
                                  ^~~~~~~~~~~~~~~~~~
                                  PERIPH_I2S0_MODULE
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:460:31: error: 'ETS_I2S1_INTR_SOURCE' was not declared in this scope
             interruptSource = ETS_I2S1_INTR_SOURCE;
                               ^~~~~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/fastled_esp32.h:10,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms.h:36,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:54,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/utility/../Pixie_Chroma.h:74,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/utility/pixie_animations.h:13,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/utility/pixie_animations.cpp:10:
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h: In static member function 'static void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::i2sInit()':
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:458:20: error: 'I2S1' was not declared in this scope

FastLED pin issues:

In file included from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/fastled_esp32.h:10,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms.h:36,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:54,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/Pixie_Chroma.h:74,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/pixie_chroma_internal.cpp:13:
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h: In instantiation of 'class ClocklessController<27, 60, 150, 90, (EOrder)66, 0, false, 5>':
.pio/libdeps/lolin_s2_mini/FastLED/src/chipsets.h:578:7:   required from 'class WS2812Controller800Khz<27, (EOrder)66>'
.pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:94:34:   required from 'class NEOPIXEL<27>'
.pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:316:28:   required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = NEOPIXEL; unsigned char DATA_PIN = 27]'
.pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/pixie_chroma_internal.cpp:265:3:   required from here
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:205:46: error: static assertion failed: Invalid pin specified
     static_assert(FastPin<DATA_PIN>::validpin(), "Invalid pin specified");
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h: In instantiation of 'class ClocklessController<22, 60, 150, 90, (EOrder)66, 0, false, 5>':
.pio/libdeps/lolin_s2_mini/FastLED/src/chipsets.h:578:7:   required from 'class WS2812Controller800Khz<22, (EOrder)66>'
.pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:107:52:   required from 'class WS2812B<22, (EOrder)66>'
.pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:304:39:   required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = WS2812B; unsigned char DATA_PIN = 22; EOrder RGB_ORDER = (EOrder)66]'
.pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/pixie_chroma_internal.cpp:2619:86:   required from here
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:205:46: error: static assertion failed: Invalid pin specified

I'm building with PlatformIO but I confirmed the same problems happen building with Arduino.

Desktop (please complete the following information):

  • FastLED 3.5.0
  • Pixie Chroma Version 1.2.0

Additional context
I'll submit a PR that should fix these problems. I've confirmed it works using a couple of different ESP32-S2 boards. For quad mode I substituted pin 26 for pin 27; I just picked that randomly and have no idea if you'd want to stick with that.

I added support in the CI file to test builds for both the S2 and S3 but I'm having lots of issues with CI failing in code I didn't touch, so that's not working.

I'd be happy to send you some ESP32-S2 and ESP32-S3 boards if you'd like.

The Pixie Chromas are really cool, nice job!

@romkey romkey added the bug Something isn't working label Sep 23, 2022
@andyshinn
Copy link

I am not sure why the library was forcing I2S. I removed this bit to use RMT and it seems to be working fine on my ESP32S3. andyshinn@8ca9552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants