JTAG debugging ESP32 with Jlink EDU mini

Sysprogs forums Forums VisualGDB JTAG debugging ESP32 with Jlink EDU mini

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24672
    vsokurov
    Participant

    I have bought a JLink EDU mini and have tried to make it work with the ESP32 Wroom module for the last few days  to no avail.

    When trying to connect to the chip via openocd, I get the following error:

    Open On-Chip Debugger v0.10.0-esp32-20190313 (2019-04-14-16:36)
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    adapter speed: 20000 kHz
    Info : Configured 2 cores
    esp32 interrupt mask on
    Info : Listening on port 6666 for tcl connections
    Info : Listening on port 4444 for telnet connections
    Info : J-Link EDU Mini V1 compiled Mar 1 2019 16:58:54
    Info : Hardware version: 1.00
    Info : VTarget = 3.299 V
    Info : Reduced speed from 20000 kHz to 4000 kHz (maximum).
    Info : Reduced speed from 20000 kHz to 4000 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)
    Info : Listening on port 3333 for gdb connections
    Info : accepting 'gdb' connection on tcp/3333
    Error: No symbols for FreeRTOS
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Error: Failed to fetch AR regs!

    Warn : Last read operation left 579 bytes.
    Info : Target halted. PRO_CPU: PC=0x00000000 (active) APP_CPU: PC=0x00000000
    Info : Detected debug stubs @ 3ffb26fc on core0 of target 'esp32'
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : cpu0: Failed reading 5892 bytes at address 0x40090000
    Error: no working area available, can't alloc space for stub code!
    Error: Failed to load stub (-308)!
    Error: Algorithm run failed (-308)!
    Error: Failed to run flasher stub (-308)!
    Warn : Failed to get flash mappings (-308)!
    Warn : Last read operation left 636 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : Last read operation left 2048 bytes.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Warn : Failed to send data to device: LIBUSB_ERROR_TIMEOUT.
    Error: Sending data to device timed out.
    Error: transport_write() failed: timeout occurred.
    Error: jaylink_jtag_io() failed: timeout occurred.
    Warn : cpu0: Failed reading 5892 bytes at address 0x40090000
    Error: no working area available, can't alloc space for stub code!
    Error: Failed to load stub (-308)!
    Error: Algorithm run failed (-308)!
    Error: Failed to run flasher stub (-308)!
    Warn : Last read operation left 636 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : Last read operation left 2048 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Warn : cpu0: Failed reading 5892 bytes at address 0x40090000
    Error: no working area available, can't alloc space for stub code!
    Error: Failed to load stub (-308)!
    Error: Algorithm run failed (-308)!
    Error: Failed to run flasher stub (-308)!
    Error: Failed to probe flash, size 0 KB
    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
    Warn : Last read operation left 635 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Polling target esp32 failed, trying to reexamine
    Warn : Last read operation left 19 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Examination failed, GDB will be halted. Polling again in 100ms
    shutdown command invoked
    Info : Restore debug stubs @ 3ffb26fc on core0 of target 'esp32'
    Warn : Last read operation left 37 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_jtag_io() failed: unspecified error.
    Error: Failed to exec JTAG queue!
    Error: Failed to write trace status (-104)!
    Warn : Flash driver of esp32.flash does not support free_driver_priv()
    Warn : Flash driver of irom does not support free_driver_priv()
    Warn : Flash driver of drom does not support free_driver_priv()
    Warn : Last read operation left 10 bytes.
    Error: Failed to send data to device: LIBUSB_ERROR_IO.
    Error: transport_write() failed: unspecified error.
    Error: jaylink_unregister() failed: unspecified error.

    The same error has been reported on the ESP forums, but does not seem to have been resolved [link].

    While it looks like a USB error, I was able to use the debug probe with an arm microcontroller.

    It looks like JTAG debugging is supported with the Jlink EDU, but not with the Jlink EDU mini, although they are reported to support the same feature set on Segger’s website.

    Has anyone successfully made this kind of setup work?

    #24673
    support
    Keymaster

    Hi,

    It does look like some sort of a low-level communication issue between OpenOCD and the JTAG probe. If others have reproduced the same problem outside VisualGDB, it may indicate that the Espressif’s OpenOCD port is simply not compatible with this version of J-Link.

    Our best advice would be to try one of the debug probes that is fully supported (e.g. Olimex ARM-USB-OCD-H or any other one based on the FT2232 chip). Also if Espressif fixes the issue in the future in their github repository, please feel to let us know and we will be happy to release an updated binary package with the fix.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.