ESP32 JTAG debugging is not functioning properly, OpenOCD is giving these error.

dhananjay.sutariya
Posts: 41
Joined: Thu Feb 28, 2019 12:21 pm

ESP32 JTAG debugging is not functioning properly, OpenOCD is giving these error.

Postby dhananjay.sutariya » Mon May 20, 2019 12:15 pm

Hi all,
I'm trying to debug my ESP32 through JTAG interface .My debug module which is used is FT2232HL.
After following all the steps that are mentioned thoroughly on this link:
https://docs.espressif.com/projects/esp ... ng-openocd

As i go towards, Running OpenOcd i'm getting the following error:
bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger v0.10.0-esp32-20190313 (2019-03-13-09:52)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 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: esp32.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Listening on port 3333 for gdb connections
rbin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger v0.10.0-esp32-20190313 (2019-03-13-09:52)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 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: esp32.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Listening on port 3333 for gdb connections

Please Help me solve this issue.

Best Regards,
Dhananjay Sutariya

ESP_Sprite
Posts: 8922
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 JTAG debugging is not functioning properly, OpenOCD is giving these error.

Postby ESP_Sprite » Tue May 21, 2019 1:42 am

Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Check your hardware, there's probably something wrong there. Also, make sure that whatever code is running on your ESP32 doesn't reconfigure the JTAG pins for other use.

dhananjay.sutariya
Posts: 41
Joined: Thu Feb 28, 2019 12:21 pm

Re: ESP32 JTAG debugging is not functioning properly, OpenOCD is giving these error.

Postby dhananjay.sutariya » Tue May 21, 2019 6:20 am

ESP_Sprite wrote:
Tue May 21, 2019 1:42 am
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Check your hardware, there's probably something wrong there. Also, make sure that whatever code is running on your ESP32 doesn't reconfigure the JTAG pins for other use.
Hi ESP_Sprite,
The program on my chip is Blink one.
Blinking GPIO placed on GPIO Num 2.
Still i'm gettiing this error.

Thanks,
Dhananjay Sutariya

ESP_Sprite
Posts: 8922
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 JTAG debugging is not functioning properly, OpenOCD is giving these error.

Postby ESP_Sprite » Tue May 21, 2019 8:26 am

Then I suggest you check your hardware, as the OpenOCD output suggests :)

dhananjay.sutariya
Posts: 41
Joined: Thu Feb 28, 2019 12:21 pm

Re: ESP32 JTAG debugging is not functioning properly, OpenOCD is giving these error.

Postby dhananjay.sutariya » Wed May 22, 2019 1:01 pm

ESP_Sprite wrote:
Tue May 21, 2019 8:26 am
Then I suggest you check your hardware, as the OpenOCD output suggests :)
Hi ESP_Sprite,
I have managed to check with my hardware pins allthough i'm getting these errors after that:

bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger v0.10.0-esp32-20190313 (2019-03-13-09:52)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
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: 0xfffff4e5 (mfg: 0x272 (Tensilica), part: 0xffff, ver: 0xf)
Warn : JTAG tap: esp32.cpu0 UNEXPECTED: 0xfffff4e5 (mfg: 0x272 (Tensilica), part: 0xffff, ver: 0xf)
Error: JTAG tap: esp32.cpu0 expected 1 of 1: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0xffffffff (mfg: 0x7ff (<invalid>), part: 0xffff, ver: 0xf)
Warn : JTAG tap: esp32.cpu1 UNEXPECTED: 0xffffffff (mfg: 0x7ff (<invalid>), part: 0xffff, ver: 0xf)
Error: JTAG tap: esp32.cpu1 expected 1 of 1: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Error: Trying to use configured scan chain anyway...
Warn : Bypassing JTAG setup events due to errors
Info : Listening on port 3333 for gdb connections


ESP_Sprite
Posts: 8922
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 JTAG debugging is not functioning properly, OpenOCD is giving these error.

Postby ESP_Sprite » Thu May 23, 2019 1:53 am

In particular, show down your adapter. " adapter speed: 20000 kHz" means it's running at 20MHz now.

dhananjay.sutariya
Posts: 41
Joined: Thu Feb 28, 2019 12:21 pm

Re: ESP32 JTAG debugging is not functioning properly, OpenOCD is giving these error.

Postby dhananjay.sutariya » Fri May 24, 2019 5:36 am

ESP_Sprite wrote:
Thu May 23, 2019 1:53 am
In particular, show down your adapter. " adapter speed: 20000 kHz" means it's running at 20MHz now.
Hi ESP_sprite,
My device's hardware confiuration have been met . Thanks, yet i'm having some issue here:
xtensa-esp32-elf-gdb -x gdbinit build/blink.elf
GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from build/blink.elf...done.
0x400e3406 in _Unwind_RaiseException_Phase2 (exc=0x0, context=0x400d1698 <esp_register_freertos_idle_hook_for_cpu+48>)
at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libgcc/unwind.inc:62
62 /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libgcc/unwind.inc: No such file or directory.
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)
esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x5F).
esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x5F).
Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
Hardware assisted breakpoint 1 at 0x400d21c4: file /home/dhananjay/esp/blink/main/blink.c, line 139.
Detected debug stubs @ 3ffb26f8 on core0 of target 'esp32'

Thaks,
Dhananjay Sutariya

Who is online

Users browsing this forum: Baidu [Spider] and 123 guests