Skip to content

SPIFFS

Description

SPIFFS (Serial Peripheral Interface Flash File System) is a simple file system which is located on the ESP flash storage. The advantage of the file system is that we can change the configuration and tls certificate files independently of the source code.

Uploade to SPIFFS

To uplode the SPIFFS we suggest to use PlatformIO but you are also free to use a other option like the Ardunio-IDE.

How To uploade the SPIFFS with PlatformIO

  1. Connect your ESP to your computer using a USB cable.

  2. In VS Code, open the PlatformIO extension on the left side and then open the esp device folder under PROJECT TASKS. You should then see a view similar to the following image. folder image

  3. Click on Build Filesystem Image and wait unitl the task finishes. This is indicated when SUCCESS is printed at the terminal. What happens is that the content in the top directory data is used to build a spiffs image.

  4. Click on Upload Filesystem Image. Now the previously build image is uploaded to the flash storage of the connected ESP.

EspSpiffs class

The EspSpiffs class is used to read the SPIFFS on the ESP in a structured way. The class is used by the other classes Keys ,Esp_Config and Esp_Logger.

This class uses the library SPIFFS.h from Espressif. It is described here.


Last update: 2022-02-11
Back to top