A
Arduino3mo ago
pikaro

ESP32-S3 bootloader broken (?)

Hi! I somehow seem to have broken my Nano ESP32-S3 bootloader. Symptoms: - While the sketch runs (which works), dfu-util -l sees a device. - When I build with -t upload using dfu with platformio, I get a LIBUSB_ERROR_PIPE and the device resets. - After pressing the reset button just a single time, the LED turns and stays faint purple, which I think is what the reset guide calls firmware download mode. In this state, dfu-util -l doesn't see any devices. Repeated presses don't change this. - When starting the serial monitor in this mode, I get a repeated message:
[ 94][D][esp32-hal-tinyusb.c:680] tinyusb_enable_interface(): Interface CDC enabled
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40376de8
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
[ 94][D][esp32-hal-tinyusb.c:680] tinyusb_enable_interface(): Interface CDC enabled
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40376de8
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
- At 0x1000, I see binary... Wait, bootloader starts at 0x0, where did I get 0x1000... does have some strings at the start, looks like a bootloader. - Partition table looks as intended:
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 2M,
spiffs, data, spiffs, 0x230000, 11M,
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 2M,
spiffs, data, spiffs, 0x230000, 11M,
I tried zeroing otadata but it didn't change anything. I had also previously tried with a factory partition and without an otadata, same effect. I had previously reflashed the partition table manually a couple of times because neither esptool nor dfu seem to actually write it for some reason (esptool does write the spiffs partition itself, though), but dfu conveniently builds it with -t upload so I used that bin file. Flashing the sketch with esptool still works but it's much less convenient than dfu, so I'd like to restore the original behavior. Bootloader attached for reference. Can someone explain the behavior to me? What's going on internally, and how did I break things? Thanks!
5 Replies
AnonEngineering
AnonEngineering3mo ago
Please ask in #esp-help , this channel is for official Arduino products.
pikaro
pikaroOP3mo ago
The Nano ESP32 is not an Arduino product?
AnonEngineering
AnonEngineering3mo ago
no, ESP's are made by Espressif. you can code them with the Arduino IDE... My bad, just saw ESP, please carry on
pikaro
pikaroOP3mo ago
Fixed in #esp-help - my primary intent was getting an explanation, but switching to
platform = https://github.com/pioarduino/platform-espressif32.git
platform = https://github.com/pioarduino/platform-espressif32.git
and uploading with esptool once fixed it. So probably something toolchain-related that's not worth really digging into.

Did you find this page helpful?