[SOLVED] ESP_PROG not connecting with esp32-s2-saola-1 board with jtag

sanjuchopra
Posts: 6
Joined: Mon Sep 12, 2022 5:13 am

[SOLVED] ESP_PROG not connecting with esp32-s2-saola-1 board with jtag

Postby sanjuchopra » Sun Oct 23, 2022 7:34 pm

Every time I connect esp_prog jtag with esp32-s2-wrover based board esp32-s2-soala-1, I get the following error.

Code: Select all

Open On-Chip Debugger  v0.11.0-esp32-20220411 (2022-04-11-08:47)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

Flashing /home/educate/DATA/ECLIPSE_WORKSPACE/blink/build/bootloader/bootloader.bin at 0x1000
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 ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32s2.cpu: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : target esp32s2 examination failed
Info : starting gdb server for esp32s2 on 3333
Info : Listening on port 3333 for gdb connections
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: esp32s2.cpu: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : esp32s2: Debug controller was reset.
Info : esp32s2: Core was reset.
Error: esp32s2_soc_reset: Couldn't halt target before SoC reset
** Flashing Failed **
-1
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting 'gdb' connection on tcp/3333
Error: Target not examined yet
Error executing event gdb-attach on target esp32s2:
embedded:startup.tcl:1162: Error: 
in procedure 'program_esp' called at file "/home/educate/.espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/share/openocd/scripts/target/esp_common.cfg", line 220
in procedure 'program_error' called at file "/home/educate/.espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/share/openocd/scripts/target/esp_common.cfg", line 93
at file "embedded:startup.tcl", line 1162
Warn : No symbols for FreeRTOS!
Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
shutdown command invoked

I searched forum and found that some pins connection is loose or missing. But I have checked connection multiple time. I always get the same error. Also tested if the connection is proper with multimeter.


My connection are

3.3V - 3.3V
GND - GND
ESP_TMS - GPIO42
ESP_TDI - GPIO41
ESP_TDO - GPIO40
ESP_TCK - GPIO39

esp32-s2 board is getting power and blink program is running. I am able to flash using usb serial.
But jtag esp_prog does not work.

I am attaching the images to show connections.
Is there any way to check if the esp_prog is faulty ?
Please help me to connect jtag with this board. I have spend a lot of time and could not find anything useful on google.
Attachments
20221024_003626.jpg
20221024_003626.jpg (1.95 MiB) Viewed 4265 times
20221024_003543.jpg
20221024_003543.jpg (1.94 MiB) Viewed 4265 times
Last edited by sanjuchopra on Sat Oct 29, 2022 3:36 pm, edited 1 time in total.

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

Re: ESP_PROG not connecting with esp32-s2-saola-1 board with jtag

Postby ESP_Sprite » Mon Oct 24, 2022 12:12 am

sanjuchopra wrote:
Sun Oct 23, 2022 7:34 pm

Code: Select all

Info : clock speed 20000 kHz
20MHz is a bit fast for a few DuPont wires... not sure if it helps, but you could see if lowering adapter_khz makes it work.

sanjuchopra
Posts: 6
Joined: Mon Sep 12, 2022 5:13 am

Re: ESP_PROG not connecting with esp32-s2-saola-1 board with jtag

Postby sanjuchopra » Mon Oct 24, 2022 5:25 am

I tried 2000, 500 and 1000. Got the same error everytime.

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

Re: ESP_PROG not connecting with esp32-s2-saola-1 board with jtag

Postby ESP_Sprite » Mon Oct 24, 2022 6:01 am

Can you also not get a connection when you put the chip into download mode? (Hold 'boot' btn, press and release 'rst', release 'boot')

sanjuchopra
Posts: 6
Joined: Mon Sep 12, 2022 5:13 am

Re: ESP_PROG not connecting with esp32-s2-saola-1 board with jtag

Postby sanjuchopra » Mon Oct 24, 2022 6:18 am

After Holding boot , press and release (rst), and release boot , i think board was halted. The LED was not blinking.
I got the following logs

Code: Select all

Open On-Chip Debugger  v0.11.0-esp32-20220411 (2022-04-11-08:47)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 2000 kHz

