Podcast
Questions and Answers
Where is the file system stored?
Where is the file system stored?
- In the EEPROM
- On the same flash chip as the program (correct)
- On a separate WiFi chip
- On a separate flash chip
What determines the file system size?
What determines the file system size?
- The size of the sketch
- The size of the WiFi chip
- The size of the flash chip (correct)
- The size of the EEPROM
What is the purpose of the Mapping option?
What is the purpose of the Mapping option?
- To enable WiFi configuration
- To allow the user to select FS configuration at boot
- To disable the file system
- To allow a sketch to select FS configuration at boot according to flash chip size (correct)
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?
What is the purpose of the file system?
What is the purpose of the file system?
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?
What warning is associated with the use of SPIFFS?
What warning is associated with the use of SPIFFS?
Which filesystem focuses on higher performance and directory support?
Which filesystem focuses on higher performance and directory support?
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?
What is the file allocation unit size for LittleFS compared to SPIFFS?
What is the file allocation unit size for LittleFS compared to SPIFFS?
Flashcards are hidden until you start studying
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.