[Solved] Choose 1M SPIFFS partition on ESP32

Hi guys,

Please, help to change default partitioning of the Flash in 4MB ESP-WROOM-32 to:

  • 3MB for the firmware with OTA;
  • 1MB for the SPIFFS.

For the ESP8266 modules I used one of these lines in platformio.ini:

board_build.ldscript = eagle.flash.4m1m.ld
build_flags = -Wl,-Teagle.flash.4m1m.ld

However, for the ESP32 this throws:

.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot open linker script file eagle.flash.4m1m.ld: No such file or directory

My current platformio.ini is:

platform = espressif32
board = wemosbat
framework = arduino
lib_deps = marvinroger/Homie@^3.0.1

Any idea is appreciated.

This line in platformio.ini addresses my needs pretty well:

board_build.partitions = min_spiffs.csv

This keeps almost 2MB for each OTA bank and 190KB for the SPIFFS. This is good enough for my case.

I am also trying to figure out partition tables using arduino-esp32 framework.
From PIO docs board_build.partitions = {table_name}.csv is placed in platformio.ini file. Is that all that is necessary ? The esp32 docs says the a binary is necessary since that is what is downloaded to the board.

Reply to myself. Yes that worked without having to do anything further.