Skip to content

Running probe-rs info doesn't work and puts the probe into invalid state when trying to test rp2040 with RP debug probe #1849

Description

@matoushybl

Describe the bug
When I connect the probe (RP debug probe) and power up the device (RP Pico), I wanted to try if everything is working by running probe-rs info. This results into the following:

 RUST_LOG=probe_rs=trace probe-rs info
 INFO probe_rs: Writing log to "/Users/matous/Library/Application Support/rs.probe-rs.probe-rs/1698673817436.log"
DEBUG list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Searching for CMSIS-DAP probes using libusb
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools:   Interface 0: CMSIS-DAP v2 Interface
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 2, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Debug Probe (CMSIS-DAP): CMSIS-DAP device with 3 interfaces
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: No HID interface for CMSIS-DAP found.
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 1, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 2, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
DEBUG list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Found 1 CMSIS-DAP probes using libusb, searching HID
DEBUG list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Found 1 CMSIS-DAP probes total
TRACE open: probe_rs::probe::cmsisdap::tools: Attempting to open device matching 2e8a:000c:E6614103E7284B25
TRACE open: probe_rs::probe::cmsisdap::tools: Trying device Bus 001 Device 001: ID 2e8a:000c
TRACE open: probe_rs::probe::cmsisdap::tools:   Interface 0: CMSIS-DAP v2 Interface
TRACE open: probe_rs::probe::cmsisdap::tools: Could not read string for interface 2, skipping
TRACE open: probe_rs::probe::cmsisdap::tools: Debug Probe (CMSIS-DAP): CMSIS-DAP device with 3 interfaces
TRACE open: probe_rs::probe::cmsisdap::tools: No HID interface for CMSIS-DAP found.
DEBUG open: probe_rs::probe::cmsisdap::tools: Opening 2e8a:000c in CMSIS-DAPv2 mode
DEBUG open: probe_rs::probe::cmsisdap::commands: Draining probe of any pending data.
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 1 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
TRACE open: probe_rs::probe::cmsisdap::commands: Receive buffer: [00, 02, 40, 00]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Success: packet size is 64
DEBUG open: probe_rs::probe::cmsisdap::commands: Configuring probe to use packet size 64
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FE]...
TRACE open: probe_rs::probe::cmsisdap::commands: Receive buffer: [00, 01, 02]...
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, F0]...
TRACE open: probe_rs::probe::cmsisdap::commands: Receive buffer: [00, 01, 31]...
DEBUG open: probe_rs::probe::cmsisdap: Detected probe capabilities: Capabilities { _swd_implemented: true, _jtag_implemented: false, swo_uart_implemented: false, swo_manchester_implemented: false, _atomic_commands_implemented: true, _test_domain_timer_implemented: true, swo_streaming_trace_implemented: false, _uart_communication_port_implemented: false, uart_com_port_implemented: false }
Probing target via JTAG

DEBUG attach: probe_rs::probe::cmsisdap: Attaching to target system (clock = 1000kHz)
TRACE attach: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 02, 02]...
TRACE attach: probe_rs::probe::cmsisdap::commands: Receive buffer: [02, 00]...
TRACE probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 03]...
DEBUG probe_rs::probe::cmsisdap: Detaching from CMSIS-DAP probe
TRACE probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 03]...
 INFO probe_rs: Wrote log to "/Users/matous/Library/Application Support/rs.probe-rs.probe-rs/1698673817436.log"
Error: An error with the usage of the probe occurred

Caused by:
    0: An error specific to a probe type occurred
    1: Error handling CMSIS-DAP command Disconnect
    2: Timeout in USB communication.

When trying for the second time, the following appears:

 RUST_LOG=probe_rs=trace probe-rs info
 INFO probe_rs: Writing log to "/Users/matous/Library/Application Support/rs.probe-rs.probe-rs/1698673920869.log"
DEBUG list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Searching for CMSIS-DAP probes using libusb
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools:   Interface 0: CMSIS-DAP v2 Interface
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 2, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Debug Probe (CMSIS-DAP): CMSIS-DAP device with 3 interfaces
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: No HID interface for CMSIS-DAP found.
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 1, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 2, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Could not read string for interface 0, skipping
DEBUG list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Found 1 CMSIS-DAP probes using libusb, searching HID
DEBUG list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Found 1 CMSIS-DAP probes total
TRACE open: probe_rs::probe::cmsisdap::tools: Attempting to open device matching 2e8a:000c:E6614103E7284B25
TRACE open: probe_rs::probe::cmsisdap::tools: Trying device Bus 001 Device 001: ID 2e8a:000c
TRACE open: probe_rs::probe::cmsisdap::tools:   Interface 0: CMSIS-DAP v2 Interface
TRACE open: probe_rs::probe::cmsisdap::tools: Could not read string for interface 2, skipping
TRACE open: probe_rs::probe::cmsisdap::tools: Debug Probe (CMSIS-DAP): CMSIS-DAP device with 3 interfaces
TRACE open: probe_rs::probe::cmsisdap::tools: No HID interface for CMSIS-DAP found.
DEBUG open: probe_rs::probe::cmsisdap::tools: Opening 2e8a:000c in CMSIS-DAPv2 mode
DEBUG open: probe_rs::probe::cmsisdap::commands: Draining probe of any pending data.
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 1 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 2 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 3 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 4 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 5 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 6 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 7 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 8 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 9 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 10 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 11 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 12 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 13 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 14 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 15 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
DEBUG open: probe_rs::probe::cmsisdap::commands: Attempt 16 to find packet size
TRACE open: probe_rs::probe::cmsisdap::commands: Transmit buffer: [00, 00, FF]...
 INFO probe_rs: Wrote log to "/Users/matous/Library/Application Support/rs.probe-rs.probe-rs/1698673920869.log"
Error: Failed to open the debug probe.

Caused by:
    0: An error specific to a probe type occurred
    1: Could not determine a suitable packet size for this probe

Flashing works when reconnecting the probe fresh, but stops immediately when the probe-rs info is issued.

To Reproduce
Steps to reproduce the issue:

  1. Reconnect the probe and device
  2. Run probe-rs info
  3. Run probe-rs run or any other command.

Expected behavior
The command should output some information about the connected probe and target chip, or at least not put the probe into unusuable state.

Desktop:

  • macOS Ventura

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions