0

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?

asked Mar 22, 2020 at 16:52
3
  • 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? Commented 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. Commented 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. Commented Mar 23, 2020 at 12:32

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.