jaylink: Failed to send data to device: LIBUSB_ERROR_TIMEOUT with Openocd + Jlink + esp32_devkitc

stevensun
Posts: 2
Joined: Fri May 25, 2018 7:25 am

jaylink: Failed to send data to device: LIBUSB_ERROR_TIMEOUT with Openocd + Jlink + esp32_devkitc

Postby stevensun » Fri May 25, 2018 8:06 am

I have the following logs - has anyone encountered this? If yes, do you know how to fix it. Thanks in advance.

$ bin/openocd -s share/openocd/scripts -f interface/jlink.cfg -f board/esp-wroom-32.cfg -c "program_esp32 blink.bin 0x10000 verify exit"
Open On-Chip Debugger 0.10.0-dev (2018-04-18-12:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz
esp32 interrupt mask on
force hard breakpoints
Info : No device selected, using first device.
Info : Energy Micro EFM32 compiled Apr 20 2016 12:17:23
Info : Hardware version: 1.00
Info : VTarget = 3.319 V
Info : Reduced speed from 20000 kHz to 12000 kHz (maximum).
Info : Reduced speed from 20000 kHz to 12000 kHz (maximum).
Info : clock speed 20000 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)
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: cpu0: esp32_fetch_all_regs (line 165): reading DSR failed!
jaylink: Last read operation left 10 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_PIPE.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
jaylink: Last read operation left 2048 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
jaylink: Last read operation left 579 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
jaylink: Last read operation left 10 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
Error: cpu0: Failed to read NARADR_DSR. Can't halt.
jaylink: Last read operation left 19 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
jaylink: Last read operation left 10 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
jaylink: Last read operation left 10 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
Error: cpu1: Failed to read NARADR_DSR. Can't halt.
Info : active_cpu: 0, changed to 1, reson = 0xffffff98
jaylink: Last read operation left 19 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
Info : Target halted. PRO_CPU: PC=0x00000000 APP_CPU: PC=0x00000000 (active)
jaylink: Last read operation left 10 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
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 'program_esp32'
in procedure 'init' called at file "share/openocd/scripts/target/esp32.cfg", line 118
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

jaylink: Last read operation left 37 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
embedded:startup.tcl:21: Error:
in procedure 'program_esp32'
in procedure 'init' called at file "share/openocd/scripts/target/esp32.cfg", line 118
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

jaylink: Last read operation left 47 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
Polling target esp32 failed, trying to reexamine
jaylink: Last read operation left 9 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
embedded:startup.tcl:21: Error:
in procedure 'program_esp32'
in procedure 'init' called at file "share/openocd/scripts/target/esp32.cfg", line 118
in procedure 'ocd_bouncer'
in procedure 'flash'
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

jaylink: Last read operation left 47 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
Polling target esp32 failed, trying to reexamine
jaylink: Last read operation left 9 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
embedded:startup.tcl:21: Error:
in procedure 'program_esp32'
in procedure 'init' called at file "share/openocd/scripts/target/esp32.cfg", line 118
in procedure 'ocd_bouncer'
in procedure 'mflash'
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

jaylink: Last read operation left 47 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
Polling target esp32 failed, trying to reexamine
jaylink: Last read operation left 9 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
embedded:startup.tcl:21: Error:
in procedure 'program_esp32'
in procedure 'init' called at file "share/openocd/scripts/target/esp32.cfg", line 118
in procedure 'ocd_bouncer'
in procedure 'nand'
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

jaylink: Last read operation left 47 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
Polling target esp32 failed, trying to reexamine
jaylink: Last read operation left 9 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
embedded:startup.tcl:21: Error:
in procedure 'program_esp32'
in procedure 'init' called at file "share/openocd/scripts/target/esp32.cfg", line 118
in procedure 'ocd_bouncer'
in procedure 'pld'
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

jaylink: Last read operation left 47 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
Polling target esp32 failed, trying to reexamine
jaylink: Last read operation left 9 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
embedded:startup.tcl:21: Error:
in procedure 'program_esp32'
in procedure 'reset' called at file "share/openocd/scripts/target/esp32.cfg", line 123
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

jaylink: Last read operation left 47 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
error: -104
in procedure 'program_esp32'
in procedure 'reset' called at file "share/openocd/scripts/target/esp32.cfg", line 123
in procedure 'ocd_bouncer'

jaylink: Last read operation left 1 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
Polling target esp32 failed, trying to reexamine
jaylink: Last read operation left 10 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
in procedure 'program_esp32'
in procedure 'program_error' called at file "share/openocd/scripts/target/esp32.cfg", line 124
in procedure 'echo' called at file "embedded:startup.tcl", line 450
in procedure 'ocd_bouncer'

** Unable to reset target **
jaylink: Last read operation left 47 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
Polling target esp32 failed, trying to reexamine
jaylink: Last read operation left 9 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_jtag_io() failed: JAYLINK_ERR.
in procedure 'program_esp32'
in procedure 'program_error' called at file "share/openocd/scripts/target/esp32.cfg", line 124
in procedure 'shutdown' called at file "embedded:startup.tcl", line 451
in procedure 'ocd_bouncer'

shutdown command invoked

jaylink: Last read operation left 47 bytes.
jaylink: Failed to send data to device: LIBUSB_ERROR_IO.
jaylink: transport_write() failed: -1.
Error: jaylink_unregister() failed: JAYLINK_ERR.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: jaylink: Failed to send data to device: LIBUSB_ERROR_TIMEOUT with Openocd + Jlink + esp32_devkitc

Postby ESP_Angus » Sun May 27, 2018 11:49 pm

Hi steven,

This implies some low level USB communications problem between your host computer and the JLink device. When I've seen this kind of error it's usually come down to a faulty USB hub or a bad USB cable, or some kind of power problem.

If not those two things, maybe bad JLink hardware? Is it a known good device?

I know that at least some models of JLink have been successfully used with openocd+esp32. The last possibility is that your JLink has some different firmware on it which our version of openocd doesn't support, but I haven't heard of anything like that.

Angus

Akshar01
Posts: 9
Joined: Sat Sep 16, 2017 2:47 am

Re: jaylink: Failed to send data to device: LIBUSB_ERROR_TIMEOUT with Openocd + Jlink + esp32_devkitc

Postby Akshar01 » Fri Dec 21, 2018 1:44 pm

Hi,

If you got solution of this issue please share with me cause of I'm getting same issue by using jlink EDU mini+esp32 with openocd tool chain.

Who is online

Users browsing this forum: Google [Bot], Vishna and 181 guests