Cannot get WLED flashed on ESP32-Mini-1

Hello - I was told this wasn’t appropriate for a github issue so I am asking for help here - has anybody tried this particular board? Is an ESP32-Mini-1 different enough from an ESP32 that it would cause issues?

What happened?

Tried to flash WLED to ESP32-DevKitM-1 board, firmware flashes successfully but afterward the board is endlessly rebooting.

To Reproduce Bug

First tested using the https://install.wled.me/ website - flashing completed successfully but the console log view showed the ESP32 endlessly rebooting
Next I tried to use esptool - ran the command esptool write_flash 0x0 .\esp32_bootloader_v4.bin followed by esptool write_flash 0x10000 .\WLED_0.14.0_ESP32.bin and got the same result.
Finally I tried using esptool on a different ESP32-DevKitM-1 board in case it was a hardware issue but I got the same result

Expected Behavior

The ESP32 should boot up and start running the WLED program

Install Method

Binary from WLED . me

What version of WLED?

WLED_0.14.0_ESP32.bin

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

--Flashing Firmware--
esptool write_flash 0x10000 .\WLED_0.14.0_ESP32.bin
esptool.py v4.6
Found 3 serial ports
Serial port COM6
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-U4WDH (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c8:f0:9e:47:e5:98
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00010000 to 0x00148fff...
Compressed 1278256 bytes to 848392...
Wrote 1278256 bytes (848392 compressed) at 0x00010000 in 75.4 seconds (effective 135.6 kbit/s)...
Hash of data verified.

--Console output after flashing--

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DOUT, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x40145a60  PS      : 0x00060730  A0      : 0x80143c96  A1      : 0x3ffb1d70
A2      : 0x3ff440c0  A3      : 0x00000000  A4      : 0x00060b20  A5      : 0x00000001
A6      : 0x00060b20  A7      : 0x00000000  A8      : 0x00000000  A9      : 0x3ffb1d50
A10     : 0x00000000  A11     : 0x00060b23  A12     : 0x00060b20  A13     : 0x3ffb1efc
A14     : 0x000000ff  A15     : 0x00000000  SAR     : 0x00000010  EXCCAUSE: 0x0000001c
EXCVADDR: 0x0000001c  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000

ELF file SHA256: 0000000000000000

Backtrace: 0x40145a5d:0x3ffb1d70 0x40143c93:0x3ffb1d90 0x4014401a:0x3ffb1db0 0x400eea3b:0x3ffb1de0
0x400ef026:0x3ffb1e30 0x400f0d26:0x3ffb1e70 0x400f0e62:0x3ffb1e90 0x400f0f01:0x3ffb1ec0
0x400ebe22:0x3ffb1ee0 0x401123c1:0x3ffb1f20 0x40112616:0x3ffb1f40 0x401136ca:0x3ffb1f90
0x401316da:0x3ffb1fb0 0x4008b5d2:0x3ffb1fd0

Anything else?

Board info

Have you tried an older firmware?

I should have tried that before posting - I flashed 0.13.3 and it seems to work just fine - it creates the AP and I can log in. Thanks for the help!

Looks like I am to be added to the long list of those that have this problem.

Background:
I am not new to the ESP32 and its many flavors but I am new to WLED. (AMAZING!!!) So far, I have just used it with controllers that I bought. Two years ago, before I new about WLED, I designed a Christmas tree star with smart LEDs. I wrote firmware that included several effects but no where near what WLED can do. My primitive version accepted Bluetooth commands from a phone to change the effect. This year, I designed a new version that uses an ESP32-MINI. (I did this to avoid the issues that may be associated with the S and C versions.) I was careful about handling the strapping pins properly. The control pin is GPIO4.

Once built, I installed my original firmware and all was well. I use Visual Studio with the Visual Micro add-in as my IDE. It all uploads and runs just fine.

I have tried pretty much all of the ways to flash WLED onto the ESP32. This includes the WLED installer, esptool, and the Espressif flash tool. No joy. They all seem to flash but WLED doesn’t show up in my network list.

Here is the response from esptool…

‘C:\Users\RJuncosa\Desktop\esptool-v4.2.1-win64>esptool.exe -p COM6 write_flash 0x10000 WLED_0.14.4_ESP32.bin esptool.py v4.2.1 Serial port COM6 Connecting…
Detecting chip type… Unsupported detection protocol, switching and trying again… Connecting…
Detecting chip type… ESP32 Chip is ESP32-U4WDH (revision 3) Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: 1c:69:20:13:f7:d0
Uploading stub… Running stub… Stub running…
Configuring flash size… Flash will be erased from 0x00010000 to 0x00149fff…
Compressed 1284976 bytes to 852357…
Wrote 1284976 bytes (852357 compressed) at 0x00010000 in 78.5 seconds (effective 131.0 kbit/s)…
Hash of data verified.’

One things that I did notice is that when I flash my code with Visial Studio (which uses esptool) the reset after the load is clean. The transmit and receive LEDs on the board are off and the star runs its default effect. However, when I use esptool from the command line, the reset is not clean. The receive LED is lit. When I open a terminal, this is what I get…

`rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
Guru Meditation Error: Core 1 panic’ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x401468b8: 21a10041 291f812c 00106403
Core 1 register dump:
PC : 0x401468be PS : 0x00060d30 A0 : 0x1d75dce8 A1 : 0x3ffb1d70
A2 : 0x00000010 A3 : 0x00000002 A4 : 0x00060120 A5 : 0x00000001
A6 : 0x00060120 A7 : 0x00000000 A8 : 0x80146854 A9 : 0x3ffb1d50
A10 : 0x00000000 A11 : 0x00060123 A12 : 0x00060120 A13 : 0x3ffb1efc
A14 : 0x000000ff A15 : 0x00000000 SAR : 0x00000010 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0x00000000

ELF file SHA256: 0000000000000000

Backtrace: 0x401468bb:0x3ffb1d70 0x1d75dce5:0x3ffb1d90 |<-CORRUPTED’

I have flashed v0.14.4 and also v0.13.3 with the same result.

Of course, any assistance would be greatly appreciated.

The terminal dump is showing that WLED is not coming up after the flash.
Given that esptool happily did what you asked, points to something wrong in the flash process.

I’d try a full wipe of the esp (using esptool) before you flash WLED and see if that makes a difference.

When testing, the terminal output is the 1st thing I’d check (before looking for WiFi).
The results like:

are normal. What you want to see next is a simple “Ada” (rather than “Guru…”).

Keep at it, you’re getting close

There is a scene at the end of the movie “The African Queen” that comes to mind. Humphrey Bogart and Katherine Hepburn have gone through the most arduous, hazardous, dangerous journey down the river one their way to an open lake. They are exhausted and near death. They find themselves stuck in thick swamp grass and there seems no hope. They will die in the swamp.

What they don’t know is that they are just a handful of yards away from their destination. They just can’t see it through all the tall swamp grass. They lay down in the boat and have resigned themselves to their fate. But Providence was their salvation. An overnight rainstorm cause the water level to rise which lifted them off the bottom and while they were sleeping, they drifted to the fresh and open water.

Such was my journey. I was so close!!

I did as you suggested. Did clean erasures and tried all reasonable variations of the options. The bootloader version and the WLED version. Each time I started with a fresh erasure. Finally, I was lifted out of the swamp!

It all works. I had to use the v0.13.3 version. Not sure why but there you have it!

Here are pictures of the board and it mounted in its fancy star.

THANKS VERY MUCH FOR THE HELP!



1 Like

Now that you have a working load (proper stub and file system), it’s probably worth trying to get up to 0.14 (or higher).

Worst case you can always go back down…

No joy in that. I tried v0.14.3 and v0.14.4. They both have unhandled exceptions that put the device into that endless reboot.

I have attached the schematic. It is basically the same design as Espressif’s ESP32 development board. Nothing stands out to me that is different enough that it would not be compatible with WLED.

As I said in another thread, I would like to move to the ESP32-C3 for all future designs. I can put whatever is needed on the board to ensure compatibility with WLED. I’m just not sure what that is.

Looking at another thread, I noticed a comment that someone had about ESP-01S issues.
In particular, they had problems with powering via USB.

While your setup is quite small (12 LEDs), it might be worth trying an external power supply to see if it makes any difference.

I only use the USB connection from the computer to flash the device. After that, I just use a USB charger for power. That should be plenty of current. Also, when flashing, none of the LEDs are lit anyway. My design uses GPIO4 and the default is GPIO0 so when it comes up, all of the LEDs are off. (My original design with firmware that I wrote, does just fine with the 12 LEDs.)

I understand your power setup should be sufficient.

I’m just trying to suggest an attack on the issue you haven’t tried as the usual stuff hasn’t worked.
Powering via an external supply while flashing, may make a difference even though it’s not a typical solution.

Another thought - is there a chance this is a bad batch of boards???

I get what you’re saying but the theory doesn’t explain what I am seeing. If it was power related during flashing, why does my old firmware (non-WLED) flash and operate just fine? Why does the bootloader load just fine? Why does v0.13.3 flash and operate just fine? Why would v0.14.3 and v.0.14.4 indicate a proper flash but get into the endless loop? I would think a corrupted flash would be random as to where it would become corrupt and there for not show the same unhandled exceptions.

I have been buying boards from this house for several years and never had a bad one. This is one of the simplest. If it is a bad board, it was because I designed it that way :slight_smile: Also, I built up two of them and they all have the same issue.