ESP32 & PIO Unified Debugger


#1

There is a debug problem on Espressif32 v1.1.2 platform that affect C++ code debugging.
This affect ESP-IDF C++ code and Arduino code.
C++ code can’t be debugged properly since “load_cmd”: “preload” was removed from platform.py.
Please bring back that command to release branch, or find some other way to fix this problem.

Thank you.


#2

Thanks for the report! You can control this behavior manually via http://docs.platformio.org/en/latest/projectconf/section_env_debug.html#debug-load-cmd

[env:...]
board = ...
debug_load_cmd = preload
  • What is your OS?
  • Do you see any errors with v1.1.2?

#3

Could you also try the latest upstream version http://docs.platformio.org/en/latest/platforms/espressif32.html#upstream ?


#4

I tested on Windows and on Linux (mint)

Here is a test project:


It won’t stop at the brakepoint on Arduino code or ESP-IDF cpp project.
Work’s just fine when using ESP-IDF and C project.

Tested the upstream branch, commit #1610bd1 and this one work’s just fine with debug, but present the same problem on “Skip pre-debug” option.
However, the “debug_load-cmd” flag on platformio.ini file save the day in those sittuations :slight_smile:


#5

Do you mean that it does not work only with “Skip Pre-Debug”? It seems that I know where is the problem.


#6

Using upstream branch, commit #1610bd1, no “debug_load_cmd = preload” in ini file:
-“PIO Debug” option, C++ debugging work’s just fine.
-“PIO Debug(Skip Pre-Debug)” option, C++ debugging don’t work properly.

Adding “debug_load_cmd = preload” option on platformio.ini fix the debug problem.


#7

New PIO Core+ has been released today! Please open PIO IDE Terminal and type

pio upgrade --dev
pio update

Does it work now for “PIO Debug(Skip Pre-Debug)” ?


#8

I am using PIO Home 1.0.0·Core 3.6.0a8
“PIO Debug(Skip Pre-Debug)” work’s on C++ code only with “debug_load_cmd = preload”

Using that debug command on ini file, don’t bother me.
As long it work’s, is good enough for me.

side note:
It seem’s that “PIO Debug” is faster now :slight_smile:


#9
  1. Please clean project via Tasks > Run Tasks… > PlatformIO: Clean
  2. Start PIO Debug(Skip Pre-Debug) without debug_load_cmd = preload.

It should work. If it does not, need to find out why :frowning:

Yes, we did great improvement. Now, is so close to make an official announcement that support debugging ESP32 .

P.S: Thank you so much for your feedback!


#10

I check’t few times more and it look’s like Skip Pre-Debug is working sometimes without the preload cmd too.

I also noticed the “Pio Debug” option is not loading the program to target before debug.

I think you should set the current “Pio Debug” setup to “Skip Pre-Debug” option because is fast,
And set the “Pio Debug” to how it was before: load the program to flash before debugging.

Anyway, this are small details…
In my opinion, PIO Debugger is a big achievement because make’s “ESP32 1 Click Debug” possible.
Anyone who ever made a GDB set up, understand’s what i’m saying… :grin:

Thank you for making it this easy to use.


#11

We do loading but through OpenOCD, not via python/esptool. It is faster. Could you provide me an output from “Debug Console” when it “does not work”? Right click on a text in “Debug Console” > Copy All.

Thanks!


#12

Here is the debug log:

