Segger J-Link with openocd (XMC Link) fails during connection

iosixllc
Posts: 71
Joined: Fri Mar 17, 2017 12:13 am

Segger J-Link with openocd (XMC Link) fails during connection

Postby iosixllc » Thu Sep 06, 2018 7:51 am

I'm using ESP32-D2WD on a custom board and have disabled the SPI code/GPIO setup/etc on the JTAG pins (GPIOs 12-15). After switching XMC Link to libusb driver, I am able to get this far from msys2 console:

$ bin/openocd.exe -s share/openocd/scripts -f interface/jlink.cfg -f target/esp32.cfg
Open On-Chip Debugger 0.10.0-dev (2018-07-24-09:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 100 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
esp32 interrupt mask on
Info : No device selected, using first device.
Info : J-Link Lite-XMC4200 Rev.1 compiled Apr 5 2017 11:59:07
Info : Hardware version: 1.00
Info : VTarget = 3.300 V
Info : clock speed 100 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: Debug controller was reset (pwrstat=0xFC, after clear 0xFC).
Info : esp32: Core was reset (pwrstat=0xFC, after clear 0xFC).
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
jaylink: Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
jaylink: Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
jaylink: Sending data to device timed out.
jaylink: transport_write() failed: -4.
Error: jaylink_jtag_io() failed: JAYLINK_ERR_TIMEOUT.
Error: Failed to fetch AR regs!

jaylink: Last read operation left 579 bytes.
Info : Target halted. PRO_CPU: PC=0x00000000 (active) APP_CPU: PC=0x00000000
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 4 bytes at address 0x3FF5F064, data - a1, 3a, d8, 50, a1, 3a, d8, 50
embedded:startup.tcl:21: Error:
in procedure 'init'
in procedure 'ocd_bouncer'
in procedure 'esp_smp_break_config'
in procedure 'esp32' called at file "share/openocd/scripts/target/esp32.cfg", line 54
in procedure 'ocd_bouncer'
in procedure 'esp_core_halt'
in procedure 'esp32' called at file "share/openocd/scripts/target/esp32.cfg", line 44
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 21

Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 4 bytes at address 0x3FF00030
Error: Failed to read target memory (-4)!
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut


I'm using the latest firmware. I also tried with VisualGDB, which is supposed to work, and it has the same issue. Am I missing something? Thanks.

iosixllc
Posts: 71
Joined: Fri Mar 17, 2017 12:13 am

Re: Segger J-Link with openocd (XMC Link) fails during connection

Postby iosixllc » Fri Sep 07, 2018 10:26 pm

Hello, any update?

User avatar
i_am_mrp
Posts: 27
Joined: Thu Sep 28, 2017 9:14 am
Location: California

Re: Segger J-Link with openocd (XMC Link) fails during connection

Postby i_am_mrp » Fri Apr 12, 2019 9:09 pm

Having same problem. Any ideas/help from Espressif?

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

Re: Segger J-Link with openocd (XMC Link) fails during connection

Postby ESP_Sprite » Mon Apr 15, 2019 3:32 am

What's your hardware setup?

Who is online

Users browsing this forum: Google [Bot] and 68 guests