PlatformIO Debug Project

Hello everyone
I’m working on Meshtastic project using TTGO T Beam Board.
I’m trying to debug the project using Visual code PatformIO but I got this error below:
Can anyone help me to solve the problem?
Thanks in advance

Open On-Chip Debugger v0.10.0-esp32-20201202 (2020-12-02-17:38)
Licensed under GNU GPL v2
For bug reports, read
** http://openocd.org/doc/doxygen/bugs.html**
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
2
Info : FreeRTOS creation
adapter speed: 5000 kHz

Info : tcl server disabled
Info : telnet server disabled
Error: No J-Link device found.

Assertion failed!

Program: C:\Users\ahmed.platformio\packages\tool-openocd-esp32\bin\openocd.exe
File: …/src/jtag/core.c, Line 343

Expression: jtag_trst == 0
.pioinit:11: Error in sourced command file:
Remote communication error. Target disconnected.: No error.

1 Like

I am not familiar with PlatformIO, but it looks like you’re trying to attach OpenOCD to the T-Beam (specifically the ESP32).

You currently don’t have a Segger J-Link probe (or any other JTAG/ICE probe) attached or properly installed on your PC. The error message you are getting says that OpenOCD couldn’t access the Segger J-Link JTAG probe device (likely the default device, and, from my understanding, not appropriate for the ESP32). You need the appropriate hardware – some sort of JTAG/ICE probe – in order to use OpenOCD on the ESP32. See the Selecting JTAG Adapter section on the JTAG Debugging page for an introduction. (The first paragraph is not applicable to you since you’re debugging the ESP32 on the TTGO T-Beam, which is not on an ESP-WROVER-KIT.)

The TTGO T-Beam comes with a Silicon Labs CP210x USB to UART bridge, which is only used for the built-in ESP32 ROM bootloader and communications on the serial UART port of the ESP32 after boot, so that isn’t sufficient. Consider the ESP-Prog if you plan to use OpenOCD, as that is supported by Espressif.

Hardware debugger support for ESP32 is a fairly advanced topic. You’ll need to solder extra JTAG debugging wires to your board to use openocd for debugging (and use a device called J-Link). Did you do that?