Preparing firmware for debugging...
Processing esp-wrover-kit (platform: espressif32; board: esp-wrover-kit; framework: arduino)

Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Espressif 32 > Espressif ESP-WROVER-KIT
SYSTEM: ESP32 240MHz 320KB RAM (4MB Flash)
DEBUG: CURRENT(ft2232h) ON-BOARD(ft2232h) EXTERNAL(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 25 compatible libraries
Scanning dependencies...
No dependencies
Compiling .pioenvsesp-wrover-kitsrcmain.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoEsp.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoHardwareSerial.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoIPAddress.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoIPv6Address.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoMD5Builder.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoPrint.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoStream.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoStreamString.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoWMath.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoWString.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoase64.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinocbuf.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-adc.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-bt.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-dac.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-gpio.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-i2c.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-ledc.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-matrix.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-misc.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-psram.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-sigmadelta.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-spi.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-time.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-timer.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-touch.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinoesp32-hal-uart.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinolibb64cdecode.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinolibb64cencode.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinomain.cpp.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinostdlib_noniso.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinowiring_pulse.c.o
Compiling .pioenvsesp-wrover-kitFrameworkArduinowiring_shift.c.o
Archiving .pioenvsesp-wrover-kitlibFrameworkArduino.a
Linking .pioenvsesp-wrover-kitirmware.elf
Building .pioenvsesp-wrover-kitirmware.bin
Retrieving maximum program size .pioenvsesp-wrover-kitirmware.elf
Checking size .pioenvsesp-wrover-kitirmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   4.2% (used 13788 bytes from 327680 bytes)
PROGRAM: [==        ]  16.4% (used 214824 bytes from 1310720 bytes)
esptool.py v2.4.1
[SUCCESS] Took 4.51 seconds
Reading symbols from c:/Users/Calin/Documents/PlatformIO/Projects/esp32_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)
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
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=0x400803C0 (active)    APP_CPU: PC=0x400E8E5E 
Info : Auto-detected flash size 0 KB
Info : Using flash size 0 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:1120
1120	/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
Error: Too large number of threads 1073511828!
Hardware assisted breakpoint 1 at 0x400e7740: file C:\Users\Calin\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp, line 22.
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
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
auto erase enabled
Error: Invalid command argument
image.base_address option value ('ramework-arduinoespressif32') is not valid
** Programming Started **
auto erase enabled
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/Calin/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 155
at file "embedded:startup.tcl", line 454
Invalid command argument
image.base_address option value ('ramework-arduinoespressif32') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/Calin/.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)
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
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
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
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
Error: couldn't open c:UsersCalinDocumentsPlatformIOProjectsesp32_blink.pioenvsesp-wrover-kitpartitions.bin
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/Calin/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 155
at file "embedded:startup.tcl", line 454
auto erase enabled
couldn't open c:UsersCalinDocumentsPlatformIOProjectsesp32_blink.pioenvsesp-wrover-kitpartitions.bin
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/Calin/.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
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: target state: halted
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
auto erase enabled
Error: Invalid command argument
image.base_address option value ('ramework-arduinoespressif32') is not valid
** Programming Started **
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/Calin/.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 ('ramework-arduinoespressif32') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/Calin/.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 
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
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
auto erase enabled
Error: Invalid command argument
image.base_address option value ('irmware.bin') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/Calin/.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 ('irmware.bin') is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program_esp32' 
in procedure 'program_error' called at file "C:/Users/Calin/.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
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
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`

#13

LoL!!! this could be the cause ? :rofl:


#14

Yes :smile: Let me fix it ASAP :blush:
I’ll back here.


#15

Please open PIO IDE Terminal and type pio update. Does it work with new PIO Core+ 1.4.1?


#16

Yes. Is working now :slight_smile:

Reading symbols from c:/Users/Calin/Documents/PlatformIO/Projects/esp32_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=0x4008B82F 
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:1120
1120	/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
Error: Too large number of threads 1073511828!
Hardware assisted breakpoint 1 at 0x400e7740: file C:\Users\Calin\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp, line 22.
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
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
** 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=0x400076DD 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
wrote 16384 bytes from file C:/Users/Calin/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin in 0.978438s (16.353 KiB/s)
** Programming Finished **
wrote 16384 bytes from file C:/Users/Calin/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin in 0.978438s (16.353 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/Calin/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin and flash bank 0 at offset 0x00001000 in 0.331810s (44.406 KiB/s)
contents match
** Verified OK **
read 15088 bytes from file C:/Users/Calin/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin and flash bank 0 at offset 0x00001000 in 0.331810s (44.406 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
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
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
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=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 4096 bytes from file c:/Users/Calin/Documents/PlatformIO/Projects/esp32_blink/.pioenvs/esp-wrover-kit/partitions.bin in 0.642631s (6.224 KiB/s)
** Programming Finished **
wrote 4096 bytes from file c:/Users/Calin/Documents/PlatformIO/Projects/esp32_blink/.pioenvs/esp-wrover-kit/partitions.bin in 0.642631s (6.224 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 3072 bytes from file c:/Users/Calin/Documents/PlatformIO/Projects/esp32_blink/.pioenvs/esp-wrover-kit/partitions.bin and flash bank 0 at offset 0x00008000 in 0.307821s (9.746 KiB/s)
contents match
** Verified OK **
read 3072 bytes from file c:/Users/Calin/Documents/PlatformIO/Projects/esp32_blink/.pioenvs/esp-wrover-kit/partitions.bin and flash bank 0 at offset 0x00008000 in 0.307821s (9.746 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
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=0x400076DD 
Target halted. PRO_CPU: PC=0x40091D07 (active)    APP_CPU: PC=0x400076DD 
wrote 8192 bytes from file C:/Users/Calin/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin in 0.792545s (10.094 KiB/s)
** Programming Finished **
wrote 8192 bytes from file C:/Users/Calin/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin in 0.792545s (10.094 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/Calin/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin and flash bank 0 at offset 0x0000e000 in 0.325811s (24.554 KiB/s)
contents match
** Verified OK **
read 8192 bytes from file C:/Users/Calin/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin and flash bank 0 at offset 0x0000e000 in 0.325811s (24.554 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 
esp32: target state: halted
auto erase enabled
** Programming Started **
auto erase enabled
Info : Use core0 of target 'esp32'
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 217088 bytes from file c:/Users/Calin/Documents/PlatformIO/Projects/esp32_blink/.pioenvs/esp-wrover-kit/firmware.bin in 3.736851s (56.732 KiB/s)
** Programming Finished **
wrote 217088 bytes from file c:/Users/Calin/Documents/PlatformIO/Projects/esp32_blink/.pioenvs/esp-wrover-kit/firmware.bin in 3.736851s (56.732 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 214960 bytes from file c:/Users/Calin/Documents/PlatformIO/Projects/esp32_blink/.pioenvs/esp-wrover-kit/firmware.bin and flash bank 0 at offset 0x00010000 in 1.100367s (190.774 KiB/s)
contents match
** Verified OK **
read 214960 bytes from file c:/Users/Calin/Documents/PlatformIO/Projects/esp32_blink/.pioenvs/esp-wrover-kit/firmware.bin and flash bank 0 at offset 0x00010000 in 1.100367s (190.774 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
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
Info : Target halted. PRO_CPU: PC=0x400E7740 (active)    APP_CPU: PC=0x400E8FA2 
Target halted. PRO_CPU: PC=0x400E7740 (active)    APP_CPU: PC=0x400E8FA2 
[New Thread 1073511836]
[New Thread 1073510424]
[New Thread 1073514528]
[New Thread 1073502764]
[New Thread 1073498936]
[New Thread 1073501256]
[New Thread 1073503920]
[Switching to Thread 1073509012]

Temporary breakpoint 
1, app_main () at C:\Users\Calin\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp:22
22	{
Info : active_cpu: 0, changed to 1, reson = 0x8011cc11
Info : Target halted. PRO_CPU: PC=0x400D7894             APP_CPU: PC=0x400D0AE7 (active)
active_cpu: 0, changed to 1, reson = 0x8011cc11
Target halted. PRO_CPU: PC=0x400D7894             APP_CPU: PC=0x400D0AE7 (active)
[New Thread 1073422388]
[Switching to Thread 1073422388]

Breakpoint 
2, loop () at src\main.cpp:13
13	    digitalWrite(2,!digitalRead(2));

#17

Thanks! Do you use Zadig tool?


#18

Yes. I set the ft2232 channel 0 to WinUSB for debug and channel 1 is using ftdi drivers (com port)
I never tested with both channels on stetted as com ports…
I know that GDB require libusb on windows for ftdi based Jtag’s.


#19

Could you provide a screenshot here? I would like to add this information to our docs. I think it’s so useful. Also, would be thankful if you explain in a few words what need to configure.


ESP32dev - PIO Unified Debugger - setup problem
#20
  1. Download and install FTDI drivers from http://www.ftdichip.com/Drivers/VCP.htm

  2. Connect the debugger to PC USB and check the device manager to see if the drivers are installed properly:

  3. Download Zadig tool from https://zadig.akeo.ie/

  4. Open Zadig Tool and go to Options->List All Devices
    zadig1

5.Select the FT2232 channel you want to use as Jtag.
In case of Wrover-Kit, is channel 0: “Dual RS232-HS (interface 0)”, according to Wrover-Kit schematic:

wrover-jtag

If you use FT2232h minimodule, you can use any channel.
The debugger work’s with FT4232h minimodule too (tested).
In this case, you have 4 channels to chose from :slight_smile:
It work’s even with cheap FT232x chip (ex. UM232H , UM232H-B modules).

  1. Select WinUSB
  2. Click Replace Driver

Capture2

After operation completed, disconnect and reconnect the device to USB port

Now you can use PIO Debugger on ESP32

PS.

In case that other channel (channel 1 in case of wrover-kit) is not detected as com port (used by esptool for flashing),
you must enable the VCP mode on channel 1, this way:

  1. On device manager, right click on “USB Serial Converter B” - >Properties ->Advanced
  2. Select “Load VCP” then click OK.

vcp

Then, the FT2232 channel 2 should be detected as Com Port on device manager:

Wiring for Olimex JTAG debuggers


ESP32dev - PIO Unified Debugger - setup problem
Debugging ESP32 - how?