File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ struct TextFile {
68
68
#define BPB_RESERVED_SECTORS ( 1)
69
69
#define BPB_NUMBER_OF_FATS ( 2)
70
70
#define BPB_ROOT_DIR_ENTRIES ( 64)
71
- #define BPB_TOTAL_SECTORS (0x10109) // Use a fixed (near max) number of sectors for the FAT file system
71
+ #define BPB_TOTAL_SECTORS CFG_UF2_NUM_BLOCKS
72
72
#define BPB_MEDIA_DESCRIPTOR_BYTE (0xF8)
73
73
#define FAT_ENTRY_SIZE (2)
74
74
#define FAT_ENTRIES_PER_SECTOR (BPB_SECTOR_SIZE / FAT_ENTRY_SIZE)
@@ -78,10 +78,6 @@ struct TextFile {
78
78
#define DIRENTRIES_PER_SECTOR (BPB_SECTOR_SIZE/sizeof(DirEntry))
79
79
#define ROOT_DIR_SECTOR_COUNT (BPB_ROOT_DIR_ENTRIES/DIRENTRIES_PER_SECTOR)
80
80
81
- #if defined(CFG_UF2_NUM_BLOCKS )
82
- STATIC_ASSERT (BPB_TOTAL_SECTORS >= CFG_UF2_NUM_BLOCKS ); // configuration used, and asked for a larger size GhostFAT?
83
- #endif
84
-
85
81
STATIC_ASSERT (BPB_SECTOR_SIZE == 512 ); // GhostFAT does not support other sector sizes (currently)
86
82
STATIC_ASSERT (BPB_SECTORS_PER_CLUSTER == 1 ); // GhostFAT presumes one sector == one cluster (for simplicity)
87
83
STATIC_ASSERT (BPB_NUMBER_OF_FATS == 2 ); // FAT highest compatibility
Original file line number Diff line number Diff line change 7
7
// Family ID for updating Bootloader
8
8
#define CFG_UF2_FAMILY_BOOT_ID 0xd663823c
9
9
10
- #define CFG_UF2_NUM_BLOCKS 8000 // at least 4,1 MB for FAT16
10
+ #define CFG_UF2_NUM_BLOCKS 0x10109 // just under 32MB
11
11
#define CFG_UF2_FLASH_SIZE (1024*1024) // 1 MB
12
12
13
13
// Application Address Space
You can’t perform that action at this time.
0 commit comments