Merge pull request #7739 from jepler/restore-mkfs-fat32-mostly

re-enable mkfs for >4GB filesystems whenver FULL_BUILD
This commit is contained in:
Dan Halbert 2023-03-17 12:52:21 -04:00 committed by GitHub
commit 9c1d83476e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -60,7 +60,9 @@
X(EISDIR) \
X(EINVAL) \
#define MICROPY_FATFS_EXFAT 0
#define MICROPY_FATFS_EXFAT (0)
// FAT32 mkfs takes about 500 bytes.
#define MICROPY_FF_MKFS_FAT32 (0)
// Only support simpler HID descriptors on SAMD21.
#define CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR (1)

View File

@ -255,6 +255,10 @@ typedef long mp_off_t;
#define MICROPY_FATFS_EXFAT (CIRCUITPY_FULL_BUILD)
#endif
#ifndef MICROPY_FF_MKFS_FAT32
#define MICROPY_FF_MKFS_FAT32 (CIRCUITPY_FULL_BUILD)
#endif
// LONGINT_IMPL_xxx are defined in the Makefile.
//
#ifdef LONGINT_IMPL_NONE

View File

@ -266,8 +266,15 @@ STATIC const mp_rom_map_elem_t storage_module_globals_table[] = {
//| This property cannot be changed, use `storage.remount` instead."""
//| ...
//|
//| @staticmethod
//| def mkfs(self) -> None:
//| """Format the block device, deleting any data that may have been there"""
//| """Format the block device, deleting any data that may have been there.
//|
//| **Limitations**: On SAMD21 builds, `mkfs()` will raise ``OSError(22)`` when
//| attempting to format filesystems larger than 4GB. The extra code to format larger
//| filesystems will not fit on these builds. You can still access
//| larger filesystems, but you will need to format the filesystem on another device.
//| """
//| ...
//| def open(self, path: str, mode: str) -> None:
//| """Like builtin ``open()``"""