diff --git a/esp32_partition_app1572k_spiffs983k.csv b/esp32_partition_app1572k_spiffs983k.csv new file mode 100644 index 000000000..12ea02fda --- /dev/null +++ b/esp32_partition_app1572k_spiffs983k.csv @@ -0,0 +1,6 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 0x5000, +otadata, data, ota, 0xe000, 0x2000, +app0, app, ota_0, 0x10000, 0x180000, +app1, app, ota_1, 0x190000, 0x180000, +spiffs, data, spiffs, 0x310000,0x0F0000, diff --git a/esp32_partition_app1984k_spiffs12M.csv b/esp32_partition_app1984k_spiffs12M.csv new file mode 100644 index 000000000..3ffb831ba --- /dev/null +++ b/esp32_partition_app1984k_spiffs12M.csv @@ -0,0 +1,6 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 0x5000, +otadata, data, ota, 0xe000, 0x2000, +app0, app, ota_0, 0x10000, 0x1F0000, +app1, app, ota_1, 0x200000, 0x1F0000, +spiffs, data, spiffs, 0x3F0000,0xC10000, diff --git a/tasmota/xdrv_98_filesystem.ino b/tasmota/xdrv_98_filesystem.ino index 36984a992..78b79a2be 100644 --- a/tasmota/xdrv_98_filesystem.ino +++ b/tasmota/xdrv_98_filesystem.ino @@ -119,10 +119,13 @@ void UFSInit(void) { return; } #else - ufsp = &FFat; - if (!FFat.begin(true)) { - ufsp = &LITTLEFS; - if (!LITTLEFS.begin(true)) { + // try lfs first + ufsp = &LITTLEFS; + if (!LITTLEFS.begin(true)) { + // ffat is second + ufsp = &FFat; + if (!FFat.begin(true)) { + // spiffs is last ufsp = &SPIFFS; if (!SPIFFS.begin(true)) { return; @@ -130,11 +133,11 @@ void UFSInit(void) { ufs_type = UFS_TSPIFFS; return; } - ufs_type = UFS_TLFS; + ufs_type = UFS_TFAT; return; } #endif - ufs_type = UFS_TFAT; + ufs_type = UFS_TLFS; return; }