igrr / mkspiffs

Tool to build and unpack SPIFFS images
MIT License
195 stars 92 forks source link

Field Updatable SPIFFS #68

Open marcwolf1960 opened 5 years ago

marcwolf1960 commented 5 years ago

Hi. I have a project where I am writing the initial code and loading it on to a ESP32 which has 4MB of Flash. It will read image files from the SPIFFS and display them on a screen. The people that will use this will have an app that I will write on their PC. This app will get them choose image files and I will then convert them in to a SPIFFS file with mkspiffs and then upload it to the ESP32 using the esptool.exe I will set the maximum limit on the SPIFFS file of 2mb.

What I am stuck on is the parameters needed to create and save an SPIFFS file, and load it up to the ESP32 in a format that can be read by the loaded Arduino program. I have included the batch file that I use to create and upload the SPIFFS image. I am also using Arduino 1.8.8 with the the following loaded settings (image)

Can you suggest what I am doing wrong, and how to fix it. I know with the ESP32 I can use OTA,Wifi,Web etc.. But I would prefer a direct connect for ease. Many thanks for any help. Dave

Capture1

Load_SPIFFS.txt

sfranzyshen commented 4 years ago

Something like this is used for the ESP8266 ... only the addresses should change for the ESP32 ...

It Should be 1028096, 2076672, or 3125248 (1MB, 2MB, or 3MB) for the Size It Should be (For ESP8266 4MB Device) 0x300000 for 1MB, 0x200000 for 2MB, or 0x100000 for 3MB for the Address ...

mkspiffs -c [DATADIR] --page 256 --block 8192 -s 1028096 [SPIFFS_IMG]
esptool -ca 0x300000 -cf [SPIFFS_IMG]