diff --git a/boards/adafruit-itsybitsy-m4/Makefile.dep b/boards/adafruit-itsybitsy-m4/Makefile.dep index 87253c2f37ac..d0ba96b7cb59 100644 --- a/boards/adafruit-itsybitsy-m4/Makefile.dep +++ b/boards/adafruit-itsybitsy-m4/Makefile.dep @@ -7,5 +7,11 @@ ifneq (,$(filter mtd,$(USEMODULE))) USEMODULE += mtd_spi_nor endif +# default to using littlefs2 on the external flash +ifneq (,$(filter vfs_default,$(USEMODULE))) + USEPKG += littlefs2 + USEMODULE += mtd +endif + # setup the samd21 arduino bootloader related dependencies include $(RIOTBOARD)/common/samdx1-arduino-bootloader/Makefile.dep diff --git a/boards/adafruit-itsybitsy-m4/board.c b/boards/adafruit-itsybitsy-m4/board.c index f908ebbf21b7..0ea8d0c23056 100644 --- a/boards/adafruit-itsybitsy-m4/board.c +++ b/boards/adafruit-itsybitsy-m4/board.c @@ -21,6 +21,9 @@ #include "periph/gpio.h" #include "mtd_spi_nor.h" #include "timex.h" +#ifdef MODULE_VFS_DEFAULT +#include "vfs_default.h" +#endif #ifdef MODULE_MTD /* GD25x16 */ @@ -52,4 +55,8 @@ static mtd_spi_nor_t samd51_nor_dev = { }; mtd_dev_t *mtd0 = (mtd_dev_t *)&samd51_nor_dev; + +#ifdef MODULE_VFS_DEFAULT +VFS_AUTO_MOUNT(littlefs2, VFS_MTD(samd51_nor_dev), VFS_DEFAULT_NVM(0), 0); +#endif #endif /* MODULE_MTD */