summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorJeff Epler <jepler@unpythonic.net>2021-03-07 09:20:50 -0600
committerJeff Epler <jepler@unpythonic.net>2021-03-07 09:37:18 -0600
commit156ee4833ab170d598991fd8d4d6f6d04c759744 (patch)
tree90e878591589572cc3e74dcd7daf2e87ca7ea413 /supervisor
parentd2056a46eebe1a4aff6bc7ca925f6f806a6ce2a2 (diff)
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
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/shared/flash.c2
1 files changed, 2 insertions, 0 deletions
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