New Chat
Ctrl
K
Kimi Code 3x Boost
Chat History
Mobile App

ESP32-S3 USB-JTAG Setup

Can I use the built-in JTAG interface of the ESP32-S3 through the USB C connector on the Sparkfun ESP32-S3 Thing Plus, or do I need some additional kit or setup first? If I need additional kit or setup, the rest of my post can probably be ignored, but any information for setting this up would be much appreciated! Background I’m an experienced programmer but relatively new to microcontrollers. I’d like to be able to set breakpoints and step through my code in ESP-IDF to ease the pain of debugging. I created a new project using ESP-IDF v5.5.1, selected esp32s3 as the ESP-IDF Target, and ESP32-S3 chip (via builtin USB-JTAG) as the ESP-IDF board. I used the blink example to keep things simple. After building the project, if I try to flash it using the JTAG method then OpenOCD exits with the errors Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND and Error: esp_usb_jtag: could not find or open device!. I see the same errors if I run the command openocd -f board/esp32s3-builtin.cfg. What I’ve Found Elsewhere and Tried Documentation: The Espressif documentation states “Only a USB cable connected to the D+/D- pins is necessary” and says that the USB D-/D+ signals are on GPIO19 and GPIO20. The Sparkfun ESP32-S3 Thing Plus datasheet states that pins 23 and 24 are GPIO19/USB_D- and GPIO20/USB_D+ respectively (page 11). Page 28 of the datasheet shows pins 23 and 24 connected to the USB OTG connector, although it does also show pins 35-38 connect to a JTAG interface. As far as I can tell, those pins aren’t broken out on the board so I wouldn’t be able to access them anyway. Page 15 (section 3.3.4) of the datasheet talks about GPIO3 and eFuses to control the source of JTAG signals during the early boot process. The table there suggests that the JTAG controller should work if the 3 eFuses are set to 0. I checked in the ESP-IDF eFuse Explorer and these are all 0. Things I’ve tried: I have verified that the board is in bootloader mode (hold BOOT, press and release RST, then release BOOT). Verified that my computer can see the JTAG interface - USBDeview shows a device with VID 0x303a and PID 0x1001 described as USB JTAG/serial debug unit. The output from openocd states that it is looking for a device with this VID/PID before it fails. The openocd output does also include the line Info: esp_usb_jtag: capabilities descriptor set to 0x2000, whereas USBDeview shows a blank Capabilities field for the device. I’m not sure if this is preventing openocd from detecting the device. I used USBDeview to verify that the driver for the JTAG device is WinUsb.sys. I have installed the Espressif - WinUSB support for JTAG (ESP32-C3/S3) driver as instructed in the Espressif documentation where it states that “Windows users might get LIBUSB_ERROR_NOT_FOUND errors” and suggests installing this driver. Lastly, some sources I’ve found say to check that the USB C cable is connected to the correct USB port. There is only one USB port on the board I have. Any suggestions as to how I might get this up and running would be much appreciated, thanks!
Check Sparkfun board USB‑JTAG mode on Windows
The user is asking about using the built-in JTAG interface of the ESP32-S3 through the USB C connector on the Sparkfun ESP32-S3 Thing Plus board. They're experiencing issues with OpenOCD not finding the device (LIBUSB_ERROR_NOT_FOUND).
Let me analyze what they've tried:
  1. They're using ESP-IDF v5.5.1 with target esp32s3 and board set to "ESP32-S3 chip (via builtin USB-JTAG)"
  2. They're getting libusb_open() failed with LIBUSB_ERROR_NOT_FOUND and "could not find or open device"
  3. They've verified:
    • Board is in bootloader mode
    • USBDeview shows device with VID 0x303a and PID 0x1001 (correct for ESP32-S3 USB JTAG)
    • Driver is WinUsb.sys
    • Installed Espressif WinUSB support for JTAG driver
    • Only one USB port on the board
    • eFuses are set correctly (all 0)
    • GPIO19/20 are connected to USB-C per datasheet
The Sparkfun ESP32-S3 Thing Plus has some specific considerations. I need to check:
  1. Does this board require any special setup for USB-JTAG?
  2. Are there known issues with Windows drivers and this specific board?
  3. Is there a specific configuration needed in OpenOCD for this board?
