Skip to content

Add support for rebooting debugprobes, and list command#350

Open
will-v-pi wants to merge 5 commits into
developfrom
debugprobe
Open

Add support for rebooting debugprobes, and list command#350
will-v-pi wants to merge 5 commits into
developfrom
debugprobe

Conversation

@will-v-pi

@will-v-pi will-v-pi commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Uses the --debugprobe argument, to explicitly target only running debugprobes, and ignore any BOOTSEL devices

Will work with the current master branch, and the next firmware release

Also refactors the usb reset support to be clearer what is going on, and add --ser filtering for custom vid/pid which was missing

Also adds --only-force argument for the same behaviour, in case that functionality is useful

Also adds picotool list command, which just prints the no device found help text, including BOOTSEL devices

Will work with the current master branch, and the next firmware release
Comment thread main.cpp Outdated
Comment thread main.cpp Outdated
+ option("--debugprobe").set(settings.target_debugprobe) % "Force a DebugProbe device version >2.3.1 to reset so the command can be executed. After executing the command (unless the command itself is a 'reboot') the device will be rebooted back to application mode"
+ option('f', "--force").set(settings.force) % "Force a device not in BOOTSEL mode but running compatible code to reset so the command can be executed. After executing the command (unless the command itself is a 'reboot') the device will be rebooted back to application mode" +
option('F', "--force-no-reboot").set(settings.force_no_reboot) % "Force a device not in BOOTSEL mode but running compatible code to reset so the command can be executed. After executing the command (unless the command itself is a 'reboot') the device will be left connected and accessible to picotool, but without the USB drive mounted"
+ option("--only-force").set(settings.only_force) % "Same as --force, but will only target devices not currently in BOOTSEL mode"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm? The help-text for --force says "Force a device not in BOOTSEL mode..."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but -f will disengage if it detects a device in BOOTSEL mode and use that instead - this allows always passing -f to commands, and they will work if the device is running or in BOOTSEL mode

This new option ignores devices already in BOOTSEL mode

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, so I guess this is effectively --force-but-ignore-bootsel? 😉
I'm not sure that the --only-force name makes it clear what this is doing, so I'll have a ponder... 🤔

As a start, perhaps the help-text ought to be changed to "Same as --force, but will ignore devices in BOOTSEL mode" ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reworded it - maybe --force-ignore-bootsel for the option, but that feels too long?

Comment thread picoboot_connection/picoboot_connection.c Outdated
Comment thread picoboot_connection/picoboot_connection.h Outdated
Comment thread main.cpp Outdated
" appears to be an RP-series DebugProbe device not in BOOTSEL mode, but with a USB reset interface, so consider --debugprobe to force reboot it in order to run the command.");
if (settings.target_debugprobe) {
printer(dr_vidpid_debugprobe_no_reset,
" appears to be an RP-series DebugProbe device not in BOOTSEL mode, but it does not have a USB reset interface so must be manually entered into BOOTSEL mode.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the "must be manually entered into BOOTSEL mode" phrasing here sounds correct 😕 But the best alternative I could come up with is "must be manually put into BOOTSEL mode".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This phrasing is used in a few places, so I just copied it here - I can change them all to “manually put into” if that is clearer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is clearer, but perhaps @JeuneseRPi can offer a second opinion?

Comment thread README.md
--rp2040
Assume the device is an RP2040 - this is only required when using a custom vid/pid
with an RP2040 on Windows, and is ignored on other operating systems
--debugprobe

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that once #342 has been merged, these --debugprobe and --only-force help sections will become part of the device-selection help topic?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that was part of my reason for doing the topics, because I knew I wanted to add the debugprobe argument

@will-v-pi will-v-pi linked an issue Jul 23, 2026 that may be closed by this pull request
@will-v-pi will-v-pi changed the title Add support for rebooting debugprobes Add support for rebooting debugprobes, and list command Jul 23, 2026
chip_name (RP-series, RP2040 or RP2350) is printed at the start of the line anyway by bus_device_string

Also reword some of the strings, so all strings explain how to put the device into BOOTSEL mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support "list" command

2 participants