Skip to content

Commit b5a955a

Browse files
authored
Merge pull request #4354 from jepler/disable-fat-partition
circuitpy_mpconfig: Disable flash multi-partition
2 parents 240909e + 156ee48 commit b5a955a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

py/circuitpy_mpconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
#define MICROPY_FATFS_LFN_CODE_PAGE (437)
134134
#define MICROPY_FATFS_USE_LABEL (1)
135135
#define MICROPY_FATFS_RPATH (2)
136-
#define MICROPY_FATFS_MULTI_PARTITION (1)
136+
#define MICROPY_FATFS_MULTI_PARTITION (0)
137137

138138
// Only enable this if you really need it. It allocates a byte cache of this size.
139139
// #define MICROPY_FATFS_MAX_SS (4096)

supervisor/shared/flash.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ void supervisor_flash_init_vfs(fs_user_mount_t *vfs) {
213213
vfs->base.type = &mp_fat_vfs_type;
214214
vfs->flags |= FSUSER_NATIVE | FSUSER_HAVE_IOCTL;
215215
vfs->fatfs.drv = vfs;
216+
#if MICROPY_FATFS_MULTI_PARTITION
216217
vfs->fatfs.part = 1; // flash filesystem lives on first partition
218+
#endif
217219
vfs->readblocks[0] = (mp_obj_t)&supervisor_flash_obj_readblocks_obj;
218220
vfs->readblocks[1] = (mp_obj_t)&supervisor_flash_obj;
219221
vfs->readblocks[2] = (mp_obj_t)flash_read_blocks; // native version

0 commit comments

Comments
 (0)