Skip to content

Support for the ESP32-S3 #2735

Closed
Closed

Description

@valhovey

Is your feature request related to a problem? Please describe.
No problem. :)

Describe the solution you'd like
I have multiple ESP32 S3 boards and would like to install WLED onto them. How hard would it be to configure the build for the S3?

Describe alternatives you've considered
I cloned the codebase and read through the existing configuration. I saw the config for the C3, but saw no config for the S3. I considered trying to add a config for the S3, but my knowledge in configuring the build parameters for this project is meager.

Additional context
I'm using the Adafruit QT Py ESP32 S3 board.

I'm happy to provide more context, just let me know. Thank you to all of the contributors for this amazing project!

Activity

  1. blazoncek commented on Jul 30, 2022

    @blazoncek
    Contributor

    S2, S3 an C3 are not officially supported.
    There were attempts by creating working environments but since not all libraries WLED uses are compatible with them we cannot guarantee it works.

  2. softhack007 commented on Jul 30, 2022

    @softhack007
    Member

    Just for sake of completemess, the same applies for other new ESP32 variants like ESP32-C2, ESP32-C6, ESP32-H2. Not officially supported by WLED.

    https://www.espressif.com/en/products/socs

    You may find some helpful information in other issue reports related to new SoC hardware:
    #966, #1940, #2299, #2596

    Some differences compared to ESP32:

    • latest arduino-esp32 core is needed. However that one has networking problems - see Resets with IDF 4.4/Arduino Core 2.x platform on network request #2518

    • Neopixelbus - some improvements for ESP32-S3 were made recently, however not availeable as a release yet. Also the number of LED PINs (channels) is less than ESP32 - only 4 RMT channels, and no I2S channels (due to completely different API from espressif)

    • the board has different GPIO properties (more GPIO, very few GPI (input-only)). Also number of LEDC channels, and maximum led PWM frequencies are different. Needs changes in PinManagerClass.

    Espressif has a technical comparison availeable here: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/chip-series-comparison.html#related-documents

  3. valhovey commented on Jul 30, 2022

    @valhovey
    Author

    @blazoncek @softhack007 thank you, I'll go ahead and order some ESP32 boards in the mean time to stay in the supported board set. Out of curiosity, is there documentation on what libraries are not supported or a rough estimate of how much work it would take to support these new boards?

  4. blazoncek commented on Jul 31, 2022

    @blazoncek
    Contributor

    No, but you can make one.
    LittleFS was one of them but latest updates seemed to fix that.
    Best is to to create an environment in PIO and start testing & debugging. Send your findings to library developers.

  5. softhack007 commented on Aug 2, 2022

    @softhack007
    Member

    Update: Actually I just ordered an ESP32-S3, because it seems to be the only one of the new models with a realistic chance to run SoundReactive with many LEDs. And it's a cool device, with new (vector) instructions that might speed up signal processing a lot.

    However compiling a working binary for ESP32-S3 will probably become a "long march"... will post updates in case there are news.

  6. Jason2866 commented on Aug 6, 2022

    @Jason2866
    Contributor

    Imho the most important part is to do the changed Gpios first. After we had done this in Tasmota all other changes where not that complicated. RMT channels are less for the new MCUs! LittleFS is running stable in Tasmota on all variants. We use heavily.
    Many libs are updated and do support the C3, S2 and S3 already.
    Latest Tasmota core is now v2.4.0.1. Can be used with

    platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.4.1/platform-espressif32-2.0.4.1.zip
    
  7. blazoncek commented on Sep 15, 2022

    @blazoncek
    Contributor

    Anyone interested may try https://github.com/blazoncek/WLED/tree/esp32-s2
    Support includes S2, S3 and C3

    EDIT: use PIO ESP32 core 5.1.1

  8. softhack007 commented on Sep 17, 2022

    @softhack007
    Member

    I use this in my platformio_override.ini. Select environment esp32s3dev_8MB, compile & upload via USB port.

    [esp32s3]
    ;; generic definitions for all ESP32-S3 boards
    build_flags = -g
      -DESP32
      -DARDUINO_ARCH_ESP32
      -DARDUINO_ARCH_ESP32S3
      -DCONFIG_IDF_TARGET_ESP32S3
      -D CONFIG_ASYNC_TCP_USE_WDT=0
      -D CONFIG_LITTLEFS_FOR_IDF_3_2
      -D WLED_WATCHDOG_TIMEOUT=0
      -DCO
    lib_deps =
      ${env.lib_deps}
      ;; currently we need the latest NeoPixelBus dev version, because it contains important bugfixes for -S3
      https://github.com/Makuna/NeoPixelBus.git#master @ 2.7.0
      https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
    [env:esp32s3dev_8MB]
    ;; "standard" ESP32-S3 development board, with 8MB FLASH, no PSRAM
    board = esp32-s3-devkitc-1
    framework = arduino
    platform = [email protected]
    platform_packages = platformio/[email protected]
    
    upload_speed = 921600
    build_unflags = ${common.build_unflags}
    build_flags =  ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=ESP32S3 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
      -D ARDUINO_USB_MODE=1 -D ARDUINO_USB_CDC_ON_BOOT=0 -D ARDUINO_USB_MSC_ON_BOOT=0
      -D LEDPIN=4
      -D STATUSLED=39
      -D BTNPIN=-1
      -D RLYPIN=-1
      -D IRPIN=-1
      -D HW_PIN_SDA=40
      -D HW_PIN_SCL=41
      ;; for audioreactive usermod
      -D USERMOD_AUDIOREACTIVE
      -D UM_AUDIOREACTIVE_USE_NEW_FFT
      -D AUDIOPIN=-1
      -D I2S_SDPIN=16
      -D I2S_CKPIN=17  
      -D I2S_WSPIN=47
      -D ES7243_SDAPIN=8
      -D ES7243_SCLPIN=18
    
    lib_deps = ${esp32s3.lib_deps}
      ;; for audioreactive usermod  
      https://github.com/kosme/arduinoFFT#develop @ 1.9.2
    
    board_build.partitions = tools/WLED_ESP32_8MB.csv
    ; board_build.flash_mode = dio
    board_build.flash_mode = qio
    board_build.f_flash = 80000000L
    ; board_build.f_flash = 120000000L
    monitor_filters = esp32_exception_decoder
    

    Edit: added pin definitions that don't conflict with other GPIO, at least on my board.

  9. softhack007 commented on Sep 17, 2022

    @softhack007
    Member

    If you want something to play with, this is an experimental build of https://github.com/blazoncek/WLED/tree/esp32-s2 for ESP32-S3 with 8MB FLASH:

    1. esptool erase_flash
    2. (optional) esptool write_flash 0x8000 ESP32S3_WLED_partitions_8M.bin
    3. esptool write_flash 0x0 esp32S3_bootloader_qio_80m_arduino204.bin
    4. esptool write_flash 0x00010000 WLED_esp32s3dev_8MB_experimental_debug_firmware_2209172.bin

    Files:

    Edit1: included fix for editing files using '/edit' URL. Build 2209172
    Edit2: added partitions table bin (optional - see comment below). In many cases, it seems to work without uploading the table.

  10. blazoncek commented on Sep 18, 2022

    @blazoncek
    Contributor

    Sometimes it may be necessary to update boot partition table as well. (At offset 0x8000)

  11. softhack007 commented on Sep 18, 2022

    @softhack007
    Member

    @blazoncek good point, did not think of that 👍 Is it the "partitions.bin" that I find in the .pio build folder?

    btw, my boot log starts like this. Not sure what these extra "load" messages and "SHA-256 comparison failed" means ...

    ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x1 (POWERON),boot:0x9 (SPI_FAST_FLASH_BOOT)
    SPIWP:0xee
    mode:DIO, clock div:1
    load:0x3fce3808,len:0x43c
    load:0x403c9700,len:0xbec
    load:0x403cc700,len:0x2a3c
    SHA-256 comparison failed:
    Calculated: dcde8d8a4817d9bf5d5d69a7247667264e4e10ac7493514868b61f5aa6146539
    Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
    Attempting to boot anyway...
    entry 0x403c98d8
    
    ---WLED 0.14.0-bl0 2209172 INIT---
    esp32 v4.4.1-472-gc9140caf8c
    arduino-esp32 v2.0.4
    CPU:   ESP32-S3 rev.0, 2 core(s), 240MHz.
    FLASH: 8MB, Mode 2 (DIO), speed 80MHz.
  12. softhack007 commented on Sep 18, 2022

    @softhack007
    Member

    PS: the "file editing bug" is also described here: me-no-dev/ESPAsyncWebServer#1210

  13. blazoncek commented on Sep 18, 2022

    @blazoncek
    Contributor

    @blazoncek good point, did not think of that 👍 Is it the "partitions.bin" that I find in the .pio build folder?

    Yes.

  14. linked a pull request that will close this issueMerge 0.14 to main #2841on Oct 19, 2022
  15. softhack007 commented on Jan 25, 2023

    @softhack007
    Member

    As of today, the best approach for -S3 is still to build & upload your own firmware yourself in platformio. Pre-build .bin files are not working everywhere.

    Make sure you don't flash the standard "ESP32 V4 bootloader" from the WLED release page. It will not run, as the -S3 has a different instruction set. You need a special bootloader for -S3. Build & Upload in platformio will take care of that.

  16. schmarrele commented on Mar 30, 2023

    @schmarrele

    To all users of the S3: Are there any major issues with the S3?
    I would like to use it for a sound reactive project and create a custom board for it.

  17. softhack007 commented on Mar 30, 2023

    @softhack007
    Member

    To all users of the S3: Are there any major issues with the S3?

    Well, it depends. All new MCUs (-S3/-S2/-C3) are still bleeding edge experimental with WLED.

    From technical perspective, the -S3 might be a good choice (compared to -S2 or -C3) as its performance (speed) is similar to "classic ESP32". Also it does support PDM and I2S microphones, while -C3 and -S2 lack PDM support.

    Personally I have one -S3 board without PSRAM, and it works ok for me. But I know others have -S3 boards where WLED would not even boot up. Similar stories exist for -S2/-C3.

    I can recall a few "limitations" with the new MCUs (not only for -S3), maybe there are more:

    • audioreactive: no support for analog microphones
    • I2C does not work well (may hang your device)
    • Serial sometimes hangs, then the chip heats up, and you need to erase flash to make it work again
    • bootloader: it can be a nightmare to find the "right" bootloader for each board. "classic esp32" bootloaders will not work.
    • ESP32 supports up to 10 LED outputs, but the max on -S3 is 4 outputs (3 on -S2, 2 on -C3).

    I would like to use it for a sound reactive project and create a custom board for it.

    As always, it's your call to see if that can be done. Maybe build a prototype, then test it to death. Then decide if what you have is good enough or not. Start small (one unit, do not order hundreds of PCBs at once, unless you don't care about the money), and be prepared that you might find that -S3 will not be good enough for what you want to achieve. The backup plan could be some "classic ESP32" like the pico-D4 (dual core).

  18. blazoncek commented on Mar 30, 2023

    @blazoncek
    Contributor

    To all users of the S3: Are there any major issues with the S3?

    Next time, please, use WLED forum or Discord for help and support questions.

  19. githubmoose commented on Apr 26, 2023

    @githubmoose

    WEMOS - LOLIN S3 PRO: >>>>> NO I2S <<<<<<

    NEVER BUY WEMOS!

  20. softhack007 commented on Apr 27, 2023

    @softhack007
    Member

    Talking about this one: https://www.wemos.cc/en/latest/s3/s3_pro.html ?

    WEMOS - LOLIN S3 PRO: >>>>> NO I2S <<<<<<

    Strange ... the -S3 has two I2S units, the only thing that's not possible is I2S-ADC for analog mics or analog line-in.
    Could be that you'd need to make your own custom build for this unit, to get a firmware with the right memory modes.

    Memory modes are a nightmare on -S3, and firmware for one specific mode will not run on other boards that require a different mode.

  21. githubmoose commented on Apr 27, 2023

    @githubmoose

    @softhack007: that is the most frustrating part, I know they áre in but not routed to the outside. One can indeed create some ‘pseudo-I2S out’ in fw but I have enough other challenges to spend my time on.
    Having said that, there are currently things going on to the east of where I live that make things like this again quite insignificant…..

  22. Fuxy22 commented on Jun 28, 2024

    @Fuxy22

    Dammit! Just got a "Arduino Nano ESP32" with a ESP32-S3 thinking any ESP32 chip would work... any plans to support this in the future? I foresee this becoming a really popular chip/pitfall.

    Well such is life... i'l go bash my head against a wall then...

  23. blazoncek commented on Jun 29, 2024

    @blazoncek
    Contributor

    The S3 is supported as far as WLED code goes. You may need to fiddle with flashing process, but that's all. @Fuxy22

    As for I2S, it has 2, but Espressif decided to change API and it is incompatible with NeoPixelBus (as of this writing), so WLED can only use 4 RMT channels for LED output. Audio works though, kind of.

  24. CYber-Dinium commented on Dec 7, 2024

    @CYber-Dinium

    Those ovoeride ini.
    I'm new songoneasy.
    How do I use them?

    And how to flash for esp32 s3 16 8mb
    Esl32 s3 8mb 4mb vroom variations.

  25. DedeHai commented on Dec 8, 2024

    @DedeHai
    Collaborator

    @CYber-Dinium github is for tracking issues, please use the forum or discord for support questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions