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
Connecting....
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
Changed.
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
nvs,data,nvs,0x9000,20K,
otadata,data,ota,0xe000,8K,
app0,app,ota_0,0x10000,3264K,
app1,app,ota_1,0x340000,3264K,
eeprom,data,153,0x670000,4K,
spiffs,data,spiffs,0x671000,1596K,
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?
eeprom
partition is obsolete now. EEPROM data is stored innvs
these days.