Flash Application using external JTAG

Dakshk
Posts: 23
Joined: Tue May 21, 2024 11:02 am

Flash Application using external JTAG

Postby Dakshk » Mon Mar 17, 2025 12:38 pm

Hello,

Have anybody try to flash the binary files using any external jtag connector. Previously I have tried to debug using it but Now I want to flash application binaries into a fresh board.

I am using ESP32C3 board and Jlink EDU( Segger ) V-11.

I am getting the following output when I am following steps given here: https://docs.espressif.com/projects/esp ... up-openocd

Code: Select all

For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
** program_esp input args <0x10000 verify exit> **
Info : J-Link V9 compiled May  7 2021 16:26:12
Info : Hardware version: 9.40
Info : VTarget = 3.288 V
Info : clock speed 4000 kHz
Info : JTAG tap: esp32c3.tap0 tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : [esp32c3] datacount=2 progbufsize=16
Info : [esp32c3] Examined RISC-V core; found 1 harts
Info : [esp32c3]  XLEN=32, misa=0x40101104
Info : [esp32c3] Examination succeed
Info : [esp32c3] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: esp32c3.tap0 tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : [esp32c3] Reset cause (3) - (Software core reset)
** Programming Started **
Error: [esp32c3] Algorithm timed out after 3001 ms.
Info : [esp32c3] Target halted, PC=0x00000000, debug_reason=00000000
Info : [esp32c3] Halt cause (2) - (Illegal Instruction)
Error: [esp32c3] ra = 0x40380382
Error: [esp32c3] sp = 0x3fc84290
Error: [esp32c3] gp = 0x0
Error: [esp32c3] tp = 0x0
Error: [esp32c3] t0 = 0x0
Error: [esp32c3] t1 = 0x0
Error: [esp32c3] t2 = 0x0
Error: [esp32c3] fp = 0x0
Error: [esp32c3] s1 = 0x0
Error: [esp32c3] a0 = 0x4
Error: [esp32c3] a1 = 0xffffffff
Error: [esp32c3] a2 = 0x3fc842a0
Error: [esp32c3] a3 = 0x0
Error: [esp32c3] a4 = 0x0
Error: [esp32c3] a5 = 0x0
Error: [esp32c3] a6 = 0x0
Error: [esp32c3] a7 = 0x403801d4
Error: [esp32c3] s2 = 0x0
Error: [esp32c3] s3 = 0x0
Error: [esp32c3] s4 = 0x0
Error: [esp32c3] s5 = 0x0
Error: [esp32c3] s6 = 0x0
Error: [esp32c3] s7 = 0x0
Error: [esp32c3] s8 = 0x0
Error: [esp32c3] s9 = 0x0
Error: [esp32c3] s10 = 0x0
Error: [esp32c3] s11 = 0x0
Error: [esp32c3] t3 = 0x0
Error: [esp32c3] t4 = 0x0
Error: [esp32c3] t5 = 0x0
Error: [esp32c3] t6 = 0x0
Error: [esp32c3] pc = 0x0
Error: [esp32c3] mstatus = 0x201800
Error: [esp32c3] mepc = 0x0
Error: [esp32c3] mcause = 0x2
Error: Failed to wait algorithm (-302)!
Error: Algorithm run failed (-302)!
Error: Failed to run flasher stub (-302)!
Warn : Failed to get flash mappings (-302)!
Error: Failed to probe flash, size 0 KB
Error: auto_probe failed
Error: Failed to find bank 'esp32c3.flash'!
** Clock configuration set failed **
shutdown command invoked
C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\share\openocd\scripts/target/esp_common.cfg:9: Error:
at file "C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\share\openocd\scripts/target/esp_common.cfg", line 9
Thank you.

nitro_orava
Posts: 2
Joined: Fri Oct 24, 2025 4:49 pm

Re: Flash Application using external JTAG

Postby nitro_orava » Fri Oct 24, 2025 4:50 pm

I have the exact same problem. Were you able to find a solution?

nitro_orava
Posts: 2
Joined: Fri Oct 24, 2025 4:49 pm

Re: Flash Application using external JTAG

Postby nitro_orava » Fri Oct 24, 2025 6:31 pm

I figured it out. Here's my situation for those of you reading in the future.

I am using a seeed studio esp32-c3 module with VS code IDF. which I assumed to have jtag because the IDE told me it was able to connect the JTAG.

The issue is that this board can not be programmed via jtag from the USB, you have to use the UART mode. I was able to program it after setting the flash method to UART, removing power from the board, pressing down the button labeled B, plugging power back in, and then using the IDE build and flash commands normally.

Who is online

Users browsing this forum: Amazon [Bot], Baidu [Spider], Google [Bot], PetalBot and 5 guests