Flashing /home/educate/DATA/ECLIPSE_WORKSPACE/blink/build/bootloader/bootloader.bin at 0x1000
Info : clock speed 2000 kHz
Info : TAP esp32s2.cpu does not have valid IDCODE (idcode=0xffe00000)
Info : TAP auto0.tap does not have valid IDCODE (idcode=0xfff00000)
Info : TAP auto1.tap does not have valid IDCODE (idcode=0xfff80000)
Info : TAP auto2.tap does not have valid IDCODE (idcode=0xfffc0000)
Info : TAP auto3.tap does not have valid IDCODE (idcode=0xfffe0000)
Info : TAP auto4.tap does not have valid IDCODE (idcode=0xffff0000)
Info : TAP auto5.tap does not have valid IDCODE (idcode=0xffff8000)
Info : TAP auto6.tap does not have valid IDCODE (idcode=0xffffc000)
Info : TAP auto7.tap does not have valid IDCODE (idcode=0xffffe000)
Info : TAP auto8.tap does not have valid IDCODE (idcode=0xfffff000)
Info : TAP auto9.tap does not have valid IDCODE (idcode=0xfffff800)
Info : TAP auto10.tap does not have valid IDCODE (idcode=0xfffffc00)
Info : TAP auto11.tap does not have valid IDCODE (idcode=0xfffffe00)
Info : TAP auto12.tap does not have valid IDCODE (idcode=0xffffff00)
Info : TAP auto13.tap does not have valid IDCODE (idcode=0xffffff80)
Info : TAP auto14.tap does not have valid IDCODE (idcode=0xffffffc0)
Info : TAP auto15.tap does not have valid IDCODE (idcode=0xffffffe0)
Info : TAP auto16.tap does not have valid IDCODE (idcode=0xfffffff0)
Info : TAP auto17.tap does not have valid IDCODE (idcode=0xfffffff8)
Info : TAP auto18.tap does not have valid IDCODE (idcode=0xfffffffc)
Info : TAP auto19.tap does not have valid IDCODE (idcode=0xfffffffe)
Error: esp32s2.cpu: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : target esp32s2 examination failed
Info : starting gdb server for esp32s2 on 3333
Info : Listening on port 3333 for gdb connections
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: esp32s2.cpu: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : esp32s2: Debug controller was reset.
Info : esp32s2: Core was reset.
Error: esp32s2_soc_reset: Couldn't halt target before SoC reset
** Flashing Failed **
-1
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting 'gdb' connection on tcp/3333
Error: Target not examined yet
Error executing event gdb-attach on target esp32s2:
embedded:startup.tcl:1162: Error: 
in procedure 'program_esp' called at file "/home/educate/.espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/share/openocd/scripts/target/esp_common.cfg", line 220
in procedure 'program_error' called at file "/home/educate/.espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/share/openocd/scripts/target/esp_common.cfg", line 93
at file "embedded:startup.tcl", line 1162
Warn : No symbols for FreeRTOS!
Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
shutdown command invoked


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

Re: ESP_PROG not connecting with esp32-s2-saola-1 board with jtag

Postby ESP_Sprite » Tue Oct 25, 2022 2:08 am

Hm, that still does not look OK; I'd expect the ESP-Prog to connect now.

Do you have another board with a processor that supports JTAG, for instance a different ESP32 board, you can try this on?

sanjuchopra
Posts: 6
Joined: Mon Sep 12, 2022 5:13 am

Re: ESP_PROG not connecting with esp32-s2-saola-1 board with jtag

Postby sanjuchopra » Tue Oct 25, 2022 5:32 am

I tried with another board, got similar results.
Looks like there is some problem with esp prog.
I have ordered another esp prog. I would check with that and post results.

sanjuchopra
Posts: 6
Joined: Mon Sep 12, 2022 5:13 am

Re: ESP_PROG not connecting with esp32-s2-saola-1 board with jtag

Postby sanjuchopra » Sat Oct 29, 2022 3:34 pm

esp-prog was faulty, I tried with a new one and it worked.

Who is online

Users browsing this forum: No registered users and 94 guests