Skip to content

Commit f9f998f

Browse files
committed
Improve file system documentation
1 parent b617ffa commit f9f998f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

hardware/esp8266com/esp8266/doc/reference.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,35 @@ const char HTTP[] PROGMEM = "http:";
105105

106106
## File system
107107

108+
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.
109+
110+
The following diagram illustrates flash layout used in Arduino environment:
111+
112+
|--------------|-------|---------------|--|--|--|--|--|
113+
^ ^ ^ ^ ^
114+
Sketch OTA update File system EEPROM WiFi config (SDK)
115+
116+
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:
117+
118+
Board | Flash chip size, bytes | File system size, bytes
119+
------|-----------------|-----------------
120+
Generic module | 512k | 64k
121+
Generic module | 1M | 64k, 128k, 256k, 512k
122+
Generic module | 2M | 1M
123+
Generic module | 4M | 3M
124+
Adafruit HUZZAH | 4M | 3M
125+
NodeMCU 0.9 | 4M | 3M
126+
NodeMCU 1.0 | 4M | 3M
127+
Olimex MOD-WIFI-ESP8266(-DEV)| 2M | 1M
128+
SparkFun Thing | 512k | 64k
129+
SweetPea ESP-210 | 4M | 3M
130+
131+
**Note:** to use any of file system functions in the sketch, add the following include to the sketch:
132+
133+
```c++
134+
#include "FS.h"
135+
```
136+
108137
### File system object (SPIFFS)
109138

110139
#### begin

0 commit comments

Comments
 (0)