Skip to content
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

Support "list" command #26

Open
lurch opened this issue Apr 29, 2021 · 1 comment
Open

Support "list" command #26

lurch opened this issue Apr 29, 2021 · 1 comment
Milestone

Comments

@lurch
Copy link
Contributor

lurch commented Apr 29, 2021

I wonder if a picotool list command might be useful? Consider the following scenario:

% lsusb | grep 2e8a                                       
Bus 020 Device 012: ID 2e8a:000a 2e8a Pico  Serial: 000000000000
Bus 020 Device 009: ID 2e8a:0005 2e8a Board in FS mode  Serial: 000000000000
% ./picotool info
No accessible RP2040 devices in BOOTSEL mode were found.

but:

Device at bus 20, address 9 appears to be a RP2040 MicroPython device not in BOOTSEL mode.
Device at bus 20, address 12 appears to be a RP2040 device with a USB serial connection, so consider -f or -F.

if I then plug in a Pico with a blank Flash chip (wiped using flash_nuke.uf2) I get:

% lsusb | grep 2e8a
Bus 020 Device 012: ID 2e8a:000a 2e8a Pico  Serial: 000000000000
Bus 020 Device 009: ID 2e8a:0005 2e8a Board in FS mode  Serial: 000000000000
Bus 020 Device 013: ID 2e8a:0003 2e8a RP2 Boot  Serial: E0C912D24340
% ./picotool info
Program Information
 none

In this latter case it would be nice if e.g. a ./picotool list could tell me:

Device at bus 20, address 9 appears to be a RP2040 MicroPython device not in BOOTSEL mode.
Device at bus 20, address 12 appears to be a RP2040 device with a USB serial connection, so consider -f or -F.
Device at bus 20, address 13 appears to be a RP2040 device in BOOTSEL mode.

For bonus points, it could even include the other VID/PID combos from https://github.com/raspberrypi/usb-pid ? 😉

@lurch
Copy link
Contributor Author

lurch commented Jul 19, 2021

The absence of a picotool list command also makes it "tricky" to use the picotool reboot command (added by #23 ) when you've got two Picos plugged in 😉

If both Picos are in BOOTSEL mode, then picotool info tells you e.g.

Multiple RP2040 devices in BOOTSEL mode found:

Device at bus 2, address 16:
----------------------------
Program Information
 name:      hello_usb
 web site:  https://github.com/raspberrypi/pico-examples/tree/HEAD/hello_world/usb
 features:  USB stdin / stdout

Device at bus 2, address 19:
----------------------------
Program Information
 name:      hello_usb
 web site:  https://github.com/raspberrypi/pico-examples/tree/HEAD/hello_world/usb
 features:  USB stdin / stdout

and if both Picos are in USB-CDC mode, then picotool info (in this example, on Windows) tells you:

No accessible RP2040 devices in BOOTSEL mode were found.

but:

Device at bus 2, address 20 appears to be a RP2040 device with a USB serial connection, not in BOOTSEL mode. You can force reset it into BOOTSEL mode via 'picotool reboot -f -u' first.
Device at bus 2, address 21 appears to be a RP2040 device with a USB serial connection, not in BOOTSEL mode. You can force reset it into BOOTSEL mode via 'picotool reboot -f -u' first.

However if one Pico is in USB-CDC mode and the other is in BOOTSEL mode, then picotool info (and any other picotool command?) seems to "only see" the device that's in BOOTSEL mode and just tells you:

Program Information
 name:      hello_usb
 web site:  https://github.com/raspberrypi/pico-examples/tree/HEAD/hello_world/usb
 features:  USB stdin / stdout

@will-v-pi will-v-pi added this to the 1.6.1 milestone Jul 27, 2024
@will-v-pi will-v-pi modified the milestones: 1.6.1, 1.7.0 Aug 5, 2024
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

No branches or pull requests

2 participants