Use an esp32-s3 to debug an esp32 wrover cam?

There’s plenty of information on how to connect an esp-prog adapter for debugging but has anyone successfully used an esp32-s3 devkit with builtin JTAG to debug another board? I have Freenove ESP32 WROVER CAM board that I would like to debug using the an esp32-s3 devkit. I would like to use this board as I mistakenly purchased two of them

undefinedC:\Users\Eamonn.platformio\packages\toolchain-xtensa-esp32@8.4.0+2021r2-patch5\bin\xtensa-esp32-elf-gdb.exe: warning: Couldn’t determine a path for the index cache directory.

Reading symbols from c:\Users\Eamonn\Documents\PlatformIO\Projects\esp32ardblank.pio\build\esp32dev\firmware.elf…

PlatformIO Unified Debugger → Redirecting...

PlatformIO: debug_tool = esp-bridge

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

http://openocd.org/doc/doxygen/bugs.html

Info : only one transport option; autoselect ‘jtag’

Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1002

Info : esp_usb_jtag: capabilities descriptor set to 0x30a

adapter speed: 40000 kHz

WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.

Warn : Transport “jtag” was already selected

adapter speed: 5000 kHz

Info : tcl server disabled

Info : telnet server disabled

Error: esp_usb_jtag: could not find or open device!

.pioinit:11: Error in sourced command file:

Remote communication error. Target disconnected.: Success.

Yes exactly. Just flash the esp-bridge firmware on your ESP32-S3 and you’ll be able to use it as a debugger probe for your ESP32-CAM.

See

Many thanks for this. I’ve added the wiring given in the pdf and the results were mixed. While connected to the UART of the S3, I can see the upload to the WROVER. However, serial monitor output is scrambled at 115200 and I also get a flash error.

esptool.py v4.5.1
Serial port COM5
Connecting…

A fatal error occurred: Failed to connect to ESP32: No serial data received.

JTAG is impossible as openocd can’t start.
Will get back to you after more testing.

  1. remember you have to build and flash the esp-bridge firmware on your ESP32-S3 as per instructions in the above repo for this to work
  2. double check the schematics. Really, you just want to connect to the ESP32-S3 via USB and connect the ESP32’s JTAG pins (IO12 - IO15) to the ESP32-S3 (GPIO8-GPIO10, GPIO3), together with power (gnd+3.3v) and EN. The UART bridge between them is optional.

Still no luck.

Regarding 1:
The docs say enable via CONFIG_ESP_CONSOLE_USB_CDC=y. When I did this, I got build errors:
** |a.|static assertion failed: usb_osglue__int is not multicore capable|
** |—|—|*
** |b.|implicit declaration of function ‘esp_usb_console_read_available’; did you mean ‘esp_usb_console_write_available’? [-Werror=implicit-function-declaration]|*
** |c.|conflicting types for ‘esp_usb_console_read_available’; have ‘_Bool(void)’|*

Changed the setting from CDC to USB Serial/JTAG controller. (The sdkconfig then showed CONFIG_ESP_CONSOLE_USB_CDC = N, USB_SERIAL_JTAG=Y. Compiled ok and flashed. The S3 could be used as normal with JTAG debugging working (standalone mode, not bridging)

Regarding 2:
The wiring is a little different on the s3 compared to the schematic given so I followed that. Eg TDO is IO40, TDI - IO41, etc. Removed RX, TX and GPIO0 connections.

So, now with the above wiring and with the target set as esp32 and board/esp32-bridge.cfg, attempting to debug, openocd won’t start:
esp_usb_jtag: could not find or open device!

Weird, if you have exactly follow their instructions and it will not build for a ESP32-S3, then please let them know at Issues · espressif/esp-usb-bridge · GitHub

Ok, I see what I did wrong. Still can’t get it to work but am inching closer. I’ll take up the issues with those guys. Many thanks for your help and fast responses.