From 156ee4833ab170d598991fd8d4d6f6d04c759744 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 7 Mar 2021 09:20:50 -0600 Subject: circuitpy_mpconfig: Disable flash multi-partition This adds some additional code in mkfs which doesn't seem necessary, and Disabling it saves 172 bytes flash. Testing performed: Using a Feather M0 Adalogger, checked that * an sdcard could still be mounted (using adafruit_sdcard) * os.listdir() of "/" and "/sd" worked * CIRCUITPY still mounted --- supervisor/shared/flash.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'supervisor') diff --git a/supervisor/shared/flash.c b/supervisor/shared/flash.c index 1e09fe14b..66f2f0704 100644 --- a/supervisor/shared/flash.c +++ b/supervisor/shared/flash.c @@ -213,7 +213,9 @@ void supervisor_flash_init_vfs(fs_user_mount_t *vfs) { vfs->base.type = &mp_fat_vfs_type; vfs->flags |= FSUSER_NATIVE | FSUSER_HAVE_IOCTL; vfs->fatfs.drv = vfs; +#if MICROPY_FATFS_MULTI_PARTITION vfs->fatfs.part = 1; // flash filesystem lives on first partition +#endif vfs->readblocks[0] = (mp_obj_t)&supervisor_flash_obj_readblocks_obj; vfs->readblocks[1] = (mp_obj_t)&supervisor_flash_obj; vfs->readblocks[2] = (mp_obj_t)flash_read_blocks; // native version -- cgit v1.2.3