PlatformIO Community

Reboot during OTA with error ELF file "SHA256: 0000000000000000" in arduino platform

I’m trying to use esp32 OTA and I’m getting a reboot when uploading. It says ELF file "SHA256: 0000000000000000". When I googled this I got discussions about this but they were all about the esp-idf platform and I’m using arduino. Also I didn’t understand those discussions because they were from platform developers.

Any ideas about what I’m doing wrong? My build output is …

PLATFORM: Espressif 32 (3.2.0) > AI Thinker ESP32-CAM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
 - framework-arduinoespressif32 3.10006.210326 (1.0.6)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - tool-openocd-esp32 2.1000.20201202 (10.0)
 - toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 28 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ArduinoOTA> 1.0
|   |-- <Update> 1.0
|   |-- <WiFi> 1.0
|   |-- <ESPmDNS> 1.0
|   |   |-- <WiFi> 1.0
|-- <WiFi> 1.0
Building in release mode
Retrieving maximum program size .pio\build\esp32cam\firmware.elf
Checking size .pio\build\esp32cam\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  16.9% (used 55216 bytes from 327680 bytes)
Flash: [==        ]  22.7% (used 937946 bytes from 4128768 bytes)

and the esp32 console output is …

Start updating sketch
Progress: 0%
ELF file SHA256: 0000000000000000

Backtrace: 0x4008e2e4:0x3ffb1e10 0x4008e55d:0x3ffb1e30 0x40149a51:0x3ffb1e50 0x4008b6ba:0x3ffb1e70 0x401498f2:0x3ffb1e90 0x400d3361:0x3ffb1eb0 0x4014c740:0x3ffb1ed0 0x4014c949:0x3ffb1ef0 0x400d3191:0x3ffb1f10 0x400d3322:0x3ffb1f70 0x400d1570:0x3ffb1f90 0x400d4d7d:0x3ffb1fb0 0x400901ee:0x3ffb1fd0


build_type = debug
monitor_filters = esp32_exception_decoder

to the platformio.ini and re-upload and re-monitor the application to get a readable backtrace. (docs, docs).

1 Like

I reduced the size of my ota partitions and it works now. It didn’t complain about flash usage with the larger partitions. It might just be a problem that went away by itself so I’ll try again with the bigger partitions. In any case I now know it can work.

Thanks for your trouble.

I just found out that my method of changing the partition table for esp32 is wrong. That might explain my problems and why I had to reduce the partition sizes. I don’t yet understand any of this but I thought I should point this out to lurkers.