Skip to content
Open
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1937,9 +1937,9 @@ purposes of binaries compiled using the [pico-sdk](https://github.com/raspberryp
If your code has returned then rebooting with `-f/F` will not work - instead you can set the compile definition `PICO_ENTER_USB_BOOT_ON_EXIT`
to reboot and be accessible to picotool once your code has finished execution, for example with
`target_compile_definitions(<yourTargetName> PRIVATE PICO_ENTER_USB_BOOT_ON_EXIT=1)`
- Uses stdio_usb -
If your binary calls `stdio_init_all()` and you have `pico_enable_stdio_usb(<yourTargetName> 1)` in your CMakeLists.txt file then you meet
this requirement (see the [hello_usb](https://github.com/raspberrypi/pico-examples/tree/master/hello_world/usb) example)
- Uses stdio_usb or the pico_usb_reset library -
Comment thread
lurch marked this conversation as resolved.
If your binary calls `stdio_init_all()`, does not use TinyUSB directly (i.e. does not link `tinyusb_device`), and you have `pico_enable_stdio_usb(<yourTargetName> 1)` in your CMakeLists.txt file, then you meet
this requirement (see the [hello_usb](https://github.com/raspberrypi/pico-examples/tree/master/hello_world/usb) example). If you are using TinyUSB directly, see the [library documentation](https://www.raspberrypi.com/documentation/pico-sdk/high_level.html#group_pico_usb_reset) or the [dev_multi_cdc](https://github.com/raspberrypi/pico-examples/tree/master/usb/device/dev_multi_cdc) example for more details on how to enable the `pico_usb_reset` library.

### Issues

Expand Down
13 changes: 8 additions & 5 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,11 @@ string family_id_help_text() {
std::map<string, help_topic> help_topics {
#if HAS_LIBUSB
{ "device-selection", {
"Options for Target Device Selection",
"Options for selecting or filtering the target RP-series device(s). These options are accepted by most commands which target a device.",
"Options for Target Device Selection and Rebooting",
"Options for selecting or filtering the target RP-series device(s), including rebooting devices to BOOTSEL mode first. "
"These options are accepted by most commands which target a device.\n\n"
"For the `-f/F` options, compatible code is defined as code which uses stdio_usb or the pico_usb_reset library, and which is still running. "
Comment thread
lurch marked this conversation as resolved.
"See Forced Reboots in the README (https://github.com/raspberrypi/picotool#forced-reboots) for more information.",
group(device_selection).force_expand_help(true)
} },
#endif
Expand Down Expand Up @@ -876,7 +879,7 @@ struct info_command : public cmd {
).min(0).doc_non_optional(true) % "Information to display" +
(
#if HAS_LIBUSB
device_selection % "To target one or more connected RP-series device(s) in BOOTSEL mode (the default)" |
device_selection % "To target one or more connected RP-series device(s) (the default)" |
#endif
file_selection % "To target a file"
).major_group("TARGET SELECTION").min(0).doc_non_optional(true)
Expand Down Expand Up @@ -911,7 +914,7 @@ struct config_command : public cmd {
(option('g', "--group") & value("group").set(settings.config.group)) % "Filter by feature group" +
(
#if HAS_LIBUSB
device_selection % "To target one or more connected RP-series device(s) in BOOTSEL mode (the default)" |
device_selection % "To target one or more connected RP-series device(s) (the default)" |
#endif
file_selection % "To target a file"
).major_group("TARGET SELECTION").min(0).doc_non_optional(true)
Expand Down Expand Up @@ -1165,7 +1168,7 @@ struct erase_command : public cmd {
).min(0).doc_non_optional(true)
).min(0).doc_non_optional(true).no_match_beats_error(false) % "Selection of data to erase" +
( // note this parenthesis seems to help with error messages for say erase --foo
device_selection % "Source device selection"
device_selection % "Target device selection"
)
);
}
Expand Down
Loading