Skip to content

Commit ca292f3

Browse files
committed
Turn off mkfs FAT32 on all SAMD21 builds; note in doc
1 parent 5569f10 commit ca292f3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

ports/atmel-samd/mpconfigport.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@
6060
X(EISDIR) \
6161
X(EINVAL) \
6262

63-
#define MICROPY_FATFS_EXFAT 0
63+
#define MICROPY_FATFS_EXFAT (0)
64+
// FAT32 mkfs takes about 500 bytes.
65+
#define MICROPY_FF_MKFS_FAT32 (0)
6466

6567
// Only support simpler HID descriptors on SAMD21.
6668
#define CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR (1)

shared-bindings/storage/__init__.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,13 @@ STATIC const mp_rom_map_elem_t storage_module_globals_table[] = {
268268
//|
269269
//| @staticmethod
270270
//| def mkfs(self) -> None:
271-
//| """Format the block device, deleting any data that may have been there"""
271+
//| """Format the block device, deleting any data that may have been there.
272+
//|
273+
//| **Limitations**: On SAMD21 builds, `mkfs()` will raise ``OSError(22)`` when
274+
//| attempting to format filesystems larger than 4GB. The extra code to format larger
275+
//| filesystems will not fit on these builds. You can still access
276+
//| larger filesystems, but you will need to format the filesystem on another device.
277+
//| """
272278
//| ...
273279
//| def open(self, path: str, mode: str) -> None:
274280
//| """Like builtin ``open()``"""

0 commit comments

Comments
 (0)