Sparkfun ESP32-S3 Thing Plus - JTAG?

I was hoping to come across someone more experienced or with a better understanding by posting here. The low-effort LLM vomit response wasn’t helpful at all. I had already found all of that information through my own research.

  • Zadig said the driver for USB JTAG/serial debug unit (Interface 2) was already WINUSB
  • Device Manager showed APP Mode and USB JTAG/serial debug unit devices.
  • The idf-env tool stated that the driver was already installed.
  • The cable is a data cable (verified by using the Monitor Device command in ESP-IDF which is able to monitor serial output from the device).
  • I had restarted my computer after installing the Espressif driver.

Fortunately I have now managed to resolve the issue myself. The tl;dr; for anyone who might come here after is:

  1. Open device manager, expand Universal Serial Bus devices, then right-click and uninstall USB JTAG/serial debug unit.
  2. Disconnect and reconnect the device.
  3. To verify whether the correct driver is now active, right-click USB JTAG/serial debug unit again in device manager and select Properties.
  4. Click on the Driver tab and verify that the Digital Signer field mentions Espressif Systems
  5. Delete your LLMs before your brains rot entirely.

How did I get here? Well, the complete error messages output by the openocd -f board/esp32s3-builtin.cfg were as follows:

Error: 937 3212 libusb_helper.c:279 jtag_libusb_open(): libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: 938 3215 esp_usb_jtag.c:636 esp_usb_jtag_init(): esp_usb_jtag: could not find or open device!

I found the code for the jtag_libusb_open() function on GitHub here. The error occurs on line 176 and is output on line 179. It didn’t look like anything could go wrong there but I downloaded libusb and compiled a sample application to verify this myself (basically just copying the jtag_libusb_open() function with additional debug logging). The libusb_get_device_list() function did return a device with the correct VID/PID (0x303a/0x1001), but the call to libusb_open() failed with the return code LIBUSB_ERROR_NOT_FOUND, indicating that the device was not found despite it having being enumerated/returned by libusb.

Based on this, the issue/bug was clearly in libusb and not any of the higher level components. A search for libusb Windows LIBUSB_ERROR_NOT_FOUND led to various GitHub issues and eventually this comment. No LLMs involved, just some actual intelligence. Amazing.