oyama / pico-vfs

Thin virtual file system for Raspberry Pi Pico
Other
5 stars 0 forks source link

Cannot access beyond 4 GB of block devices #44

Closed oyama closed 2 weeks ago

oyama commented 2 weeks ago

The address of the block device is indicated by the size_t type; the size_t type in the Raspberry Pi Pico SDK is 32 bits, with a maximum value of 4294967295. This means that SDHC cards can only be used up to 4 GB.

It is difficult to think of a use case where an embedded device consumes more than 4 GB, but SDHC cards are common devices, so it is considered necessary to address this issue.

Change block device addressing to typedef uint64_t bd_size_t.

oyama commented 2 weeks ago

Change the addressing to 64-bit and enable ExFat. Binary size is about 20 KB larger, but unavoidable.