PlatformIO Community

New install of tools.. Cannot get debugger alive

Just installed VS code
Just installed PIO
Used Zadig to replace Interface 0 driver.

PIO.ini as follows

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
debug_tool = esp-prog
upload_protocol = esp-prog

Now I only see one Serial port in device manager whereas before i saw two ( I presume that’s correct)

Get the errors as shown below… have no clue what to do now.

image

Configuring upload protocol...
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esp-prog
Uploading .pio\build\esp32dev\firmware.bin
Open On-Chip Debugger  v0.10.0-esp32-20210721 (2021-07-21-13:35)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
debug_level: 1

adapter speed: 20000 kHz

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

Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
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
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
Error: Couldn't halt target before SoC reset
embedded:startup.tcl:449: Error: ** Unable to reset target **
in procedure 'program_esp' 
in procedure 'program_error' called at file "C:/Users/lumef/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp_common.cfg", line 93
at file "embedded:startup.tcl", line 449
*** [upload] Error 1
============================================================================ [FAILED] Took 1.10 seconds ============================================================================
The terminal process "C:\Users\lumef\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload'" terminated with exit code: 1.

Likely wireup error, check that it’s exactly as in Low-cost ESP32 In-circuit Debugging | by Manuel Bl. | Medium

The Lib error occurs first. I would think this means it’s not even communicating with the debuuger - hence the subsequent errors?
I don’t think this is a hook up problem. The wiring has been used on other projects successfully.

No. Logs of a successful communication have the same message. (Error: libusb_open() failed when trying to debug - #11 by sspaten). It seems that OpenOCD is just iterating through all USB devices that match the target VID/PID but “errors” at devices not having WinUSB drivers loaded. It continues.

Have you tried debug_speed = 500 in the platformio.ini? (Debugging options — PlatformIO latest documentation)

You are correct. I need to check my connections.
I can program a known working board and still get the Error.

adapter speed: 5000 kHz

Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Warn : Not full dbg stub table 1 of 2
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
shutdown command invoked