Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
1st point when creating SPIFFS from Arduino IDE if there is a problem (full FS) we do not see error on IDE, looks like IDE says all is fine, resulting truncated files on SPIFFS (makes sense since we're full) but took me some time to understand why my web app wasn't working anymore because I did not had any error message from IDE;about SPIFFS error -)
So I tried to generate SPIFFS from command line and here something I don't understand, it says :
Total size is 124331 bytes, in worst case with 4096 block has we've got 6 files it could add 6*4096 = 24576 bytes so 148907 bytes which is less than 163840 defined on FS size ?
Do I'm doing something wrong ?
I've tested with 256K SPIFFS and here sketch result from HTTP query to my web app, as you can see total used returned by SPIFFS is 127006 so far below my 160K (163840) FS passed to mkspiffs
Doesn't look like you are doing anything wrong. But since SPIFFS_write tells that FS is full, it probably really is. Perhaps you can try setting block size to 8192? This way you will have less space wasted. I think we are using 8k blocks for the 256k FS option.
and of course
What does this mean, linker script tells SPIFF size is 0x402FB000 - 0x402CB000 = 0x3000 = 196608 bytes, that seems correct.
boards.txt says SPIFFS size if 0xFB000 - 0xCB000 = 0x3000 = 196608 bytes, that seems correct and consistent, so let's flash all of this (sketch + SPIFFS) from Arduino IDE and see what does my web interface says
Let's now check raw SPIFFS generated by IDE with mkspiffs
Same thing, all numbers seems consistent, but hey, wait, should my FS should be equal to 196608 bytes ?
All all this seems really look likes kind of voodoo on my side ;-)