mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 05:00:26 +01:00
extmod: Consolidate FAT FS config to MICROPY_VFS_FAT across all ports.
This commit removes the Makefile-level MICROPY_FATFS config and moves the MICROPY_VFS_FAT config to the Makefile level to replace it. It also moves the include of the oofatfs source files in the build from each port to a central place in extmod/extmod.mk. For a port to enabled VFS FAT support it should now set MICROPY_VFS_FAT=1 at the level of the Makefile. This will include the relevant oofatfs files in the build and set MICROPY_VFS_FAT=1 at the C (preprocessor) level.
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
# This makefile fragment provides rules to build 3rd-party components for extmod modules
|
||||
|
||||
################################################################################
|
||||
# VFS FAT FS
|
||||
|
||||
OOFATFS_DIR = lib/oofatfs
|
||||
|
||||
# this sets the config file for FatFs
|
||||
CFLAGS_MOD += -DFFCONF_H=\"lib/oofatfs/ffconf.h\"
|
||||
CFLAGS_MOD += -DFFCONF_H=\"$(OOFATFS_DIR)/ffconf.h\"
|
||||
|
||||
ifeq ($(MICROPY_VFS_FAT),1)
|
||||
CFLAGS_MOD += -DMICROPY_VFS_FAT=1
|
||||
SRC_MOD += $(addprefix $(OOFATFS_DIR)/,\
|
||||
ff.c \
|
||||
ffunicode.c \
|
||||
)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# VFS littlefs
|
||||
|
||||
Reference in New Issue
Block a user