Page 1 of 1
esp32-c3-DevKitM-1 USB JTAG Debugging
Posted: Fri Jan 31, 2025 12:18 am
by anotherstevest
Greetings,
I have a ESP32-C3-DevKitM-1 for which I am trying to enable USB JTAG debugging. I have implemented all the configuration tweaks that appear required (per extensive documentation searches) but have not yet achieved success. Interestingly, I have also seen many other posts related to this issue and none of them indicated success either. <discouraged...>.
The failure is that the built-in USB Serial/Jtag connection only enumerates as a serial port (which *does* work for downloading) but no JTAG device enumerates and (as expected without enumeration) OpenOCD fails with:
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: esp_usb_jtag: could not find or open device!
It also reports:
Error: [esp32c3] Unsupported DTM version: -1
Error: [esp32c3] Could not identify target type.
but since I'm not enumerating and the device can't be found, I doubt that this output is significant.
My configuration:
Windows 11, Visual Studio Code, ESP-IDF v5.3.1
ESP32-C3-DevKitM-1, Chip revision ECO3
Windows JTAG driver installed per: ...esp32c3/api-guides/jtag-debugging/configure-builtin-jtag.html
R1 moved to R2, R4 moved to R3, R21,R22 *not* removed but J3 pins 2,3 not connected
GPIO 10 grounded during reset, boot configuration entered via the hold-boot-button, press-release reset button procedure.
Note that I would like to check the "as-shipped" fuse configuration for the ESP32-C3-DevKitM-1 but while execution of espefuse.py (via the VSCode "Get efuse Summary" command) does not generate errors it also does not write the text file in the location (C:\Users\steve\AppData\Local\Temp\espefusejsondump.tmp) it claims to so I have been unable to confirm my efuse configuration.
What am I missing? All help appreciated.
Thanks,
Steve.
Re: esp32-c3-DevKitM-1 USB JTAG Debugging
Posted: Fri Jan 31, 2025 2:49 am
by anotherstevest
P.S. In my configuration section I neglected to mention the following:
Enable USB-Serial-JTAG Module selected,
Channel for console output set to USB Serial/JTAG Controller
GPIO 18/19 not connected
Thanks in advance for any insight available.
Steve.
Re: esp32-c3-DevKitM-1 USB JTAG Debugging
Posted: Wed Feb 05, 2025 5:29 pm
by anotherstevest
@ESP_Sprite (or other knowledgeable support), Should I believe at this point that USB JTAG Debugging, in spite of what the datasheet says, just does not work on the esp32-c3? Or should I keep pursuing an answer? If it just does not work, I may have to change parts and, since I'm already down the road with my esp32-c3 design and already own a bunch of them (to go on a custom board), this would be a big disappointment. If I do have to change parts, is there another you would recommend with similar I/O and for which the USB JTAG debugging does work? In addition to the intent to use USB Serial & JTAG for development, I use SPI master, I2C master, and lots of GPIO. And the WiFi, of course. There's a chance that *also* having wired network capability is a benefit for later so, if I'm going to go through the hassle of changing parts now, I should at least look at the parts that have demonstrated both.
Thanks in advance for any guidance.
Steve
Re: esp32-c3-DevKitM-1 USB JTAG Debugging
Posted: Thu Feb 06, 2025 6:08 am
by Sprite
@ESP_Sprite (or other knowledgeable support), Should I believe at this point that USB JTAG Debugging, in spite of what the datasheet says, just does not work on the esp32-c3? Or should I keep pursuing an answer? If it just does not work, I may have to change parts and, since I'm already down the road with my esp32-c3 design and already own a bunch of them (to go on a custom board), this would be a big disappointment. If I do have to change parts, is there another you would recommend with similar I/O and for which the USB JTAG debugging does work? In addition to the intent to use USB Serial & JTAG for development, I use SPI master, I2C master, and lots of GPIO. And the WiFi, of course. There's a chance that *also* having wired network capability is a benefit for later so, if I'm going to go through the hassle of changing parts now, I should at least look at the parts that have demonstrated both.
Thanks in advance for any guidance.
Steve
It absolutely works, there's multiple instances of people using it. I would suspect that something is wrong with your Windows setup, but I'm not a Windows user, so I can't really help you with that.
Re: esp32-c3-DevKitM-1 USB JTAG Debugging
Posted: Fri Feb 07, 2025 6:06 pm
by anotherstevest
It absolutely works, there's multiple instances of people using it. I would suspect that something is wrong with your Windows setup, but I'm not a Windows user, so I can't really help you with that.
Ok, that's good and helpful to know. Since I haven't seen any posts from people who got it to work, it wasn't clear that it was worth pursuing. And, by you (ESP_Sprite) suspecting something on the Windows side, I'm inferring that I've covered (as described in previous posts) all the things you think I need to do on the ESP side. I will redouble my efforts (after I return from travel) and post what it took to get it to work once I figure it out. For example, I can also bring up it and try on a Linux machine etc. Thanks for the reply.
Steve.
Re: esp32-c3-DevKitM-1 USB JTAG Debugging
Posted: Sun Feb 23, 2025 10:55 pm
by anotherstevest
Here is the wrap-up post:
The info posted here:
https://docs.espressif.com/projects/esp ... -jtag.html is *not* (or at least wasn't for me) sufficient. After following the procedures per the above link, my Windows 11 installation still was running the wrong driver.
The gist is the current Winusb drivers supplied by Windows only work for the usb com but do not work for the USB JTAG. And windows wants to force you to use the driver it thinks is current. Even with current windows 11 and current esp-idf (both command line and VSCode plug-in installs, which are *supposed* to install the correct driver) it's possible to end up with a "current" windusb driver (which you don't want) rather than the special (and by versioning - downlevel) espressif driver. The path to salvation is to use the Zadig application to force the desired driver install. This is discussed here:
https://github.com/espressif/idf-instal ... 1263204902. Note you may have to use zadig for both the com and jtag side interfaces (for CDC com driver and downlevel winusb driver respectively).
At this point, my install is working and, it appears, openocd could use some updating to work with current windows drivers, espressif could use some (never ending, I'm sure) document enhancements and Windows continues to make all of us hate Microsoft.
Steve.
Re: esp32-c3-DevKitM-1 USB JTAG Debugging
Posted: Mon Feb 24, 2025 2:11 am
by Sprite
That sounds like a mess. Thank you for posting your solution here. I'll see if I can poke the tools team to look into this.
Re: esp32-c3-DevKitM-1 USB JTAG Debugging
Posted: Thu Jul 24, 2025 7:38 pm
by dptruitt
While looking at the schematic for the ESP32-C3-DevKitM-1, I noticed that the USB port on the board is not connected directly to the ESP32 module, but rather a CP2102N serial adapter.

- ESP32-C3-DevKitM-1-usb-sch.png (55.67 KiB) Viewed 821 times
You should be able to use the JTAG function by removing the resistors R1 and R4 on the DevKitM-1 board and move them to the position for R2 and R3.
Serial Only configuration:

- ESP32-C3-DevKitM-1-usb-serial-only.png (92.39 KiB) Viewed 821 times
USB JTAG configuration:

- ESP32-C3-DevKitM-1-usb-jtag.png (92.45 KiB) Viewed 821 times
You may also need to populate C4 and C5 for this to work.
I also checked to see if connecting another USB cable's GND, D-,D+ lines to the GND,18,19 pins of the devkit module and that seemed to work.