The user mentions "pins 35-38 connect to a JTAG interface" but aren't broken out - those would be the external JTAG pins (TCK, TMS, TDI, TDO). The built-in USB-JTAG should use the USB OTG peripheral.
Key things to check:
  • Is the board actually entering USB-JTAG mode vs serial mode?
  • On Windows, driver issues are common with libusb
  • The Sparkfun board might have specific USB switching logic or requirements
Let me search for specific information about this board and USB-JTAG issues.
I'll help you troubleshoot this. The Sparkfun ESP32-S3 Thing Plus definitely supports USB-JTAG through its single USB-C connector, but there are some specific quirks with this board and Windows drivers that might be causing your issue.
Let me search for specific information about this board's JTAG configuration and common driver issues.
Search
Sparkfun ESP32-S3 Thing Plus USB JTAG debugging OpenOCD Windows driver ESP32-S3 builtin USB JTAG LIBUSB_ERROR_NOT_FOUND Windows fix Sparkfun ESP32-S3 Thing Plus GPIO19 GPIO20 USB JTAG configuration
22 results
Searching for USB‑C JTAG Driver Installation Process Details
Good, I found relevant information. Let me analyze the search results:
  1. The Sparkfun ESP32-S3 Thing Plus definitely has USB-JTAG built-in and it should work through the single USB-C connector.
  2. The LIBUSB_ERROR_NOT_FOUND error on Windows is a very common issue with ESP32-S3 USB-JTAG. The Espressif documentation specifically mentions this and suggests using the ESP-IDF Tools Installer (v2.8+) to install the "Espressif - WinUSB support for JTAG (ESP32-C3/S3)" driver.
  3. The user mentioned they already installed this driver, but there might be an issue with how it was installed or the driver might not have been applied to the correct interface.
  4. From the search results, I see that the USB device has multiple interfaces:
    • Interface 0: USB Serial (CDC) - for serial communication
    • Interface 2: JTAG - needs WinUSB driver
  5. The issue might be that the driver wasn't properly installed for Interface 2 specifically, or there's a conflict with the driver assignment.
  6. I also see that some users fixed this using Zadig to manually set the driver for interface 2 to WinUSB (or libusb).
  7. The user mentioned they checked the eFuses and they are all 0, which is correct for USB-JTAG to work. If STRAP_JTAG_SEL was set, it would disable USB-JTAG in favor of external JTAG, but they confirmed it's 0.
  8. The board doesn't require any additional hardware - the USB-C connector should work directly for JTAG.
Let me search for more specific information about the driver installation process and interface-specific driver assignment.
Let me search for more specific information about the multi-interface driver configuration, as this is likely where the issue lies.
Search
Zadig ESP32-S3 USB JTAG interface 2 WinUSB driver ESP32-S3 USB JTAG composite device interface 0 interface 2 driver assignment libusb_open failed LIBUSB_ERROR_NOT_FOUND interface 2 Windows
21 results
USB‑JTAG available on ESP32‑S3 during normal run mode
Now I have a clear picture of the issue. The ESP32-S3 USB-JTAG peripheral is a composite USB device with multiple interfaces:
  • Interface 0: USB Serial (CDC) - for serial communication/programming
  • Interface 2: JTAG - for debugging (this is what OpenOCD uses)
The issue is that Windows often assigns the wrong driver to Interface 2, or the Espressif driver installer doesn't correctly configure Interface 2 specifically.
The solution is:
  1. Use Zadig (a driver installation utility) to manually set Interface 2 to use WinUSB driver
  2. Interface 0 should remain as USB Serial (CDC) for serial communication
  3. The user mentioned they installed the Espressif driver, but it might not have properly configured Interface 2 specifically
Also, I need to verify: The Sparkfun ESP32-S3 Thing Plus definitely supports USB-JTAG through the USB-C connector, and it should work without any additional hardware. The user doesn't need any external JTAG adapter.
The issue is purely software/driver related on Windows. The LIBUSB_ERROR_NOT_FOUND error specifically indicates that libusb (used by OpenOCD) cannot find the device with the expected interface/driver configuration.
Let me also check if there's anything specific about the Sparkfun board that might be different... The search results confirm that the Thing Plus has the USB-C connected to GPIO19/20 which are the correct pins for USB-JTAG.
So my response should:
  1. Confirm that yes, it works through the USB-C without additional hardware
  2. Explain the driver issue (Interface 2 vs Interface 0)
  3. Provide step-by-step instructions to fix using Zadig
  4. Mention alternative: using the idf-env tool from Espressif
  5. Verify the cable is good (data-capable, not charge-only)
