ESP32 & PIO Unified Debugger

Ok I found something else. His tutorial wiring instruction (here: Debugging ESP32 · Pro/open62541-arduino Wiki · GitHub) are all reversed, this is why my USB chip burnt.

(more details: The wiring in the tutorial is all reversed · Issue #5 · Pro/open62541-arduino · GitHub)

I’ve remade the wiring in the good order. But still have the same error: embedded:startup.tcl:454: Error: ** Unable to reset target ** like he doesn’t see any board

> Executing task: C:\Users\c\.platformio\penv\Scripts\platformio.exe run --target upload <

Processing featheresp32 (platform: espressif32; board: featheresp32; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Espressif 32 > Adafruit ESP32 Feather
SYSTEM: ESP32 240MHz 320KB RAM (4MB Flash)
DEBUG: CURRENT(olimex-arm-usb-ocd-h) EXTERNAL(esp-prog, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 24 compatible libraries
Scanning dependencies...
No dependencies
Retrieving maximum program size .pioenvs\featheresp32\firmware.elf
Checking size .pioenvs\featheresp32\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   4.2% (used 13884 bytes from 327680 bytes)
PROGRAM: [=         ]  13.6% (used 178024 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: esp-prog, esptool, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny
CURRENT: upload_protocol = olimex-arm-usb-ocd-h
Uploading .pioenvs\featheresp32\firmware.bin
Open On-Chip Debugger 0.10.0-dev (2018-06-04-09:51)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz
esp32 interrupt mask on
force hard breakpoints
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : esp32: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32: Core was reset (pwrstat=0xFF, after clear 0xFF).
Error: cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: Exception reading pc!

Info : active_cpu: 0, changed to 1, reson = 0xffffffff
Info : Target halted. PRO_CPU: PC=0x00000000             APP_CPU: PC=0x00000000 (active)
Error: cpu0: xtensa_write_memory (line 711): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 711): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_write_memory (line 711): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 4 bytes at address 0x3FF5F064, data - a1, 3a, d8, 50, a1, 3a, d8, 50
embedded:startup.tcl:21: Error:
in procedure 'program_esp32'
in procedure 'init' called at file "C:\Users\c\.platformio\packages\tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 118
in procedure 'ocd_bouncer'
in procedure 'esp_smp_break_config'
in procedure 'esp32' called at file "C:\Users\c\.platformio\packages\tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 54
in procedure 'ocd_bouncer'
in procedure 'esp_core_halt'
in procedure 'esp32' called at file "C:\Users\c\.platformio\packages\tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 44
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 21

cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 76 bytes at address 0x50000000
Error: esp32_soc_reset 551 err=-4
in procedure 'program_esp32'
in procedure 'reset' called at file "C:\Users\c\.platformio\packages\tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 123
in procedure 'ocd_bouncer'

embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program_esp32'
in procedure 'program_error' called at file "C:\Users\c\.platformio\packages\tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 124
at file "embedded:startup.tcl", line 454
*** [upload] Error 1
============================================================================================== [ERROR] Took 3.79 seconds ==============================================================================================
Le processus du terminal s'est achevé avec le code de sortie 1

Le terminal sera réutilisé par les tâches, appuyez sur une touche pour le fermer.

I suspect this time that the Olimex has been damaged by the previous manipulation.

Update :

The responsible of this schema has just updated his documentation with a note and removing the misleading poka yoke on the schema

Do you think that my probe could have been damaged now ?

I don’t know exactly what other chip is on the Olimex jtag beside FT2232.
The FT2232 is not that easy to damage…
Most likely the ESP32 was damaged if VCC from Olimex was higher than 3.3V or target VCC was shorted to GND.

I don’t know but the blinky programm of the ESP-32 is still working

I use Olimex ARM-USB-TINY-H and it works like a charm. Could you make a photo how did you connect it with your board?

Here are the screenshots

In this webpage https://imgur.com/a/osNjPk3

Just to precise I didn’t have the USB Serial Converter in the device manager. As I said before I had something like this

image

This can answer partially to your question about the version of the chip used.

Hi I followed your installation instructions for ESP-WROVER-KIT (v4.1) and I got many errors (my setup: Windows 8.1, PIO with VSCode), can you help please ?

Reading symbols from c:/Users/gry/Documents/PlatformIO/Projects/180903-175715-arduino-blink/.pioenvs/esp wrover kit/firmware.elf...
done.
PlatformIO Unified Debugger > http://bit.ly/pio-debug
PlatformIO: Initializing remote target...
Open On-Chip Debugger 0.10.0-dev (2018-06-04-09:51)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
esp32 interrupt mask on
force hard breakpoints
Info : tcl server disabled
Info : telnet server disabled
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : esp32: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32: Core was reset (pwrstat=0xFF, after clear 0xFF).
Error: cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: Exception reading pc!

Info : active_cpu: 0, changed to 1, reson = 0xffffffff
Info : Target halted. PRO_CPU: PC=0x00000000             APP_CPU: PC=0x00000000 (active)
Error: cpu0: xtensa_write_memory (line 711): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 711): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_write_memory (line 711): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 4 bytes at address 0x3FF5F064, data - a1, 3a, d8, 50, a1, 3a, d8, 50
embedded:startup.tcl:21: Error: 
in procedure 'init' 
in procedure 'ocd_bouncer' 
in procedure 'esp_smp_break_config' 
in procedure 'esp32' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 54
in procedure 'ocd_bouncer' 
in procedure 'esp_core_halt' 
in procedure 'esp32' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 44
in procedure 'ocd_bouncer' 
at file "embedded:startup.tcl", line 21

cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Info : accepting 'gdb' connection from pipe
Info : Use core1 of target 'esp32'
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 7416 bytes at address 0x40090000
Error: no working area available, can't alloc space for stub code!
Error: Failed to load stub (-308)!
Error: Algorithm run faied (-308)!
Info : Auto-detected flash size 0 KB
Error: Failed to probe flash, size 0 KB
warning: while parsing target memory map (at line 2): Required element <memory> is missing
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1013). Workaround: increase "set remotetimeout" in GDB
Warn : cpu0: Failed reading 2 bytes at address 0x400E7400
0x00000000 in ?? ()
Not implemented stop reason (assuming exception): undefined
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 4 bytes at address 0x3FF00030
Error: Failed to read target memory (-4)!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1056). Workaround: increase "set remotetimeout" in GDB
Warn : cpu0: Failed reading 4 bytes at address 0x3FFC25BC
Error: Could not read FreeRTOS thread count from target
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1001). Workaround: increase "set remotetimeout" in GDB
Warn : cpu0: Failed reading 2 bytes at address 0x400E7643
Hardware assisted breakpoint 1 at 0x400e7643: file C:\Users\gry\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp, line 23.
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
JTAG scan chain interrogation failed: all ones
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Check JTAG interface, timings, target power, etc.
Trying to use configured scan chain anyway...
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
esp32.cpu0: IR capture error; saw 0x1f not 0x01
Bypassing JTAG setup events due to errors
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 76 bytes at address 0x50000000
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: esp32_soc_reset 551 err=-4
in procedure 'program_esp32' 
in procedure 'reset' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 123
in procedure 'ocd_bouncer'

cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu0: Failed reading 76 bytes at address 0x50000000
embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 124
at file "embedded:startup.tcl", line 454
esp32_soc_reset 551 err=-4
in procedure 'program_esp32' 
in procedure 'reset' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 123
in procedure 'ocd_bouncer'

embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 124
at file "embedded:startup.tcl", line 454
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
JTAG scan chain interrogation failed: all ones
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Check JTAG interface, timings, target power, etc.
Trying to use configured scan chain anyway...
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
esp32.cpu0: IR capture error; saw 0x1f not 0x01
Bypassing JTAG setup events due to errors
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Warn : cpu0: Failed reading 76 bytes at address 0x50000000
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: esp32_soc_reset 551 err=-4
in procedure 'program_esp32' 
in procedure 'reset' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 123
in procedure 'ocd_bouncer'

cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu0: Failed reading 76 bytes at address 0x50000000
embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 124
at file "embedded:startup.tcl", line 454
esp32_soc_reset 551 err=-4
in procedure 'program_esp32' 
in procedure 'reset' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 123
in procedure 'ocd_bouncer'

embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 124
at file "embedded:startup.tcl", line 454
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
JTAG scan chain interrogation failed: all ones
Check JTAG interface, timings, target power, etc.
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Trying to use configured scan chain anyway...
esp32.cpu0: IR capture error; saw 0x1f not 0x01
Bypassing JTAG setup events due to errors
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Warn : cpu0: Failed reading 76 bytes at address 0x50000000
Error: esp32_soc_reset 551 err=-4
in procedure 'program_esp32' 
in procedure 'reset' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 123
in procedure 'ocd_bouncer'

cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 124
at file "embedded:startup.tcl", line 454
cpu0: Failed reading 76 bytes at address 0x50000000
esp32_soc_reset 551 err=-4
in procedure 'program_esp32' 
in procedure 'reset' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 123
in procedure 'ocd_bouncer'

embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 124
at file "embedded:startup.tcl", line 454
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
JTAG scan chain interrogation failed: all ones
Check JTAG interface, timings, target power, etc.
Trying to use configured scan chain anyway...
esp32.cpu0: IR capture error; saw 0x1f not 0x01
Bypassing JTAG setup events due to errors
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 76 bytes at address 0x50000000
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: esp32_soc_reset 551 err=-4
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu0: Failed reading 76 bytes at address 0x50000000
esp32_soc_reset 551 err=-4
in procedure 'program_esp32' 
in procedure 'reset' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 123
in procedure 'ocd_bouncer'

embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 124
at file "embedded:startup.tcl", line 454
in procedure 'program_esp32' 
in procedure 'reset' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 123
in procedure 'ocd_bouncer'

embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 124
at file "embedded:startup.tcl", line 454
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
JTAG scan chain interrogation failed: all ones
Check JTAG interface, timings, target power, etc.
Trying to use configured scan chain anyway...
esp32.cpu0: IR capture error; saw 0x1f not 0x01
Bypassing JTAG setup events due to errors
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 76 bytes at address 0x50000000
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: esp32_soc_reset 551 err=-4
in procedure 'reset' 
in procedure 'ocd_bouncer'


cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu0: Failed reading 76 bytes at address 0x50000000
esp32_soc_reset 551 err=-4
in procedure 'reset' 
in procedure 'ocd_bouncer'


PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
Error: cpu0: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu1: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates target still busy!
cpu0: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates target still busy!
cpu0: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu1: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu1: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu0: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu1: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates target still busy!
cpu1: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
cpu1: esp32_write_dirty_registers (line 326): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu0: xtensa_resume (line 446): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_resume (line 446): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_resume (line 446): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu0: xtensa_resume (line 446): DSR (FFFFFFFF) indicates target still busy!
cpu0: xtensa_resume (line 446): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
cpu0: xtensa_resume (line 446): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu1: xtensa_resume (line 446): DSR (FFFFFFFF) indicates target still busy!
Error: cpu1: xtensa_resume (line 446): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu1: xtensa_resume (line 446): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu1: xtensa_resume (line 446): DSR (FFFFFFFF) indicates target still busy!
cpu1: xtensa_resume (line 446): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
cpu1: xtensa_resume (line 446): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates target still busy!
cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
cpu0: esp32_fetch_all_regs (line 171): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: Exception reading pc!

cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates target still busy!
cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
cpu0: esp32_fetch_all_regs (line 201): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Info : active_cpu: 0, changed to 1, reson = 0xffffffff
Exception reading pc!

Info : Target halted. PRO_CPU: PC=0x00000000             APP_CPU: PC=0x00000000 (active)
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 603): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 4 bytes at address 0x3FFC25BC
Error: Could not read FreeRTOS thread count from target
active_cpu: 0, changed to 1, reson = 0xffffffff
Error: cpu0: xtensa_write_memory (line 711): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 711): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_write_memory (line 711): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 4 bytes at address 0x3FF5F064, data - a1, 3a, d8, 50, a1, 3a, d8, 50
embedded:startup.tcl:21: Error: 
in procedure 'esp_core_halt' 
in procedure 'esp32' called at file "C:/Users/gry/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 44
in procedure 'ocd_bouncer' 
at file "embedded:startup.tcl", line 21

Target halted. PRO_CPU: PC=0x00000000             APP_CPU: PC=0x00000000 (active)

Program received signal 
SIGINT, Interrupt.
0x00000000 in ?? ()

Look at the image below. It seems that don’t have the same results after I’ve done the same steps.

Plecase check and follow the debugger setup instructions I posted on this forum.: ESP32 & PIO Unified Debugger - #20 by botofancalin
Also make sure you connected the debug jumpers on the wrover-kit pcb: w_jtag

I followed strictly your instructions, however didn’t put the debug jumpers which are an important step for the WROVER KIT. Notice that my WROVER KIT is the version V4.1 which is a little bit different from the photo (the actual documentations fits for the V3 version). Anyway I found thoose four jumpers on the board and connected them:

Now the debugg function is starting, but unable to stop at the breakpoint

Debug starting (before play):

.
I’ve put the breakpoint at the first digitalwrite in the loop, see the code below:

/*
 * Blink
 * Turns on an LED on for one second,
 * then off for one second, repeatedly.
 */

#include <Arduino.h>

#ifndef LED_BUILTIN
  // Set LED_BUILTIN if it is not defined by Arduino framework
  #define LED_BUILTIN 2
#endif

void setup()
{
  // initialize LED digital pin as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop()
{
  // turn the LED on (HIGH is the voltage level)
  digitalWrite(LED_BUILTIN, HIGH); //I PUT THE BREAKPOINT HERE
  // wait for a second
  delay(1000);
  // turn the LED off by making the voltage LOW
  digitalWrite(LED_BUILTIN, LOW);
   // wait for a second
  delay(1000);
}

Then I push play, I didn’t stop at the Breakpoint and a few moment later I pushed pause:

Reading symbols from c:/Users/charafeddine/Documents/PlatformIO/Projects/180903-175715-arduino-blink/.pioenvs/esp wrover kit/firmware.elf...
done.
PlatformIO Unified Debugger > http://bit.ly/pio-debug
PlatformIO: Initializing remote target...
Open On-Chip Debugger 0.10.0-dev (2018-06-04-09:51)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
esp32 interrupt mask on
force hard breakpoints
Info : tcl server disabled
Info : telnet server disabled
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : accepting 'gdb' connection from pipe
Info : Target halted. PRO_CPU: PC=0x400E8E5E (active)    APP_CPU: PC=0x400E8E5E 
esp32: target state: halted
Info : Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x4008B863 
Info : Auto-detected flash size 4096 KB
Info : Using flash size 4096 KB
0x400e8e5e in __udivmoddi4 (rp=0x0, d=<optimized out>, n=<optimized out>) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libgcc/libgcc2.c:1199
1199	/builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libgcc/libgcc2.c: No such file or directory.
Not implemented stop reason (assuming exception): undefined
Hardware assisted breakpoint 1 at 0x400e7643: file C:\Users\charafeddine\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp, line 23.
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
** Programming Started **
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
** Programming Started **
auto erase enabled
Info : Use core0 of target 'esp32'
auto erase enabled
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E2 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E2 
Info : Use core0 of target 'esp32'
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E0 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E0 
wrote 16384 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin in 1.048960s (15.253 KiB/s)
** Programming Finished **
wrote 16384 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin in 1.048960s (15.253 KiB/s)
** Programming Finished **
** Verify Started **
Info : Use core0 of target 'esp32'
** Verify Started **
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E2 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E2 
read 15088 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin and flash bank 0 at offset 0x00001000 in 0.331241s (44.482 KiB/s)
contents match
** Verified OK **
read 15088 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin and flash bank 0 at offset 0x00001000 in 0.331241s (44.482 KiB/s)
contents match
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
** Programming Started **
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
auto erase enabled
Error: Invalid command argument
image.base_address option value ('wrover') is not valid
esp32: target state: halted
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/charafeddine/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 155
at file "embedded:startup.tcl", line 454
** Programming Started **
auto erase enabled
Invalid command argument
image.base_address option value ('wrover') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/charafeddine/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 155
at file "embedded:startup.tcl", line 454
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
** Programming Started **
auto erase enabled
Info : Use core0 of target 'esp32'
** Programming Started **
auto erase enabled
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E2 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E2 
Info : Use core0 of target 'esp32'
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E0 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E0 
wrote 8192 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin in 0.817306s (9.788 KiB/s)
** Programming Finished **
wrote 8192 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin in 0.817306s (9.788 KiB/s)
** Programming Finished **
** Verify Started **
Info : Use core0 of target 'esp32'
** Verify Started **
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E2 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E2 
read 8192 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin and flash bank 0 at offset 0x0000e000 in 0.301036s (26.575 KiB/s)
contents match
** Verified OK **
read 8192 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin and flash bank 0 at offset 0x0000e000 in 0.301036s (26.575 KiB/s)
contents match
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
** Programming Started **
auto erase enabled
Error: Invalid command argument
image.base_address option value ('wrover') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/charafeddine/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 155
at file "embedded:startup.tcl", line 454
esp32: target state: halted
** Programming Started **
auto erase enabled
Invalid command argument
image.base_address option value ('wrover') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/charafeddine/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 155
at file "embedded:startup.tcl", line 454
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
Info : Target halted. PRO_CPU: PC=0x400E7643 (active)    APP_CPU: PC=0x4008295F 
Target halted. PRO_CPU: PC=0x400E7643 (active)    APP_CPU: PC=0x4008295F 

Temporary breakpoint 
1, app_main () at C:\Users\charafeddine\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp:23
23	    initArduino();
Info : Target halted. PRO_CPU: PC=0x400E8E5E (active)    APP_CPU: PC=0x400E8E5E 
Target halted. PRO_CPU: PC=0x400E8E5E (active)    APP_CPU: PC=0x400E8E5E 
[New Thread 1073511988]
[New Thread 1073422388]
[New Thread 1073514680]
[New Thread 1073502916]
[New Thread 1073499088]
[New Thread 1073501408]

Program received signal 
SIGINT, Interrupt.
[Switching to Thread 1073510576]
0x400e8e5e in __udivmoddi4 (rp=0x0, d=<optimized out>, n=<optimized out>) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libgcc/libgcc2.c:1199
1199	/builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libgcc/libgcc2.c: No such file or directory.

We can’t see this here but in a previous test the debug console said that it couldn’t insert a breakpoint.

And when I put two breakpoints it says “Could not insert hardware breakpoints”

Reading symbols from c:/Users/charafeddine/Documents/PlatformIO/Projects/180903-175715-arduino-blink/.pioenvs/esp wrover kit/firmware.elf...
done.
PlatformIO Unified Debugger > http://bit.ly/pio-debug
PlatformIO: Initializing remote target...
Open On-Chip Debugger 0.10.0-dev (2018-06-04-09:51)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
esp32 interrupt mask on
force hard breakpoints
Info : tcl server disabled
Info : telnet server disabled
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : accepting 'gdb' connection from pipe
Info : Target halted. PRO_CPU: PC=0x400E8E5E (active)    APP_CPU: PC=0x400E8E5E 
esp32: target state: halted
Info : Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x4008B863 
Info : Auto-detected flash size 4096 KB
Info : Using flash size 4096 KB
0x400e8e5e in __udivmoddi4 (rp=0x0, d=<optimized out>, n=<optimized out>) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libgcc/libgcc2.c:1199
1199	/builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libgcc/libgcc2.c: No such file or directory.
Not implemented stop reason (assuming exception): undefined
Hardware assisted breakpoint 1 at 0x400e7643: file C:\Users\charafeddine\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp, line 23.
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu1: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
** Programming Started **
esp32: target state: halted
** Programming Started **
auto erase enabled
Info : Use core0 of target 'esp32'
auto erase enabled
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
Info : Use core0 of target 'esp32'
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
wrote 16384 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin in 1.196874s (13.368 KiB/s)
** Programming Finished **
wrote 16384 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin in 1.196874s (13.368 KiB/s)
** Programming Finished **
** Verify Started **
Info : Use core0 of target 'esp32'
** Verify Started **
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
read 15088 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin and flash bank 0 at offset 0x00001000 in 0.442361s (33.308 KiB/s)
contents match
** Verified OK **
read 15088 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin and flash bank 0 at offset 0x00001000 in 0.442361s (33.308 KiB/s)
contents match
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
esp32: target state: halted
** Programming Started **
** Programming Started **
auto erase enabled
Error: Invalid command argument
image.base_address option value ('wrover') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/charafeddine/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 155
at file "embedded:startup.tcl", line 454
auto erase enabled
Invalid command argument
image.base_address option value ('wrover') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/charafeddine/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 155
at file "embedded:startup.tcl", line 454
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu1: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
** Programming Started **
auto erase enabled
** Programming Started **
Info : Use core0 of target 'esp32'
auto erase enabled
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E0 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076E0 
Info : Use core0 of target 'esp32'
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
wrote 8192 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin in 1.139833s (7.019 KiB/s)
** Programming Finished **
wrote 8192 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin in 1.139833s (7.019 KiB/s)
** Programming Finished **
** Verify Started **
Info : Use core0 of target 'esp32'
** Verify Started **
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
read 8192 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin and flash bank 0 at offset 0x0000e000 in 0.397291s (20.136 KiB/s)
contents match
** Verified OK **
read 8192 bytes from file C:/Users/charafeddine/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin and flash bank 0 at offset 0x0000e000 in 0.397291s (20.136 KiB/s)
contents match
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
** Programming Started **
auto erase enabled
Error: Invalid command argument
image.base_address option value ('wrover') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/charafeddine/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 155
at file "embedded:startup.tcl", line 454
** Programming Started **
auto erase enabled
Invalid command argument
image.base_address option value ('wrover') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/charafeddine/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 155
at file "embedded:startup.tcl", line 454
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
Warn : xtensa_add_breakpoint: max slot reached, slot=2
Error: can't add breakpoint: resource not available
Warning:
Cannot insert hardware breakpoint 1.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.

Use just one breakpoint on debug start and it should work just fine.
Then you can step trough code using F10(step over) function.

With FTDI, you can use maximum 2 hardware breakepoints on ESP32.
Since the debugger insert a default temporary breakepoint into main function, you can only set one user breakepoint at the beginning of debug session.
After the code passed the temporary breakepoint, you can set the second user breakepoint too.
Software breakepoints are possible too but don’t rely on that…

This is embedded debugging. Not PC software debugging :slight_smile:
Note that code execution with debug on ESP32 is slower than normal code execution. So it may take a few seconds to get to the breakepoint.

2 Likes

Hi,

With FTDI, you can use maximum 2 hardware breakepoints on ESP32.

Thanks for info, this explain why it doesn’t work for two breakpoints. but as you can see in my first comment about the subject of the breakpoint, I’ve put only one breakpoint but it does not stop at it (read from: Now the debugg function is starting, but unable to stop at the breakpoints). So I still need help.

This is embedded debugging. Not PC software debugging.

In many debuggers (microchip, arm, actel core) you can put more than 2 breakpoints.

Software breakepoints are possible too but don’t rely on that…

Can you give more info of how to put them ?

Now I have more info about this bug

STEP 0:

STEP 1: I push F10 (main step by step)

STEP 2 (and this is already abnormal since it enters into the asm):

STEP 3: push F10, then you that you can’t go further, here is the bug !

That’s it !

This is a bug, I’ve made the same test with ESP-IDF, and no problem.
This issue is only with arduino framwork

Yes… there was a bug…
Please update platformio and packages to latest version.
That will solve the problem.

No, at the moment, nothing has changed: PlatformIO, version 3.6.1a4

Can you verify this ? it seems that there is a bug of PIO plus with arduino framework and ESP-32 WROVER KIT

Please delete openocd folder from [user]/.platformio/packages.
Update platformio core and packages then restart platformio and start a new debug session.
Platformio will download and install the latest openocd , then the debug will work just fine.

I tested this solution this morning with wrover-kit and it worked just fine.