"Unable to reset target" error when flashing using ESP-PROG

Hello!

I’m having problems programming my ESP32-S3 over my ESP-PROG using PlatformIO CLI. The reason why I am trying to flash it using the ESP-PROG is because I accidentally programmed it to use the D+ pin and now it is no longer being detected by “pio device list”.

I am following the documentation at ESP-Prog — PlatformIO latest documentation

I am using the same wiring as in the documentation but I keep getting this error when running “pio run -t upload”

...
Successfully created esp32s3 image.
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-builtin, 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/upesy_wroom/firmware.bin
Open On-Chip Debugger  v0.11.0-esp32-20220706 (2022-07-06-15:48)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
debug_level: 1

adapter speed: 20000 kHz

adapter speed: 5000 kHz

Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32s3.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: Unexpected OCD_ID = 00000000
Warn : target esp32s3.cpu0 examination failed
Error: Unexpected OCD_ID = 00000000
Warn : target esp32s3.cpu1 examination failed
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32s3.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: Unexpected OCD_ID = 00000000
Error: Unexpected OCD_ID = 00000000
Error: Target not examined yet
Error: Target not examined yet
Error: Unexpected OCD_ID = 00000000
embedded:startup.tcl:1184: Error: ** Unable to reset target **
in procedure 'program_esp' 
in procedure 'program_error' called at file "/home/user/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp_common.cfg", line 104
at file "embedded:startup.tcl", line 1184
*** [upload] Error 1
...

This is in my .ini file

[env:upesy_wroom]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
debug_tool = esp-prog
upload_protocol = esp-prog
upload_speed = 9600

I’ve uploaded some photos here Download photo.jpeg | LimeWire.
Let me know if I need to provide more information or if I’ve done anything wrong as this is my first topic.

Thank you for the help!

Uploading a new firmware via the USB Port should work when the ESP32-S3 is in download mode. Did you try this?

Hello @sivar2311, thanks for taking the time!
I am not able to post screenshots right now, but I’ve tried programming it using the USB port and it wouldn’t detect any device.

Although, you gave me the idea of manually pulling up or down the GPIO0 pin and resetting the board in order to boot it into flash mode. Do you know if that would work or how exactly to do it?

That’s exactly what I meant.
Press and hold the BOOT button (aka connecting GPIO0 to GND) while pressing the RESET button.

See Boot mode selection

The ESP32-S3 will enter the serial bootloader when GPIO0 is held low on reset. Otherwise it will run the program in flash.

So in this mode your sketch is not running and should accept a new firmware without issues.

That worked! Thank you for the help @sivar2311!