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