How to configure PlatformIO for LittleFS (ESP32)

You can configure PlatformIO to use the LittleFS filesystem as opposed to the default SPIFFS using

platformio.ini
board_build.filesystem = littlefs

If you are ussing arduino-esp32, you might also need to specify to use a recent arduino-esp32 framework version, but I suggest to first try it out without using that option:

platform_packages_setting.ini
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.5

Full platformio.ini example

platformio_example.ini
[env:esp32dev]
platform = espressif32
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.5
board = esp32dev
framework = arduino
board_build.filesystem = littlefs
monitor_speed = 115200

 


Check out similar posts by category: ESP8266/ESP32, PlatformIO