ESP-PROG JTAG debugging using VScode and PIO on a Mac

Hi,

I’ve been struggling to get this to work, read half the internet, and looked through 17% of youtube (you get my drift :wink: ).

I’m on Sonoma (14.2.1), running VSCode 1.85.1, PIO Core 6.1.3 and Home 3.4.4.

The code runs on an ESP32 (T-SIM7070G – LILYGO®), and works rather well (except something I want to debug …)

I’m using the following wiring
JTAG signal/pin - ESP32
GND 3-5-7-9. - GND
TDO 6. - GPIO15
TDI 8 - GPIO12
TCK. 4 - GPIO13
TMS. 2 - GPIO14

// Platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32dev
monitor_speed = 115200
monitor_port = /dev/cu.usbserial-1400
monitor_filters = esp32_exception_decoder
framework = arduino
lib_deps =
vshymanskyy/TinyGSM @ ^0.11.7
knolleary/PubSubClient @ ^2.8

; Release environment
[env:release]
extends = env:esp32dev

; Here you can add specific flags for the release build, if necessary

; Debug environment
[env:debug]
extends = env:esp32dev

build_flags = -D DEBUG
upload_protocol = esp-prog
debug_tool = esp-prog
debug_init_break = tbreak setup
debug_speed = 500

The ESP is connected using usb-c on the mac, the ESP-prog using a USB-C/USB adapter (but PIO sees it in the device list as /dev/cu/serial-1400 and 1401).

When trying to upload & monitor, I get the following errors …

Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:49)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 1

adapter speed: 20000 kHz

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

Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: esp32.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: Unexpected OCD_ID = 00000000
Warn : target esp32.cpu0 examination failed
Error: Unexpected OCD_ID = 00000000
Warn : target esp32.cpu1 examination failed
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: esp32.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: Unexpected OCD_ID = 00000000
Error: Unexpected OCD_ID = 00000000
Error: Target not examined yet
Error: Target not examined yet
Error: Unexpected OCD_ID = 00000000
embedded:startup.tcl:1184: Error: ** Unable to reset target **

What am I missing ?

TIA