-
-
Notifications
You must be signed in to change notification settings - Fork 460
fix(h7): UF2 bootloader unable to flash #6985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
raphaelcoeffic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Just re:
whereas the white paper from Microsoft on FAT states:
and also
So it seems elm-chan has made an off by one error in the documentation? That would explain while this is still true some 26 years later 😆
|
|
Also, UF2_MAX_FAT16_BLOCKS is the size of the drive, not the file system... it is created inside that. CountofClusters = 65,523 - 1 (reserved) - (2 × 256) (FAT tables) - 4 (root dir) If we increase to we get CountofClusters = 66,025 - 1 - (2 × 258) - 4 That puts us ~21 down from the maximum 65,525/65,524, more than the minimum 16 recommended. What do you think? |
... rather than file system size.
|
@pfeerick I modified the code to use the number of data sectors to compute the maximum UF2 firmware. That seems more correct. Regarding the volume size, I re-instated the old value ( |
|
Makes perfect sense, 250kb in this context is not worth the overhead / potential alignment issues, etc. Will try it out again and merge if everything's working properly still ;) |
This complement #6814 where it was still possible to get locked out.
This basicaly optimise FAT compatibility and allows a firmware to be flashed. It does have a shortcoming to limit flash size to 8Mb when radio have 16Mb, but it requires a fair amount of work to move our current implementation to proper FAT16, so this is a temporary measure.
For all H7 supporting branches