-
Notifications
You must be signed in to change notification settings - Fork 429
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
Ignore uf2 with size too large #215
Comments
The UF2 format can also contain metadata, which I assume counts on the total block calculation and the bootloader could be rejecting a file that does fit? |
@carlosperate can you post an example of such uf2 image with the layout breakdown |
Oh, I haven't really used the UF2 format all that much (other than flashing files in this format), but this was my understanding from the spec: https://github.com/microsoft/uf2#flags The file could have blocks with the Having a quick look at the files produced by https://makecode.adafruit.com it doesn't look like it's doing it at the moment, so I'm not sure what would be a good way to find an example of this configuration. Of course, something like MakeCode would normally not target a bootloader, and there isn't a lot of scenarios where this could be a problem, but I thought it was worth mentioning to keep this in mind and/or document it if not supported. |
the not-flash meta data won't be counted as part of the total num block (different from the total file size of uf2), it is probably counted separated. I didn't look at this, but you could probably confirm this by looking at the uf2conv conversion script in the repo. Otherwise, it would be an bug of the script |
Oh yeah, uf2conv.py is not really using that flag to create a UF2 file. Mostly I assume it might be because it doesn't really have anything useful to write to it: https://github.com/microsoft/uf2/blob/master/utils/uf2conv.py#L129-L134
Are you sure? I guess it's not really specified in the README, but things like this makes me think it should count:
Also, the File Container section indicates:
|
It is my guess, you should ask this on uf2 repo for clarification. Overall, I don't think we need to worry about this until there is an image generated from the uv2conv from uf2 repo that cause the issue. It is best not to write more code than it should be. |
Totally agree 👍 |
Is your feature request related to a problem? Please describe.
Writing the uf2 file which size larger than supported will cause partial flashing, and the end part of application is not flashed.
Describe the solution you'd like
We should pre-calculate the end address based on starting address + total block to actively reject/ignore the uf2 instead.
The text was updated successfully, but these errors were encountered: