Hello. I'm trying to use ESP32s3 as JTAG debugger for my ESP32d and after spend some time it seems I'm stuck. There is too many ongoing errors and too little understanding of what happening.
Port layout: ESP32s3, with ESP USB Bridge firmware, have 2 physical usb device and 3 logical (switch via reset):
1: marked as COM is standalone usb to serial converter using for firmware flashing and ESP32s3 internal serial logging.
dmesg
[23265.938096] usb 2-1.2.3: new full-speed USB device number 8 using ehci-pci
[23266.031406] usb 2-1.2.3: New USB device found, idVendor=1a86, idProduct=55d3, bcdDevice= 4.45
[23266.031415] usb 2-1.2.3: New USB device strings: Mfr=0, Product=2, SerialNumber=3
[23266.031418] usb 2-1.2.3: Product: USB Single Serial
[23266.031421] usb 2-1.2.3: SerialNumber: xxxxxxxxxxx
[23266.031966] cdc_acm 2-1.2.3:1.0: ttyACM0: USB ACM device
2.1: marked as USB ( idProduct=1001) it seems a internal JTAG debugger. Openocd unable to connect it wich scenario board/esp32-bridge.cfg even if update scenario idProduct value (1001). This is only device marked as JTAG debugger.
dmesg
[23436.474010] usb 2-1.2.3: USB disconnect, device number 10
[23436.659311] usb 2-1.2.3: new full-speed USB device number 11 using ehci-pci
[23436.752525] usb 2-1.2.3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[23436.752532] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[23436.752534] usb 2-1.2.3: Product: USB JTAG/serial debug unit
[23436.752536] usb 2-1.2.3: Manufacturer: Espressif
[23436.752538] usb 2-1.2.3: SerialNumber: xxxxxxxxxxx
[23436.753215] cdc_acm 2-1.2.3:1.0: ttyACM0: USB ACM device
2.2 marked as USB ( idProduct=1002) this is right device accordingly to script board/esp32-bridge.cfg, but this device never correctly fit to the system (ubuntu, debian, windows 10) and endpoint never create.
[23423.627211] usb 2-1.2.3: new full-speed USB device number 9 using ehci-pci
[23423.722969] usb 2-1.2.3: New USB device found, idVendor=303a, idProduct=1002, bcdDevice= 0.01
[23423.722978] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[23423.722982] usb 2-1.2.3: Product: ESP USB Bridge
[23423.722985] usb 2-1.2.3: Manufacturer: Espressif Systems Co. Ltd.
[23423.722987] usb 2-1.2.3: SerialNumber: xxxxxxxxxxx
[23423.723612] usb 2-1.2.3: can't set config #1, error -32
or
[23432.920282] usb 2-1.2.3: device descriptor read/64, error -32
or
few others errors
Currently i'm using ( idProduct=1002) as JTAG port, debugging session log:
Info : only one transport option; autoselecting 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1002
Info : esp_usb_jtag: capabilities descriptor set to 0x30a
Info : esp_usb_jtag: target chip id set to 1
Flashing "/media/ProgStore/work/espressif-ide-profile/blink/build/bootloader/bootloader.bin" at 0x1000
** program_esp input args <0x1000 verify> **
Info : esp_usb_jtag: serial (xxxxxxxxxxx)
Info : esp_usb_jtag: Device found. Base speed 4800KHz, div range 1 to 1
Info : clock speed 4800 kHz
Error: libusb_bulk_write error: LIBUSB_ERROR_IO
Please refer to the troubleshooting guide below to identify the problem.
https://github.com/espressif/openocd-es ... ooting-FAQ
Error never changes(even if target is not connected), it seems USB phy totally broken for me. Unfortunately I don't have a standalone debugger to check esp32d, so i'm not understand where problem is. But JTAG it self seems to work as esp32s3 able to debug itself with correct target.
Also i'm unable to retrieve serial debug via any available usb port. At COM there only internal debug logs, they say that logs are received until ovf happens (probably no one take it). idProduct=1001 it seems dead, no activity. idProduct=1002 has no valid endpoint device.
Wire:
dupont to dupont or dupont to probe connections.
schematics: https://github.com/espressif/esp-usb-br ... matics.pdf
esp32s3 <-> esp32d
GPIO09 GPIO15 MTDO
GPIO03 GPIO12 MTDI
GPIO10 GPIO13 MTCK
GPIO08 GPIO14 MTMS
GND GND
+5in to power source (esp32d)
GND to power source (esp32d)
USB(as USB) to PC (esp32s3)
no other connection present
Env:
ESP-IDE
Version: 3.0.0
Build id: 20240605-1941
EspIdf 5.3
Openocd-esp32 amd64-0.12.0-esp32-20240726
ESP USB Bridge lastest from GIT
Debug scenario -s ${openocd_path}/share/openocd/scripts -f board/esp32-bridge.cfg
OS Ubuntu 24.04 LTS
ESP32s3 as JTAG debugger (Problem)
Re: ESP32s3 as JTAG debugger (Problem)
Any ideas? maybe there is a more suitable platform for such questions? do not suggest github, it is not a platform for discussion.
Who is online
Users browsing this forum: No registered users and 291 guests