1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 06:53:52 +01:00

cpu/esp_common: use LittleFS2 as default FS

This commit is contained in:
Benjamin Valentin 2022-06-01 23:46:03 +02:00
parent 055a26d9d2
commit 344c065e2f
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 */