Podcast
Questions and Answers
Where is the file system stored?
Where is the file system stored?
What determines the file system size?
What determines the file system size?
What is the purpose of the Mapping option?
What is the purpose of the Mapping option?
What is the effect of adding the line FLASH_MAP_SETUP_CONFIG(FLASH_MAP_OTA_FS) in the sketch?
What is the effect of adding the line FLASH_MAP_SETUP_CONFIG(FLASH_MAP_OTA_FS) in the sketch?
Signup and view all the answers
What is the purpose of the file system?
What is the purpose of the file system?
Signup and view all the answers
What is the maximum file system size for a flash chip of size 2MBytes?
What is the maximum file system size for a flash chip of size 2MBytes?
Signup and view all the answers
What warning is associated with the use of SPIFFS?
What warning is associated with the use of SPIFFS?
Signup and view all the answers
Which filesystem focuses on higher performance and directory support?
Which filesystem focuses on higher performance and directory support?
Signup and view all the answers
What simple change is needed to convert from SPIFFS to LittleFS in code?
What simple change is needed to convert from SPIFFS to LittleFS in code?
Signup and view all the answers
What is the file allocation unit size for LittleFS compared to SPIFFS?
What is the file allocation unit size for LittleFS compared to SPIFFS?
Signup and view all the answers
Study Notes
Filesystem Overview
- File systems can be stored on the same flash chip as the program without modifying contents during sketch programming, allowing data storage for sketches, configurations, and web server content.
- Flash layout in Arduino includes dimensions for Sketch, OTA updates, file systems, EEPROM, and WiFi configuration.
Flash Configuration Options
- Filesystem size varies based on flash chip size. Available configurations include:
- FLASH_MAP_OTA_FS: Maximum space for onboard file system with OTA capability.
- FLASH_MAP_MAX_FS: Maximum space for onboard file system without OTA.
- FLASH_MAP_NO_FS: No onboard file system.
- Configuration can be invoked in a sketch using
FLASH_MAP_SETUP_CONFIG(FLASH_MAP_OTA_FS)
.
Flash Size and Filesystem Size
- Various flash chip sizes have specific onboard filesystem allocation:
- 512KBytes: 32KB (OTA), 64KB, 128KB (MAX).
- 1MBytes: Options range from 64KB (OTA) to 512KB (MAX).
- 2MBytes: 64KB, 128KB, 256KB (OTA), and 1MB (MAX).
- 4MBytes: Ranges from 1MB (OTA) to 3MB (MAX).
- 8MBytes: 6MB (OTA), up to 7MB (MAX).
- 16MBytes: 14MB (OTA), up to 15MB (MAX).
Including Filesystem Libraries
- To utilize file system functions in sketches, include the relevant libraries:
-
#include "FS.h"
for SPIFFS -
#include "LittleFS.h"
for LittleFS -
#include "SDFS.h"
for SDFS
-
SPIFFS Deprecation
- SPIFFS is deprecated and may be removed in future releases; transitioning to LittleFS is advised for better support and performance.
- LittleFS supports real directories and has faster operations compared to SPIFFS.
Comparison of SPIFFS and LittleFS
- SPIFFS: Suitable for constrained applications needing minimal flash overhead; however, lacks true directory support.
- LittleFS: Higher performance with directory support but has greater file and filesystem overhead.
- Incompatible on-flash implementations require choosing one filesystem per project; switching between them necessitates code changes for the API.
SDFS and SD Filesystem Support
- SDFS and FAT filesystems are supported on ESP8266 using “SD.h” for legacy applications.
- New applications should access the SDFS filesystem directly for additional features not available in the classic SD filesystem.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Learn about the flash layout in Arduino environment, including the file system, OTA update, EEPROM, and WiFi config. Understand how programming a new sketch doesn't modify file system contents.