From cbffd0aadd71723365ddd3823ae1c12f4dbacad9 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 18 Jun 2016 00:58:57 +0300 Subject: [PATCH] unix: Disable FatFs VFS for normal build, keep enabled for coverage. It's enabled mostly for unit testing, and we do that in full with coverage build. --- unix/Makefile | 3 +-- unix/mpconfigport.h | 4 ++-- unix/mpconfigport_coverage.h | 4 ++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/unix/Makefile b/unix/Makefile index e209aa427d..23f7ea4877 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -156,12 +156,11 @@ LIB_SRC_C = $(addprefix lib/,\ timeutils/timeutils.c \ ) -ifeq ($(MICROPY_FATFS),1) +# FatFS VFS support LIB_SRC_C += $(addprefix lib/,\ fatfs/ff.c \ fatfs/option/ccsbcs.c \ ) -endif OBJ = $(PY_O) OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index 20ad2e26db..33b0cc4503 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -130,8 +130,8 @@ #define MICROPY_FATFS_VOLUMES (3) #define MICROPY_FATFS_MAX_SS (4096) #define MICROPY_FATFS_LFN_CODE_PAGE (437) /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */ -#define MICROPY_FSUSERMOUNT (1) -#define MICROPY_VFS_FAT (1) +#define MICROPY_FSUSERMOUNT (0) +#define MICROPY_VFS_FAT (0) // Define to MICROPY_ERROR_REPORTING_DETAILED to get function, etc. // names in exception messages (may require more RAM). diff --git a/unix/mpconfigport_coverage.h b/unix/mpconfigport_coverage.h index e5d5fd7a47..f9a6fbd9dd 100644 --- a/unix/mpconfigport_coverage.h +++ b/unix/mpconfigport_coverage.h @@ -31,3 +31,7 @@ #define MICROPY_PY_URANDOM_EXTRA_FUNCS (1) #define MICROPY_PY_IO_BUFFEREDWRITER (1) +#undef MICROPY_FSUSERMOUNT +#undef MICROPY_VFS_FAT +#define MICROPY_FSUSERMOUNT (1) +#define MICROPY_VFS_FAT (1)