-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add FLASH option to pico_package_uf2_output #2545
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
Conversation
Allows passing FLASH instead of 0x10000000 (eg pico_package_uf2_output(hello_serial FLASH))
Would it also make sense to add an "SRAM" option? |
Not really - packaging is where you put an SRAM binay in Flash, so it can be stored in non volatile memory, and the bootrom copies it to SRAM at runtime. It doesn't make sense to do the opposite and package a Flash binary to SRAM. It might make sense to package an SRAM binary from one bit of SRAM to another, but you'd be specifying a custom address for that anyway. |
Perhaps it's also worth making a companion PR to pico-examples demonstrating this feature being used? 🙂 (which obviously can't be merged until this PR has been merged) |
Yeah, once this is merged, I'll replace all the |
Actually, looking through the examples, we do use packaging to SRAM for universal binaries, as a way to ensure they have a load map. But rather than adding an SRAM option for this, the better option would be a |
I'm a bit confused; you always want to package it into flash, no? so perhaps allowing you to omit the argument is better? |
I've switched it to this, as currently yes, you do always want to package it into flash |
Allows passing FLASH instead of 0x10000000 (eg
pico_package_uf2_output(hello_serial FLASH)
) to package a UF2 to flashAlso adds a
pico_ensure_load_map(TARGET)
function, to ensure a load_map is added to the binary (eg for universal no_flash binaries)