I'm trying to upload an empty SPIFFS image to my ESP32's flash memory via the ESP32 sketch data uploader but I'm getting the following error:

[SPIFFS] data   : /path/to/my/data
[SPIFFS] start  : 108068864
[SPIFFS] size   : 1596
[SPIFFS] page   : 256
[SPIFFS] block  : 4096
[SPIFFS] upload : /tmp/arduino_build_145856/firmware.spiffs.bin
[SPIFFS] address: 108068864
[SPIFFS] port   : /dev/ttyACM1
[SPIFFS] speed  : 921600
[SPIFFS] mode   : dio
[SPIFFS] freq   : 80m

esptool.py v2.8-dev
Serial port /dev/ttyACM1
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 84:0d:8e:18:a8:b4
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Configuring flash size...
Auto-detected Flash size: 8MB

A fatal error occurred: File /tmp/arduino_build_145856/firmware.spiffs.bin (length 1634304) at offset 108068864 will not fit in 8388608 bytes of flash. Use --flash-size argument, or change flashing address.
SPIFFS Upload failed!

I have chosen the correct flash-size (8MB) and the default partition scheme which worked before and I have also compiled/uploaded a version for 4MB flash size and the corresponding default partition scheme, but the data uploader still wants to write at the illegal address. I also erased the flash before uploading - no effect.

Why does it want to write to an offset of 108MB ?! Is there a bug in the data uploader? To odd things out I'd like to have a look at the partition scheme, but I can't find the directory where those are located (I'm on linux).

Has anyone experienced this before?

EDIT: this is the partition table I read back from the ESP32:

# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags

EDIT 2: I found that the partition table has to be stored at address 0x9000 on newer devices (while it was 0x8000 on older ones). Could this be the root of the problem? The program I uploaded worked fine, though (except for SPIFFS features). Where can I configure the partition table's offset when using the arduino IDE?

  • It's interesting that 108068864 is 0x6710000 whereas the partition table is for 0x671000. It's uploading at exactly a factor of 10 out. Something somewhere is calculating or obtaining a completely wrong value. What version of the ESP32 core are you using?
    – Majenko
    Mar 23, 2020 at 12:24
  • Looking at your partition table it must be a bit old, since the eeprom partition is obsolete now. EEPROM data is stored in nvs these days.
    – Majenko
    Mar 23, 2020 at 12:26
  • Oh, and the location of the partition table is controlled by the bootloader, not the age of the device.
    – Majenko
    Mar 23, 2020 at 12:32


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.