Skip to content

Commit

Permalink
boards/same54-xpro: add support for lwEXT4
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Feb 25, 2023
1 parent c1a8a5c commit 020aac6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion boards/same54-xpro/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ endif
# default to using littlefs2 on the external flash and fatfs on SD card
ifneq (,$(filter vfs_default,$(USEMODULE)))
USEPKG += littlefs2
USEMODULE += fatfs_vfs
# if ext2/3/4 is used, don't use FAT
ifeq (,$(filter lwext%_vfs,$(USEMODULE)))
USEMODULE += fatfs_vfs
endif
USEMODULE += mtd
endif
6 changes: 6 additions & 0 deletions boards/same54-xpro/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ static mtd_sam0_sdhc_t sdhc_dev = {
mtd_dev_t *mtd2 = (mtd_dev_t *)&sdhc_dev;

#ifdef MODULE_VFS_DEFAULT
/* default to FAT */
#if defined(MODULE_FATFS_VFS)
VFS_AUTO_MOUNT(fatfs, VFS_MTD(sdhc_dev), VFS_DEFAULT_SD(0), 1);
/* but also support ext2/3/4 */
#elif defined(MODULE_LWEXT4)
VFS_AUTO_MOUNT(lwext4, VFS_MTD(sdhc_dev), VFS_DEFAULT_SD(0), 1);
#endif
#endif /* MODULE_VFS_DEFAULT */
#endif /* MODULE_SAM0_SDHC */

0 comments on commit 020aac6

Please sign in to comment.