ESP32-S3-WROOM-1 Unable to flash using JTAG with an ESP-PROG using ESPRESSIF-IDE

wreyford
Posts: 4
Joined: Mon Jan 04, 2021 6:39 pm

ESP32-S3-WROOM-1 Unable to flash using JTAG with an ESP-PROG using ESPRESSIF-IDE

Postby wreyford » Wed Oct 26, 2022 3:53 pm

I understand that you would expect me to use the built in JTAG, but that too doesn't work, and I actually want to Debug and Flash our custom board with an ESP32-S3 that already has the JTAG pins broken out to a header.

So to exclude any hardware issues, I decided to start with a ESP32-S3-WROOM-1 board.
All tooling installed in ESPRESSIF IDE, as per the official plugin documentation. Compiling, and flashing over UART works just fine.

Espressif IDE
Espressif-IDE is an Integrated Development Environment(IDE) based on Eclipse CDT for developing IoT Applications using ESP-IDF framework.

Version: 2.6.0
Build id: 20220811-0838
I have connected the header on the ESP-PROG, as per the documentation and rechecked it many times

ESP-PROG Header 2022-10-26 172034.png
Prog_Header
ESP-PROG Header 2022-10-26 172034.png (85.9 KiB) Viewed 3213 times

On the ESP32 S3 side, I connected to 3V3, GND and the JTAG pins (in light blue) as in the image below.

ESP32-S3-WROOM-1 2022-10-26 172333.png
ESP32-S3-Pins
ESP32-S3-WROOM-1 2022-10-26 172333.png (77.01 KiB) Viewed 3213 times

The launch config has been setup as follows:

LaunchConfig 2022-10-26 172739.png
Launch Config
LaunchConfig 2022-10-26 172739.png (38.11 KiB) Viewed 3213 times

The console output is as follows if I just press the RUN button with the selected config in Espressif IDE.

Code: Select all

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
adapter speed: 10000 kHz

Flashing C:/ESP32/Projects/LoadAssist-S3-Master/build/bootloader/bootloader.bin at 0x0
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi tdo_sample_edge falling"
Info : clock speed 10000 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
Info : starting gdb server for esp32s3.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
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
Info : [esp32s3.cpu0] requesting target halt and executing a soft reset
Error: Target not examined yet
Info : [esp32s3.cpu1] requesting target halt and executing a soft reset
Error: Target not examined yet
Error: Unexpected OCD_ID = 00000000
** Flashing Failed **
-1
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
And if I press and hold boot, then reset and release reset, then release boot, and then RUN from the IDE the output differs.

Code: Select all

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
adapter speed: 10000 kHz

Flashing C:/ESP32/Projects/LoadAssist-S3-Master/build/bootloader/bootloader.bin at 0x0
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi tdo_sample_edge falling"
Info : clock speed 10000 kHz
Info : TAP esp32s3.cpu0 does not have valid IDCODE (idcode=0x0)
Info : TAP esp32s3.cpu1 does not have valid IDCODE (idcode=0x0)
Info : TAP auto0.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto1.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto2.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto3.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto4.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto5.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto6.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto7.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto8.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto9.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto10.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto11.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto12.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto13.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto14.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto15.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto16.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto17.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto18.tap does not have valid IDCODE (idcode=0x0)
Warn : Unexpected idcode after end of chain: 21 0x00000000
Warn : Unexpected idcode after end of chain: 53 0x00000000
Warn : Unexpected idcode after end of chain: 85 0x00000000
Warn : Unexpected idcode after end of chain: 117 0x00000000
Warn : Unexpected idcode after end of chain: 149 0x00000000
Warn : Unexpected idcode after end of chain: 181 0x00000000
Warn : Unexpected idcode after end of chain: 213 0x00000000
Warn : Unexpected idcode after end of chain: 245 0x00000000
Warn : Unexpected idcode after end of chain: 277 0x00000000
Warn : Unexpected idcode after end of chain: 309 0x00000000
Warn : Unexpected idcode after end of chain: 341 0x00000000
Warn : Unexpected idcode after end of chain: 373 0x00000000
Warn : Unexpected idcode after end of chain: 405 0x00000000
Warn : Unexpected idcode after end of chain: 437 0x00000000
Warn : Unexpected idcode after end of chain: 469 0x00000000
Warn : Unexpected idcode after end of chain: 501 0x00000000
Warn : Unexpected idcode after end of chain: 533 0x00000000
Warn : Unexpected idcode after end of chain: 565 0x00000000
Warn : Unexpected idcode after end of chain: 597 0x00000000
Warn : Unexpected idcode after end of chain: 629 0x00000000
Error: double-check your JTAG setup (interface, speed, ...)
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
Info : starting gdb server for esp32s3.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
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
Info : [esp32s3.cpu0] requesting target halt and executing a soft reset
Error: Target not examined yet
Info : [esp32s3.cpu1] requesting target halt and executing a soft reset
Error: Target not examined yet
Error: Unexpected OCD_ID = 00000000
** Flashing Failed **
-1
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Also note from the console output, that I have reduced the speed to 10MHz

I hope you can help me resolve this issue, so that I too can enjoy debugging.

aristarchos
Posts: 20
Joined: Sat May 14, 2022 1:36 pm

Re: ESP32-S3-WROOM-1 Unable to flash using JTAG with an ESP-PROG using ESPRESSIF-IDE

Postby aristarchos » Wed Oct 26, 2022 7:38 pm

As per default configuration, ESP32S3 comes with NOT being able to use the JTAG pins.
You need to set a efuse in order to enable JTAG pins 39 to 42.
See here
https://docs.espressif.com/projects/esp ... -jtag.html

Who is online

Users browsing this forum: No registered users and 130 guests