From 208ae959792dbe667fca35ce94d14e140ec87ed3 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 10 Aug 2015 15:57:13 +0300 Subject: [PATCH] Improve file system documentation --- doc/reference.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc/reference.md b/doc/reference.md index e8c15e034..eca1f31e6 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -105,6 +105,35 @@ const char HTTP[] PROGMEM = "http:"; ## File system +Even though file system is stored on the same flash chip as the program, programming new sketch will not modify file system contents. This allows to use file system to store sketch data, configuration files, or content for Web server. + +The following diagram illustrates flash layout used in Arduino environment: + + |--------------|-------|---------------|--|--|--|--|--| + ^ ^ ^ ^ ^ + Sketch OTA update File system EEPROM WiFi config (SDK) + +File system size depends on the flash chip size. Depending on the board which is selected in IDE, you have the following options for flash size: + +Board | Flash chip size, bytes | File system size, bytes +------|-----------------|----------------- +Generic module | 512k | 64k +Generic module | 1M | 64k, 128k, 256k, 512k +Generic module | 2M | 1M +Generic module | 4M | 3M +Adafruit HUZZAH | 4M | 3M +NodeMCU 0.9 | 4M | 3M +NodeMCU 1.0 | 4M | 3M +Olimex MOD-WIFI-ESP8266(-DEV)| 2M | 1M +SparkFun Thing | 512k | 64k +SweetPea ESP-210 | 4M | 3M + +**Note:** to use any of file system functions in the sketch, add the following include to the sketch: + +```c++ +#include "FS.h" +``` + ### File system object (SPIFFS) #### begin