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
boot stage2: double reset to uf2 #87
Comments
Hi, We have an example of a library for doing this by injecting before main, here: https://github.com/raspberrypi/pico-examples/tree/master/system/double_tap_usb_boot An example of using it is here: https://github.com/raspberrypi/pico-examples/tree/master/system/hello_double_tap The second stage is responsible for setting up flash execution -- anything not directly related to that does not need to be in the second stage, and can be registered to run before |
Oh that is great to hear, sorry, I didn't notice it is already available for usage as library. It is probably better to include it as default, so that user can quickly switch between examples. Though that is totally your call to apply to sdk examples. I will notify other folks at adafruit to include this @tannewt . Thanks for the tips. |
We can look at moving it to the SDK and adding a build flag. I'll talk to @kilograham when he is back from holiday |
That sounds like a great plan 👍 |
I reopen the issue as reminder for your decision on the SDK discussion. Feel free to close it anytime you make the decision. Thanks |
I did ask him last night but will ping here -- @kilograham are you happy to move that library into the SDK? Seems like it would mostly be a positive change, only major problem I see is that you can inadvertently wipe your flash or not include the lib, and you might prefer to still have a BOOTSEL button for those cases. |
i'm fine with adding the library... name needs some thought; double tap of what? perhaps it is obvious idk |
Let's start the bidding at |
not sure if you are making fun of my like of long names, but i'm fine with that (or |
Superb news. Thanks for adding this, I am happy with any names 👍 👍 |
closed thanks to #137 |
Hi hi, thank you for the pico.
It is great to have uf2 built into the bootrom, as maintainer of similar tinyuf2 (cross-platform uf2 bootloader), I kind of miss the double tap on reset button to enter uf2 feature. Which set a sram location to a magic number and wait for 0.5 second. If another reset occurs (double reset) during wait time then mcu will enter uf2 mode as following code does:
https://github.com/adafruit/tinyuf2/blob/master/src/main.c#L84
I wonder if RPI would be interested in adding this feature, my approach would be modify boot stage2 for double reset detection then use watchdog reset to jump to UF2. https://github.com/raspberrypi/pico-sdk/tree/master/src/rp2_common/boot_stage2
Thanks
The text was updated successfully, but these errors were encountered: