Failed to launch GBD: .pioinit:11: Error in sourced file: Remote communication error. Target disconnected.:No error

Hey guys, I have some issues with the IDE as shown in the error above. It doesn´t find my debugging device in the devices list in PIO Home after I unloaded the driver from my ESP-Prog board. Am I right, that the debugger should show up in the devices list?
Are there any suggestions from your side how to fix the problem?

Windows 10 Pro
Visual Studio Code 1.44.2
platformIO Addon Core 4.3.3 Home 3.2.1

Hardware:
Espressif ESP-WROVER-KIT
Espressif ESP Prog Board Debugger

Thanks, and best regards,
Max

Serial devices which are monitorable show in the PIO devices list. If the ESP-Prog drivers are reloaded to libsub, that may not expose the COM port anymore.

Failed to launch GBD: .pioinit:11: Error in sourced file: Remote communication error. Target disconnected.:No error

Sounds like a different error though. How exactly have you connected your ESP-Prog to the target? Which drivers did you load? What’s the content of the platformio.ini of the project?

Thanks for your fast reply!
I used this tutorial:
https://medium.com/@manuel.bl/low-cost-esp32-in-circuit-debugging-dbbee39e508b

You can see the connection of the devicec there, I checked it twice. I loaded the WINUSB v6.1.7600.16358 and selected the Dual RS232-HS (Interface 0).

platformio.ini

[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
upload_port = COM7
monitor_port = COM7
monitor_speed = 115200
debug_tool = esp-prog
debug_init_break = tbreak setup

I see. Have you made sure to follow Espressif’s documentation on configuring the WROVER Board for JTAG? ESP-WROVER-KIT V4.1 Getting Started Guide - ESP32 - — ESP-IDF Programming Guide latest documentation (“JP2 Enable JTAG functionality”). Otherwise the JTAG signals don’t reach the ESP32 and you can’t debug.

I actually use the following ESP32 board:

Which is not in the platformIO List of devices, so for my projects so far i choose the esp-wrover-kit and it worked out.

As you can see in the datasheet there are some pins defined for the JTAG connection and those are the ones I use.

Thats the text in my debug console:

Info : esp32: Debug controller 1 was reset (pwrstat=0xFF, after clear 0x40).
Info : esp32: Core 1 was reset (pwrstat=0xFF, after clear 0x40).
Info : esp32: Core 1 was reset (pwrstat=0x1F, after clear 0xFF).
Info : esp32: Debug controller 1 was reset (pwrstat=0xFF, after clear 0x1F).
Info : Halt timed out, wake up GDB.
Info : esp32: Debug controller 1 was reset (pwrstat=0x40, after clear 0x1F).
Error: timed out while waiting for target halted / 3 - 2
Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_hemory_map disable'.
Error: attempted 'gdb' connection rejected
Error: error during select: Unknown error
Warn : Flash driver of esp32.flash does not support free_driver_priv()
Warn : Flash driver of irom does not support free_driver_priv()
Warn : Flash driver of drom does not support free_driver_priv()
.pioinit:11: Error in sourced command file:
Remote communication error. Target disconnected.: No error.

pio_reset_run_target

"monitor" command not supported by this target.
"monitor" command not supported by this target.

So, ESP-WROVER-KIT has a ESP32-WROVER-B module installed, but you are working with an ESP-WROOM-32 module which is a different openOCD target (esp32-wrover.cfg vs esp-wroom-32.cfg). I suggest you use the board = esp32dev configuration in the platformio.ini as a first debugging step to correct that.

Furthermore the debugger seems to be complaining that the device was reset? Is the power supply of the board stable? It was also observed that lowering the adapter speed can solve the problem (ESP32 + J-link debugger does not start - #12 by Yourigh).

I created a new project with esp32dev as the selected board, But I still have the same issue. And I tried the lowering of the adapter speed through the esp-wroom-32.cfg file but it didn´t help either.

I feel like the divice is not connected properly, even though I can see it in my device manager on my pc, because I get the same error stated above, when I unplug the debugger…

Thanks for you max!

I found my mistake. I had to connect the gnd pin from the ESP-Prog and the ESP32, now everythink works in VS Code.

I am pretty new at this, so sorry if that was a newbie mistake!

Thanks for you help anyways!