adafruit / Adafruit_nRF52_Bootloader

USB-enabled bootloaders for the nRF52 BLE SoC chips
MIT License
445 stars 401 forks source link

Enable large volume size #132

Closed henrygab closed 4 years ago

henrygab commented 4 years ago

Enable large (~31MB) volume size in GhostFAT

This also includes a fix for #133 via 3b92ef8.

I can easily open a PR on master later, no problem.

henrygab commented 4 years ago

@hathach -- OK, this should work. I used STATIC_ASSERT() to help validate at compilation time that the file system generated would be valid (where I could).

The final commit also sets the total number of sectors to a fixed value. There's still a static assert that, if CFG_UF2_NUM_BLOCKS is defined, it's less than or equal to the value GhostFAT is now hard-coded to use.

Please feel free to send any questions my way.

hathach commented 4 years ago

superb!! Though we need to use CFG_UF2_NUM_BLOCKS = BPB_TOTAL_SECTORS or since it is used to response to the SCSI Read Capacity. I verified that ghostfat show up as 32 MB, it is working well :)

image