-
Notifications
You must be signed in to change notification settings - Fork 32
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
[WEB Installer] Lolin S3 mini loads but does't boot wled #22
Comments
Does it work, when flashed from PlatformIO? |
Using PIO I noticed that there is no profile for ESP32-S3 at 4MB Flash but only 8M and above. (The S3 mini is 4MB) so the S3 mini does not work also in PIO. I tried an S3 PRO (16MB) and from PIO it works, but not from the web installer. I tried 0.14.1 and 0.14.2 and get different kind of errors |
@lost-hope I think we may need to rethink the way web installer is constructed. WLED binaries themselves are not dependent on the flash size (though they may not fit on every partition) so there can only be limited number of them for particular chip (i.e. 2 for ESP32, one with PSRAM and one without, excluding Ethernet). Classic ESP32 needs 2 files as PSRAM version requires GPIO16 and GPIO17. We can also integrate audio into every (compatible) build. @marcobrianza there will never be every possible board configuration in |
@blazoncek already thought of that cause of the esp8266 partitions. and that will introduce the issue with users selecting the wrong size.
So we only need 5 partition files: 1M 2M 4M 8M 16M i think i have an idea on how to handle it, but i am not completely sure if that works out. Then we have 6 Binaries for the chips (ESP8266, ESP32,ESP32 PSRAM, ESP32-S2 EPS32-S3 ESP32-C3) to cover all of the possible devices right. |
The user has the ESP still physically attached to the computer. I find this to be unproblematic as the user can flash again and again until correct flash size is selected. ESP8266 is a different beast as the flash size is embedded in the binary and esptool extracts it. WROVER needs separate binary since otherwise WLED defaults to GPIO16 for LEDs. PSRAM models of ESP32 use GPIO16 and GPIO17 for PSRAM and using regular ESP32 causes crashes upon boot. If we change default GPIO for LEDs (could also be dynamic) then only one binary would be needed. |
@marcobrianza THANK YOU. |
I now have all compatible ESP variants with various flash sizes and was able to determine and verify how flashing works (using PIO & esptool). As mentioned above ESP8266 is a special case since everything is included within firmware binary (including flash size, CPU clock, flash clock, etc) so each variant needs its own binary file (currently 6 in total: 80MHz 1MB, 80MHz 2MB, 80MHz 4MB, 160MHz 1MB, 160MHz 2MB and 160MHz 4MB, but the future may bring 4 additional files for 8MB and 16MB flash). There is a possibility to change CPU clock speed at runtime but current firmware can't do that. Yet. ESP32 and its variants S2, S3 and C3 use bootloader, partition map and firmware files to successfully flash a device. In my testing the bootloader was identical regardless of features used on a particular board, so one bootloader per ESP variant seems reasonable choice. Bootloader needs to be flashed at address 0x00000 for ESP32, ESP32-S3 and ESP32-C3 but at address 0x01000 for ESP32-S2. Partition map binary depends on the amount of flash memory a particular ESP device has. So far I've seen ESP32 (and variant) devices with 2MB, 4MB, 8MB and 16MB of flash. 2MB is unusable (even though it could run WLED) and will not be supported by WLED. Partition map needs to be flashed at address 0x08000 for all ESP32 variants. Firmware binaries depend on the features selected. For classic ESP32 we can have 3 main binaries: plain, with PSRAM and with Ethernet (each of them can/may have up to 6 usermods). Ethernet needs its binary because it needs (allocates) quite a few commonly used GPIO pins, otherwise it could be included in plain binary. PSRAM support needs its own binary for chip revisions < rev.3 which have hardware bug, the fix for hardware bug increases firmware binary by 100kB. For newer chips plain will (or should) correctly select and use PSRAM if available (from 0.15.0-b2 onward). 0.15.0-b2 (and newer) will also correctly detect ESP32-PICO variant which uses GPIO16 for flash. As I have no knowledge of how web installer works I am asking anyone who knows that, if an update to web installer could be made (and PRed) to include above information. I know that @softhack007 has a lot of experience with S3 so he may add something for devices with OPI. References on PSRAM for S3 (we use Arduino framework so some configuration may be hidden and not available): |
@blazoncek @lost-hope I remember that espressif docs say that -S3 with How do you want to handle "USB CDC" vs "serial UART usb" devices? Improv (setting wifi password after install) needs to communicate with WLED over Serial, so it's important that the right serial driver is active. |
Additionally, you need |
I am leaning towards only supporting 2 or maximum 3 S3 boards as otherwise we'll get into thousand devices mess soon.
Unfortunately that would mean users with unsupported devices will need to compile themselves. Those that are unable to do so should be instructed to get supported device instead or seek help on the forum or Discord. |
to be honest the Improv wifi setting is nice but can also be seen as a addition. If it woks: Nice. But as the possible list of binaries is already pretty long, i would decide against adding CDC and non CDC binaries... |
That's interesting. Where did you find that info? I also did a binary diff on bootloaders for all 3 variants of S3 build environment and they were identical on my system.
The output of actual flashing of S3-Zero board. |
I think this file is "generic" for all esp32 variants. It's not in the .pio/build folder because that one is directly taken from arduino-esp32. Its here https://github.com/espressif/arduino-esp32/blob/49b94644c693df22f0a15ffb9454e2d7c3e6c679/tools/partitions/boot_app0.bin The info that this one is needed came from a discussion with Wladi (@wled-install) - after erase_flash, app0 must be uploaded together with bootloader and partitions, unless you are using a combined bootloader file which includes bootloader, app0 and partitions. |
I'll be damned! |
i added the boot_app0 for these 3 in a separate branch: https://lost-hope.github.io/WLED-WebInstaller/ |
Just as additional info - found a nice summary of board variants: https://espeasy.readthedocs.io/en/latest/ESPEasy/ESPchips.html#quad-octal-spi-mode |
Update: i've compared all three variants. Results:
|
All of these boards support "Octal SPI" flash (per Espressif) but only in external implementation so Quad SPI is likely more common. FYI: What I observed a while ago on my batch of 50 cheap ESP01 was that they were not able to boot when flashed with common I am wondering if Octal PSRAM can function in (slower) |
Hi,
Partly "yes". Some "classic" ESP32 actually require But for S3/S2/C3, they always "worked for me" in
Espressif says "no" - and this is also my observation. It seems that you cannot talk to "octal PSRAM" in qspi mode. |
A good read (with links) : https://hackaday.com/2017/10/01/trouble-flashing-your-esp8266-meet-dio-and-qio/ |
About 8266 - I have some new "ESP01S" with 4MB here, and can run them at 80Mhz flash, qio mode, 160Mhz CPU. |
Yes, have those too, though they were 4 times as expensive as the other batch. 😄 |
@lost-hope did you receive any feedback? Did you also manage to make any progress regarding the change to separate ESP32 into flash size + binary selection? So far we know that we need:
Firmware may also have embedded flash speed (40MHz or 80MHz). 80MHz may not work on every ESP32 board but seems ok on S2, S3 and C3. |
Hi, I just did some testing installing 0.15.0-b2 Lolin C3 mini: works! Xiao C3: works! Lolin S3 PRO: works! Xiao S3: has this error: Lolin S3 mini: boot loops with this message about flash size: Lolin S2 MINI: installs but does not work: |
I'm dropping this here for reference: https://espeasy.readthedocs.io/en/latest/ESPEasy/ESPchips.html#quad-octal-spi-mode Quite an interesting read, confirming what was said above. |
I'm having the same problem flashing ESP32-S3-WROOM-1U-N8 and ESP32-S3-WROOM-1-N8, works fine on PIO (except for a seemingly erroneous LittleFS 'failed to mount' error), but the web installer gets boot looped. |
What version where you trying to install? |
The pre compiled binaries do not work for me but compiling them on my machine with |
I made my own board definition for an ESP32-C3 and ran into the same thing compiling and flashing v16. CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/super_mini_esp32c3.html
Everything compiles successfully with or without debug. However, upon first reboot is where the issues lie. Both methods are using PlatformIO (esptool). Without debug flag:
When using the debug flag:
|
That's all good and well. |
Yes, I'm glad adding the debug flag made it work, but I was mostly wondering why, seeing that it was the only build flag changed between tests. Without it (first image), the ESP freezes there and doesn't proceed further in booting. |
Can you explain what happens when you say it "freezes"? Because you have "Ada" on serial monitor, it actually means that boot is completed, and you either have WLED-AP or it connects to your router (if configured). |
That's where I'm a little confused too. Even though 'Ada' is shown, nothing more happens in the boot cycle; I get no further messages in the serial monitor and no AP is created or attempts connection to my home wifi. However, only when -D WLED_DEBUG is added to the compile options do things actually proceed further and creates the WLED-AP as normal. |
That is expected unless you use Improv or Adalight protocol. |
Hello, just tested the web installer with release 0.14.2 on Lolin s3 mini
The installer does its thing but the board does not boot wled afterwards.
The serial loops with these messages
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cd98e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x43c
load:0x403c9700,len:0xbec
load:0x403cc700,len:0x2a3c
entry 0x403c98d8
FYI tasmota web installer works correctly on this board
The text was updated successfully, but these errors were encountered: