Content originally posted in LPCWare by DF9DQ on Fri Mar 04 09:39:19 MST 2016
What I can see from a quick look at the boot code seems in line with your observations.
The existing USB ROM code for the mass storage class does indeed limit the size of partitions to 4 GiB. This is due to the 32-bit MemorySize field as you have pointed out. Also callback functions use 32-bit offsets only.
The "USBD" code has been updated to support larger partitions, and the 64-bit MemorySize64 replaces the old 32-bit MemorySize. The header file in LPCOpen reflects this.
Quote:
Should the MemorySize parameter be defined as 0 and then set the MemorySize64 to the actual size?
Yes, this is how it works. Note that callback functions will take an additional parameter "high_offset" for the upper 32-bit of the 64-bit offset.
Unfortunately, existing devices with older ROM code don't support MemorySize64. This affects all flash based LPC1800 and LPC4300 devices, and older flashless devices in these two series. Only the latest flashless LPC18x0 and LPC43x0 have 64-bit support in the mass storage class implementation from boot code version 11.3 onwards.
Devices for which USBD exists as a library in LPCOpen (e.g. LPC17xx) support large disk sizes. However, a USBD library for LPC1800/LPC4300 is not (yet?) available.