Programming ESP32-S3-WROOM-1 over J-Link using OpenOCD

User avatar
mfeil-leviton
Posts: 2
Joined: Mon Jul 31, 2023 9:52 pm

Programming ESP32-S3-WROOM-1 over J-Link using OpenOCD

Postby mfeil-leviton » Tue Aug 01, 2023 6:36 pm

Hello,

I am using a "J-Trace Pro for ARM Cortex-M processors" debugger for a JTAG connection to my ESP32-S3-DevKitC-1 board. I am able to flash the board over USB/serial, however am unable to use the JTAG interface through the GPIO pins. I have read that an eFuse or two may need to be burned in order to route this interface from the dev kit's USB to the GPIO pins. I began by burning the STRAP_JTAG_SEL to allow for a strapping pin (GPIO3) that can be pulled high or low to select either JTAG over USB or the external pins. I tried this and was met with the same result as before I had burned it once pulling GPIO3 low. An output that is basically the following:

[Codebox]openocd -f interface/jlink.cfg -f target/esp32s3.cfg -c "program_esp build/app-template.bin 0x10000 verify exit"

Open On-Chip Debugger v0.11.0-esp32-20221026 (2022-10-26-14:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : J-Trace PRO V1 Cortex-M compiled Jul 28 2021 10:11:34
Info : Hardware version: 1.00
Info : VTarget = 3.273 V
Info : clock speed 1000 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: [esp32s3.cpu0] Unexpected OCD_ID = 00000000
Warn : target esp32s3.cpu0 examination failed
Error: [esp32s3.cpu1] 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: [esp32s3.cpu0] Unexpected OCD_ID = 00000000
Error: [esp32s3.cpu1] 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: [esp32s3.cpu0] Unexpected OCD_ID = 00000000
** Unable to reset target **
shutdown command invoked[/Codebox]

The same occurred after I burned the DIS_USB_JTAG eFuse, which should permanently disable JTAG over USB as far as I am aware. I can still flash over USB, but cannot get the J-Link to program the board using OpenOCD.

From what I could find online, it seems to be a connection issue. I have verified all pins many times and this doesn't seem to be the problem. Although, one issue I did run into here in terms of wiring was that I could not get power through the J-Link to work (using jumper wires between the 5V input on the dev kit and the 5V target power output pin(s) on the J-Link box). So in this regard, I am still powering the board over USB, not with the debugger.

Another thing I will mention is that I have tried changing adapter speed by editing my target config file (esp32s3.cfg) and was met with the same result.

Any help would be appreciated and I am willing to provide more information if needed. Thank you.
Matt

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: Programming ESP32-S3-WROOM-1 over J-Link using OpenOCD

Postby ESP_igrr » Tue Aug 01, 2023 10:08 pm

Hi Matt,
I would recommend trying the this advice from the issue thread you've seen already — connecting a logic analyzer to check if there is any issue with the signals on the JTAG interface.
If you can find an FT2232H or a similar board, please try it as well. If it doesn't work, then the issue has to be on ESP32-S3 side, otherwise it's probably something that has to do with the JTAG interface.

Who is online

Users browsing this forum: No registered users and 102 guests