-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add stdio_usb reset interface detection for custom VendorID / ProductID setups #83
base: develop
Are you sure you want to change the base?
Add stdio_usb reset interface detection for custom VendorID / ProductID setups #83
Conversation
Just to "keep the dots connected", #54 is also requesting filtering by Serial ID. |
6ed0a3f
to
b203309
Compare
83ad4f0
to
a25aa9a
Compare
main.cpp
Outdated
@@ -2276,19 +2283,25 @@ int main(int argc, char **argv) { | |||
#if defined(_WIN32) | |||
printer(dr_vidpid_stdio_usb, | |||
" appears to be a RP2040 device with a USB serial connection, not in BOOTSEL mode. You can force reboot into BOOTSEL mode via 'picotool reboot -f -u' first."); | |||
printer(dr_reset_interface, | |||
" appears to be a RP2040 device with a USB reset interface, not in BOOTSEL mode. You can force reboot into BOOTSEL mode via 'picotool reboot -f -u' first."); |
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.
Should the example picotool command-line here also include the -i
flag?
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.
Right. The users will only see this message, if they already are using '-i' option. Do we want to promote the possibility of using the option similar to how we promote use of -f
option?
a5d9964
to
c5128a9
Compare
@lurch if you are interested, pls have a look at a companion library implementing the reset interface for custom TinyUSB stack: |
I'm not the |
Hmmm, not sure if it's wise to say "picotool supports custom devices with compatible reset interface with use of --detect-reset-interface or -i option.", if this picotool PR hasn't even been merged yet? Probably best to just add a link to this PR for the time being? 🤔 |
Sorry about that. I did not mean to impose on you. I appreciate any effort you choose to put in. But I'd hate for you to feel pressured or obligated in any way. Thank you for your input. I find it very helpful. And you are quite correct, I have definitely jumped the gun on this one. |
d931c70
to
a15e57e
Compare
a15e57e
to
38ab4ec
Compare
It would be really nice to use
picotool
with projects using custom VID/PID as well.With the new Pico SDK 1.5.0 having improved compatibility of stdio_usb with TinyUSB it's easy to implement stdio_usb reset feature with custom USB setup.
With this patch I am able to reboot the Pico running a TinyUSB stack into BOOTSEL mode and upload new firmware automatically.
That been said I still have several issues I'd like some feedback on:
Example use case:
I would like to create automated upload cmake target for a Pico project:
I also implemented a tiny library that simplyfies the implementation of custom TinyUSB reset interface -
pico_tusb_reset_interface.