Hello there!
We are currently working on an industrial application using ESP-IDF and an ESP-32S3-WROOM-2 module.
For this application we need to save some amount of data on the Chips flash itself, mostly configuration data and similar, rather than an external data store like an SD Card. We know we can define a filesystem partition using a custom partitions table. However we aren't sure what filesystem we want to use.
We know that SPIFFS and FAT are supported officially and that there is a port of littlefs for ESP32s. We also know that there are some inherent issues with SPIFFS so we are leaning towards using either FAT with Wear Levelling or littlefs.
Does anybody have any recommendations in that regard? Maybe some further tips?
Thanks in advance!
Recommended Filesystem Type?
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: Recommended Filesystem Type?
For configuration, maybe nvs will do the job?
-
- Posts: 3
- Joined: Fri Oct 27, 2023 8:50 am
Re: Recommended Filesystem Type?
We thought about NVS, and it may be the right choice for some options, but we have to store some pretty large amounts of data, preferably in JSON format, so NVS isn't the right choice for the majority. But some things we can likely store in NVS.
Re: Recommended Filesystem Type?
NVS for configurations for sure. I did not try FAT, I had issues with SPIFFS, but LittleFS turned out to be faster and without issues - used that one for storing webpages in 4MB partition for example.
Re: Recommended Filesystem Type?
Hi @dmglogowski,
NVS is designed for storing configuration values in a form of key:value pairs, and it introduces extra overhead and limitations needed for internal handling of the data. It is not suitable as a common file-system - just to confirm your findings. Details available at https://docs.espressif.com/projects/esp ... flash.html.
For storing general data (incl. large datasets), I recommend the FatFS filesystem (https://docs.espressif.com/projects/esp ... fatfs.html). It's frequently used and performs well for the most scenarios - SPIFFS can be troublesome due to its garbage collection design (significant slowdown when the files occupy more than 2/3 of available partition space, for instance), it doesn't support directories etc.
LittleFS may work for you as well, depending on your application details.
NVS is designed for storing configuration values in a form of key:value pairs, and it introduces extra overhead and limitations needed for internal handling of the data. It is not suitable as a common file-system - just to confirm your findings. Details available at https://docs.espressif.com/projects/esp ... flash.html.
For storing general data (incl. large datasets), I recommend the FatFS filesystem (https://docs.espressif.com/projects/esp ... fatfs.html). It's frequently used and performs well for the most scenarios - SPIFFS can be troublesome due to its garbage collection design (significant slowdown when the files occupy more than 2/3 of available partition space, for instance), it doesn't support directories etc.
LittleFS may work for you as well, depending on your application details.
-
- Posts: 3
- Joined: Fri Oct 27, 2023 8:50 am
Re: Recommended Filesystem Type?
Thanks to everyone for their input!
It is currently looking like we are going to use FAT with wear levelling for the larger JSON style configurations and NVS for other configs which can change easily on the fly.
It is currently looking like we are going to use FAT with wear levelling for the larger JSON style configurations and NVS for other configs which can change easily on the fly.
Who is online
Users browsing this forum: No registered users and 249 guests