STM32F103_MSD_BOOTLOADER
STM32F103_MSD_BOOTLOADER copied to clipboard
Change MSD size to match real flash size
Currently, the total size of the mass storage device shows 116MB, from which 115MB are free (according Windows Explorer).
It would be better to display the actual sizes:
- Total Memory = DEV_FLASH_SIZE
- Free Memory = APP_SIZE
Furthermore, it would be better to define a new compiler constant for the bootloader size and use it for calculating APP_ADDR and APP_SIZE in btldr_config.h
The minimum FAT32 disk size is 32MB, it cannot indicate 64KB flash capacity.
You are right about the minimum capacity.
Then could we at least have a total volume of 32MB where only 64KB minus BOOTLOADER_SIZE is free and the rest is occupied?
Do you have the information how e.g. Windows calculates the free space of a FAT32 partition? Unfortunately I can't find anything in the internet, so I don't know how to realize it.
http://elm-chan.org/fsw/ff/doc/getfree.html Usually looks into the free cluster size in FAT32 structure.
Thus, have you succeeded with the volume size correction?
No, I did not succeed. I tried different configuration parameters for the FAT32 partition, but this did not lead to the intended change. Unfortunately, I'm not deep enough into the FAT32 internals. I would appreciate if anybody could help.