-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Request ROM bootloader when resetting using the 'serial trick' #5880
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
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.
Do we want to request UF2 bootloader here instead of the default ROM bootloader? This won't work on non-UF2 boards.
For my use case, yes. This makes it just the same as other family Adafruit boards. Basically it allows me to have a single If there's a way to tell whether tinyuf2 is not present, and fall back to the ROM bootloader, that's fine. Or, if a specific board is designed to run without bootloader, we could make it compile-time conditional instead. Or to notice at CP start that UF2 was requested but did not run(if that's possible) and then jump from there into the ROM bootloader? |
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! I think the consistency with other boards should be enough for now, a new issue topic can be opened to discuss further.
I think it'll end up back in CP if TinyUF2 isn't installed. I'm not sure what state is saved but I bet CP can check it on startup in |
I checked what Arduino does, and even if tinyuf2 is installed, the "1200 baud trick" sends it to the ROM bootloader. Which is better, consistency with Arduino or consistency with other uf2-bootloader boards? I prefer uf2, because it can auto-reset into the new FW; esptool can't over USB for some reason I don't understand. |
1200 should go to ROM to match arduino because it's meant for folks to escape CP back into Arduino. CP's API can reset into UF2 to match our other boards. |
@jepler is this all set to merge, or is there still something to discuss? It sounds to me like it's all OK. |
@dhalbert sounds like scott's asking me to change it, so that the 1200 trick returns to the state that 'works for arduino'. |
Per Scott, the purpose of this trick is to make the board programmable from Arduino even when CP is installed, so my convenience of escaping into UF2 is not going to work out.
@jepler if you want a baudrate way of resetting into uf2 you could add another magic baudrate. |
Closes: #5870.