Gadgetoid / dir2uf2

MIT License
11 stars 2 forks source link

Read flash drive from .uf2 `bi_decl` region #3

Closed Gadgetoid closed 3 months ago

Gadgetoid commented 1 year ago

As mentioned here - https://github.com/micropython/micropython/pull/12357 - it occurred to me that we could probably read the flash offsets from the .uf2 file rather than hard-coding them into the CI.

@daft-freak I don't suppose you had Python code somewhere to delve into Pico bi_decl stuff?

Daft-Freak commented 1 year ago

:thinking: Not in Python. There's some code in DERP, but that unpacks the whole thing first. Should be another parser in the blit discord bot, but I think that's JavaScript.

Gadgetoid commented 1 year ago

Close enough (edit: Thank you, sheesh I'd forget my own head if it weren't screwed on), I'll figure it out when I find a moment to try this :laughing:

Daft-Freak commented 1 year ago

Oh, this is the bot's code (might help as I don't think I released the code anywhere): https://gist.github.com/Daft-Freak/63e2f3ff052ba89a0de239c66671617

Attempts to parse UF2 as it goes. Still only handles string tags though.

Gadgetoid commented 3 months ago

Fixed in #7