You are reading a single comment by @vsvlad and its replies.
Click here to read the full conversation.
-
Thanks for compiling the firmware! FAT FS really works on ESP8266 4Mb. I tested a little bit (on selected range of 2Mb area) on file operations and it work as they should...
Initially, I checked that the E.flashFatFS method did not exist in the "official" firmware version 2v15, so I began to develop my own FS module. If this feature were enabled by default, then it would be possible to use it and not make other decisions.
Storage module is for directly accessible flash. AFAIK for ESP8266 only 1MB is directly mapped to CPU memory so that 196KB is probably some free space below 1MB.
The rest over 1MB needs to use some filesystem and looks like the board file has this commented out here https://github.com/espruino/Espruino/blob/master/boards/ESP8266_4MB.py#L31 unlike ESP32 board.
I think this is FAT filesystem on top of flash which would be OK for your mostly read only use case. Not really sure why it is disabled by default.
BTW, I just tried to build it with those lines uncommented and it does build fine. Also briefly tested in esp8266 4MB board and it seems to work somehow, the key is to use this http://www.espruino.com/Reference#l_E_flashFatFS and format the filesystem. By default it uses 250 4KB sectors near the end of flash as per https://github.com/espruino/Espruino/blob/master/libs/filesystem/fat_sd/flash_diskio.h#L24
Then one can use fs module or http://www.espruino.com/Reference#l_E_openFile
EDIT: build attached