First attempts at ESC32-S3 debugging

Hi, spent yesterday reading doco and the forums… guess it’s time to ask for help. I can upload blink but can not debug.

I know my board selection is the generic one which does not have the external psram and pflash but for now I don’t need them so I will tackle that later with a board.json file.

Thanks in advance.

Configuration
PC with Windows 10
Platformio and VSCode both new installs to latest version
One PC USB connected to “COM” on the ESP board. Recognizes as COM4 USB Enhanced Serial

One PC USB connected to “USB” on ESP board
Recognizes as COM3 and USB JTAG/serial debug unit

I am not running Zadig since the drivers seem to load OK by default.

My board:
Teyleten Robot ESP32-S3-DevKitC-1-N16R2 ESP32-S3

Platformio.ini:
[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
;upload_protocol = esp-builtin
debug_tool = esp-builtin
debug_speed = 12000
build_type = debug
debug_init_break = tbreak loop

Console after trying to debug:
undefinedC:\Users\tbvin.platformio\packages\toolchain-xtensa-esp32s3\bin\xtensa-esp32s3-elf-gdb.exe: warning: Couldn’t determine a path for the index cache directory.
Reading symbols from e:\AllDev\LS_2023.pio\build\esp32-s3-devkitc-1\firmware.elf…
PlatformIO Unified Debugger → Redirecting...
PlatformIO: debug_tool = esp-builtin
PlatformIO: Initializing remote target…
Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:48)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
Info : only one transport option; autoselect ‘jtag’
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
adapter speed: 40000 kHz
Warn : Transport “jtag” was already selected
adapter speed: 12000 kHz
Info : tcl server disabled
Info : telnet server disabled
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: esp_usb_jtag: could not find or open device!
.pioinit:11: Error in sourced command file:
Remote communication error. Target disconnected.: Success.

I was getting this same error until I installed the ESP-IDF driver and used Zadig to correct the driver for the JTAG interface. I still can’t get it working in my case (TinyS3), but others have. See the following YouTube video, which is the best I’ve found.

Please refer to this post:

it is suit for esp32-s3.

Hi, Thanks for your response. I eventually solved my problem and it has been working reliably since.

In frustration I installed the Arduino IDE latest version 2 and ported my project over. I used Zadig to set the USB port ( my S3 board has the built in debugger on the USB port ) to “USB/JTAG/serial debug unit”. Then set the other USB port ( labeled COM ) to “USB enhanced SERIAL”. And Arduino debugged OK.

Eventually I returned to PlatformIO and left the USB COM drivers alone. PlatformIO debugs! ( Between re-installs, changing COM drivers, and everything else I tried… I don’t know what was wrong the first time I tried PlatformIO. But my configuration works now. )

Tony