mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fatfsgen.py: enabled 512 sized sectors
This commit is contained in:
parent
3f3c9be14c
commit
ca5bc94c27
@ -42,7 +42,10 @@ FATFS_SECONDS_GRANULARITY: int = 2
|
||||
LONG_NAMES_ENCODING: str = 'utf-16'
|
||||
SHORT_NAMES_ENCODING: str = 'utf-8'
|
||||
|
||||
ALLOWED_SECTOR_SIZES: List[int] = [4096]
|
||||
# compatible with WL_SECTOR_SIZE
|
||||
# choices are WL_SECTOR_SIZE_512 and WL_SECTOR_SIZE_4096
|
||||
ALLOWED_SECTOR_SIZES: List[int] = [512, 4096]
|
||||
|
||||
ALLOWED_SECTORS_PER_CLUSTER: List[int] = [1, 2, 4, 8, 16, 32, 64, 128]
|
||||
|
||||
|
||||
@ -280,4 +283,5 @@ class FATDefaults:
|
||||
TEMP_BUFFER_SIZE: int = 32
|
||||
UPDATE_RATE: int = 16
|
||||
WR_SIZE: int = 16
|
||||
# wear leveling metadata (config sector) contains always sector size 4096
|
||||
WL_SECTOR_SIZE: int = 4096
|
||||
|
@ -161,6 +161,8 @@ class FATFS:
|
||||
|
||||
def main() -> None:
|
||||
args = get_args_for_partition_generator('Create a FAT filesystem and populate it with directory content')
|
||||
if args.sector_size != 0x1000:
|
||||
raise NotImplementedError('The sector size not equal to 4096 is currently not supported for read-only mode!')
|
||||
fatfs = FATFS(sector_size=args.sector_size,
|
||||
sectors_per_cluster=args.sectors_per_cluster,
|
||||
size=args.partition_size,
|
||||
|
@ -82,6 +82,7 @@ class WLFATFS:
|
||||
|
||||
def __init__(self,
|
||||
size: int = FATDefaults.SIZE,
|
||||
sector_size: int = FATDefaults.SECTOR_SIZE,
|
||||
reserved_sectors_cnt: int = FATDefaults.RESERVED_SECTORS_COUNT,
|
||||
fat_tables_cnt: int = FATDefaults.FAT_TABLES_COUNT,
|
||||
sectors_per_cluster: int = FATDefaults.SECTORS_PER_CLUSTER,
|
||||
@ -122,7 +123,7 @@ class WLFATFS:
|
||||
reserved_sectors_cnt=reserved_sectors_cnt,
|
||||
fat_tables_cnt=fat_tables_cnt,
|
||||
sectors_per_cluster=sectors_per_cluster,
|
||||
sector_size=FATDefaults.WL_SECTOR_SIZE,
|
||||
sector_size=sector_size,
|
||||
root_entry_count=root_entry_count,
|
||||
hidden_sectors=hidden_sectors,
|
||||
long_names_enabled=long_names_enabled,
|
||||
@ -221,6 +222,7 @@ if __name__ == '__main__':
|
||||
|
||||
wl_fatfs = WLFATFS(sectors_per_cluster=args.sectors_per_cluster,
|
||||
size=args.partition_size,
|
||||
sector_size=args.sector_size,
|
||||
root_entry_count=args.root_entry_count,
|
||||
explicit_fat_type=args.fat_type,
|
||||
long_names_enabled=args.long_name_support,
|
||||
|
Loading…
x
Reference in New Issue
Block a user