The user mentioned they see the device in USBDeview with VID 0x303a and PID 0x1001, which is correct. The issue is specifically the driver assignment for Interface 2.
Also worth noting: the user mentioned "bootloader mode" - for USB-JTAG debugging, the board should NOT be in bootloader mode. It should be running normally. The USB-JTAG peripheral works in normal run mode, not bootloader mode. This might be part of the issue too! Actually, looking at the ESP32-S3 documentation, the USB-JTAG should be available in both modes, but it's worth checking.
Actually, looking more carefully: the USB-JTAG is available when the chip is running normally. If the user is putting it into bootloader mode (holding BOOT and pressing RST), that might actually prevent the application from running, but the USB-JTAG peripheral should still be visible. However, for debugging, you typically want the board in normal run mode, not bootloader mode.
Wait, looking at the ESP32-S3 documentation: The USB Serial/JTAG controller is active by default (if eFuses are correct, which they are). It should be visible to the host regardless of whether the chip is in bootloader mode or running normally.
So the main issue is definitely the driver configuration for Interface 2.
Yes, you can use the built-in USB-JTAG through the single USB-C connector on the Sparkfun ESP32-S3 Thing Plus without any additional hardware. The board routes GPIO19 (USB_D-) and GPIO20 (USB_D+) directly to the USB-C connector, which is exactly what's needed for the built-in JTAG interface.
Your issue is a Windows driver configuration problem, specifically with how the USB composite device interfaces are assigned. The ESP32-S3 presents itself as a composite device with multiple interfaces:
  • Interface 0: USB Serial (CDC) — for programming/serial monitor
  • Interface 2: JTAG — for debugging (what OpenOCD needs)
The LIBUSB_ERROR_NOT_FOUND error indicates that while Windows sees the device, the driver for Interface 2 (JTAG) isn't correctly configured for libusb/OpenOCD to access it.

The Fix: Configure Drivers with Zadig

Even though you installed the Espressif driver, you likely need to manually assign the WinUSB driver specifically to Interface 2 using Zadig:
  1. Download Zadig from https://zadig.akeo.ie/
  2. Connect your board normally (no need to hold BOOT/enter bootloader mode for this step — just plug it in)
  3. In Zadig:
    • Go to Options → List All Devices
    • In the dropdown, look for "USB JTAG/serial debug unit (Interface 0)" — this should show a driver like "usbser" or "USB Serial (CDC)". Leave this as-is (or set to USB Serial CDC if needed).
    • Now find "USB JTAG/serial debug unit (Interface 2)" in the dropdown (it might be hiding in the list).
    • For Interface 2, ensure the driver field (to the right of the green arrow) is set to WinUSB (or libusb, but WinUSB is recommended).
    • Click Replace Driver or Install Driver
  4. Verify in Device Manager:
    • You should see two separate entries under "Universal Serial Bus devices" or "USB devices":
      • "USB JTAG/serial debug unit" (Interface 0) — with USB Serial driver
      • "USB JTAG/serial debug unit" (Interface 2) — with WinUSB driver

Important Note on Bootloader Mode

You mentioned putting the board in bootloader mode (holding BOOT + RST). For JTAG debugging, you should NOT use bootloader mode. The USB-JTAG peripheral works when the chip is running normally. Bootloader mode is only for flashing firmware via the serial bootloader.
For debugging:
  • Connect the board normally (it will enumerate as both a COM port and JTAG device)
  • Flash your code first (via idf.py flash or the COM port)
  • Then start the debug session with the board running normally (not in bootloader)

Alternative: Use idf-env Tool

If Zadig doesn't work, try the Espressif driver tool from PowerShell (run as Administrator):
powershell
Copy
Invoke-WebRequest 'https://dl.espressif.com/dl/idf-env/idf-env.exe' -OutFile .\idf-env.exe; .\idf-env.exe driver install --espressif
This should properly configure both interfaces.

If It Still Doesn't Work

  • Check your USB cable: Ensure it's a data cable, not charge-only. Try a different cable/port.
  • Interface visibility: In Zadig, Interface 2 sometimes appears under "libusb-win32 devices" or similar rather than in the main list. Check all device classes in the dropdown.
  • Driver conflicts: If you previously installed FTDI or other JTAG drivers, they might conflict. Uninstall them via Device Manager.
  • Restart your computer after driver changes.
Once Interface 2 has the WinUSB driver assigned, OpenOCD should successfully connect with openocd -f board/esp32s3-builtin.cfg.