Flash Size: 4 MB
SPIFFS Flash: 1.5MB
Uploaded SPIFF .bin size: 1.3MB
I use MKSPIFFS to generate the .bin file using the following:
-b 4096
-s 0x13D620
-p 256
i.e. 4096 block, 1.3mb, 256 page
I have been able to fetch a SPIFFS .bin file with HttpUpdate updateSPIFFS (from [here])(https://github.com/espressif/arduino-es ... HTTPUpdate). Once I receive a HTTP_UPDATE_OK response, I list all files:
Code: Select all
void listAllFiles(){
File root = SPIFFS.open("/");
File file = root.openNextFile();
while(file){
Serial.print("FILE: ");
Serial.println(file.name());
file = root.openNextFile();
}if(!file){
Serial.println("no files found");
}
}
SPIFFS mounts successfully on initial boot - but once the spiffs .bin is uploaded and the board restarts, i sometimes get a SPIFFS: mount failed, -10025 message, which requires a few more restarts for a successful mount.
I have no idea what is going on... the SPIFFS image is clearly being written successfully for the listFiles function to be able to find the new files, but once rebooted, they go.
So far, the ESP32 Sketch Upload is uploading and saving the spiff data correctly - but this is not what I need
edit: i get the file and upload to spiffs using this method from the library above:
Code: Select all
t_httpUpdate_return ret = ESPhttpUpdate.updateSpiffs(fwImageURL);
EDIT: after continuing to try this... i ALWAYS get SPIFFS mount failed. I think the reason why the SPIFFS isn't saved is because the SPIFFS formats itself to be able to mount successfully and thus wiping.
Code: Select all
09:37:39.658 -> E (25) SPIFFS: mount failed, -10025
09:37:39.658 -> SPIFFS Mount Failed