little fs is default

This commit is contained in:
gemu2015 2020-12-31 20:22:54 +01:00
parent 0de64f3376
commit 55d0f99910
3 changed files with 21 additions and 6 deletions

View File

@ -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,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x180000
5 app1 app ota_1 0x190000 0x180000
6 spiffs data spiffs 0x310000 0x0F0000

View File

@ -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,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x1F0000
5 app1 app ota_1 0x200000 0x1F0000
6 spiffs data spiffs 0x3F0000 0xC10000

View File

@ -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;
}