Page 1 of 1

Can't upload more than 1 MB to spiffs?

Posted: Tue Oct 29, 2019 7:19 am
by wrybread
I'm using this Melife ESP32 dev board:

https://www.amazon.com/gp/product/B07Q576VWZ

In the Arduino IDE I have the partition scheme set to "default 4mb with SPIFFS (1.2 MB app/1.5 MB spiffs)". However, if my SPIFFS gets any larger than 1MB, I get:

SPIFFS_write error(-10001): File system is full.

Is it possible to use all 1.5 MB of SPIFFS?

Re: Can't upload more than 1 MB to spiffs?

Posted: Tue Oct 29, 2019 2:01 pm
by lbernstone
In most file systems, there is a minimum physical file size. This means that even if the file is only 1 byte of content, it will use a full block when written to disk. I am not familiar with SPIFFS internals, but the physical block size on SPI_Flash is 4096, so that is probably the filesystem block size as well. If you have a lot of small files, they will take more space than if you just add up the numbers you get from a file listing.

Re: Can't upload more than 1 MB to spiffs?

Posted: Tue Oct 29, 2019 2:12 pm
by idahowalker
In this documentationhttps://docs.espressif.com/projects/esp ... piffs.html are these mentions
Block Size: 4096 (standard for SPI Flash)
Page Size: 256 (standard for SPI Flash)
Image Size: Size of the partition in bytes (can be obtained from a partition table)
Partition Offset: Starting address of the partition (can be obtained from a partition table)