Can't upload more than 1 MB to spiffs?

wrybread
Posts: 12
Joined: Tue Sep 24, 2019 12:53 am

Can't upload more than 1 MB to spiffs?

Postby wrybread » Tue Oct 29, 2019 7:19 am

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?

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

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

Postby lbernstone » Tue Oct 29, 2019 2:01 pm

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.

idahowalker
Posts: 166
Joined: Wed Aug 01, 2018 12:06 pm

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

Postby idahowalker » Tue Oct 29, 2019 2:12 pm

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)

Who is online

Users browsing this forum: Google [Bot], noweare and 73 guests