probe-rs: Want to debug my ESP32-C3-DevKitM-1 over USB but not found.

Describe the bug I want to debug the esp32-c3 mini 1 devKit, but when I list the attached porbes it can’t be found. Found out that the probes are checked against their usb ID. I added the VID and PID (10c4:ea60) of the Silicon Labs CP210x UART Bridge here which is shown up when I connect the board. Now it can be found. But if I want to start debugging, the following error occurs (run command: probe-rs-cli info):

Error: Failed to open the debug probe.

Caused by:
    0: Probe could not be created
    1: An error specific to a probe type occurred: USB interface or endpoints could not be found.
    2: USB interface or endpoints could not be found.

Maybe it’s related to this.

Desktop:

  • Linux (Ubuntu)

Additional context

  • probe-rs version: main branch

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 26 (21 by maintainers)

Most upvoted comments

I see what you mean. The newer versions of their dev kit has wired the debug access to the USB, so you no longer need to do the special cable hack some of us (I think you too) had to do on the early version.

To add to this, all devkits going forward, i.e the ESP32-C6, ESP32-H2 come with dual USB by default, giving debug access out of the box this no external hardware.

I’ll work on a PR for a little bit and see where I get it to.

FYI I am happy to PR esp-idf bootloader format to probe-rs. I guess the main thing to overcome would this change be welcome.

I guess I can work on a draft of how this would look (when I get a few spare cycles) and we can evaluate from there?

@teamplayer3 I’m pretty sure you are running into the issue related to ESP’s IDF boot loader. probe-rs currently only supports the direct-boot feature. See this discussion for more info

You have two choices here:

  1. To use the IDF bootloader, you can use espflash to flash your chip, and then any of the probe-rs tools will be able to connect to and run and optionally debug your binary. You can even automate this with probe-rs-debugger, by adding a preLaunchTask in your launch.json, to do the build and flashing, and then the debugging will work as expected.
  2. To use the Direct Boot feature, in your Cargo.toml file, make sure you have something like esp32c3-hal = { version = "0.9.0", features = [ "direct-boot"]}, then the probe-rs tools will be able to flash and run/debug your binary without the need for espflash.

If you are still having difficulty with this, please post a link to your repo, or maybe include your Cargo.toml and launch.json files, and I’ll be happy to help.

You shouldn’t need a USB bridge, just connecting a USB cable should be enough. This guide has a picture: https://visualgdb.com/tutorials/esp32/esp32-c3/