1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

Merge pull request #18159 from benpicco/cpu/esp-vfs_default

cpu/esp_common: use LittleFS2 as default FS
This commit is contained in:
Gunar Schorcht 2022-06-04 12:24:54 +02:00 committed by GitHub
commit c485bd4d92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -66,6 +66,11 @@ ifneq (,$(filter 4 5,$(LOG_LEVEL)))
USEMODULE += esp_log_startup
endif
# default to using littlefs2 on the SPI flash
ifneq (,$(filter vfs_default,$(USEMODULE)))
USEMODULE += littlefs2
endif
# each device has SPI flash memory, but it has to be enabled explicitly
ifneq (,$(filter esp_spiffs,$(USEMODULE)))
USEMODULE += spiffs

View File

@ -63,6 +63,11 @@ mtd_dev_t* mtd0 = 0;
static mtd_dev_t _flash_dev;
static mtd_desc_t _flash_driver;
#ifdef MODULE_VFS_DEFAULT
#include "vfs_default.h"
VFS_AUTO_MOUNT(littlefs2, { .dev = &_flash_dev }, VFS_DEFAULT_NVM(0), 0);
#endif
#ifdef MCU_ESP8266
/* for source code compatibility with ESP32 SDK */