Question about esp32 Flash download through JTAG
Posted: Tue Jan 03, 2017 7:17 am
Hi,
I'm trying to program flash through JTAG for esp32, but getting error message: "Error: timed out while waiting for target halted".
I have GND/TMS/TCK/TDI/TDO connected, the JTAG log is like below:
By adding a connection of SRST to CH_PU of esp32, I can see a print of "esp32.cpu0: target state: halted", but still have similar error as below:
Does anybody managed successfully program flash through JTAG? Any hint will be appreciated. Thanks,
I'm trying to program flash through JTAG for esp32, but getting error message: "Error: timed out while waiting for target halted".
I have GND/TMS/TCK/TDI/TDO connected, the JTAG log is like below:
Code: Select all
$ openocd -f esp32.cfg -c "program ../helloworld/build/helloworld.elf verify reset exit"
Open On-Chip Debugger 0.10.0-dev-g90071eb (2017-01-01-22:30)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 200 kHz
force hard breakpoints
Info : clock speed 200 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Error: esp32.cpu0: esp108_fetch_all_regs (line 673): DSR (000000FF) indicates target still busy!
Error: esp32.cpu0: esp108_fetch_all_regs (line 673): DSR (000000FF) indicates DIR instruction generated an exception!
Error: esp32.cpu0: esp108_fetch_all_regs (line 673): DSR (000000FF) indicates DIR instruction generated an overrun!
Info : esp32.cpu0: Target halted, pc=0x00000000
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0x5F, after clear 0x1F).
Error: timed out while waiting for target halted
TARGET: esp32.cpu0 - Not halted
in procedure 'program'
in procedure 'reset' called at file "embedded:startup.tcl", line 478
in procedure 'ocd_bouncer'
** Unable to reset target **
shutdown command invoked
Code: Select all
$ openocd -f esp32.cfg -c "program ../helloworld/build/helloworld.elf verify reset exit"
Open On-Chip Debugger 0.10.0-dev-g90071eb (2017-01-01-22:30)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 200 kHz
force hard breakpoints
Info : clock speed 200 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Target halted, pc=0x40000400
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32.cpu0: Target halted, pc=0x40000400
esp32.cpu0: target state: halted
Error: timed out while waiting for target halted
TARGET: esp32.cpu1 - Not halted
in procedure 'program'
in procedure 'reset' called at file "embedded:startup.tcl", line 478
in procedure 'ocd_bouncer'
** Unable to reset target **
shutdown command invoked