ESP32 WROVER + JLINK OpenOCD problems

Sysprogs forums Forums VisualGDB ESP32 WROVER + JLINK OpenOCD problems

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #11330
    vard
    Participant

    Hi guys,

    I’ve been trying for the past few days to get the debug working on an ESP32 WROVER with a JLINK, and for the life of me, I can’t get the system to program.

    Here’s what I get:

    Open On-Chip Debugger 0.9.0 (2017-05-09)
    Licensed under GNU GPL v2
    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>’.
    adapter speed: 3000 kHz
    Info : No device selected, using first device.
    Info : J-Link ARM V8 compiled Nov 28 2014 13:44:46
    Info : Hardware version: 8.00
    Info : VTarget = 1.436 V
    Info : clock speed 3000 kHz
    Error: JTAG scan chain interrogation failed: all ones
    Error: Check JTAG interface, timings, target power, etc.
    Error: Trying to use configured scan chain anyway…
    Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
    Warn : Bypassing JTAG setup events due to errors
    Info : esp32.cpu0: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
    Info : esp32.cpu0: Core was reset (pwrstat=0xFF, after clear 0xFF).
    Info : esp32.cpu1: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
    Info : esp32.cpu1: Core was reset (pwrstat=0xFF, after clear 0xFF).
    Info : accepting ‘gdb’ connection on tcp/3333
    Error: esp32.cpu0: xtensa_read_memory (line 823): DSR (FFFFFFFF) indicates target still busy!
    Error: esp32.cpu0: xtensa_read_memory (line 823): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
    Error: esp32.cpu0: xtensa_read_memory (line 823): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
    Warn : esp32.cpu0: Failed reading 4 bytes at address 0x00000000
    Interrupt suppression during single-stepping is now enabled
    Error: JTAG scan chain interrogation failed: all ones
    Error: Check JTAG interface, timings, target power, etc.
    Error: Trying to use configured scan chain anyway…
    Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
    Warn : Bypassing JTAG setup events due to errors
    Error: timed out while waiting for target halted
    TARGET: esp32.cpu0 – Not halted
    in procedure ‘reset’
    in procedure ‘ocd_bouncer’
    Warn : esp32.cpu0: target not halted
    Warn : target not halted

    Error: JTAG scan chain interrogation failed: all ones
    Error: Check JTAG interface, timings, target power, etc.
    Error: Trying to use configured scan chain anyway…
    Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
    Warn : Bypassing JTAG setup events due to errors
    Error: timed out while waiting for target halted
    TARGET: esp32.cpu0 – Not halted
    in procedure ‘reset’
    in procedure ‘ocd_bouncer’
    Warn : esp32.cpu0: target not halted
    Warn : target not halted

    Error: JTAG scan chain interrogation failed: all ones
    Error: Check JTAG interface, timings, target power, etc.
    Error: Trying to use configured scan chain anyway…
    Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
    Warn : Bypassing JTAG setup events due to errors
    Error: timed out while waiting for target halted
    TARGET: esp32.cpu0 – Not halted
    in procedure ‘reset’
    in procedure ‘ocd_bouncer’
    Warn : esp32.cpu0: target not halted
    Warn : target not halted

    Info : dropped ‘gdb’ connection
    Open On-Chip Debugger 0.9.0 (2017-05-09)
    Licensed under GNU GPL v2
    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>’.
    Info : No device selected, using first device.
    Info : J-Link ARM V8 compiled Nov 28 2014 13:44:46
    Info : Hardware version: 8.00
    Info : VTarget = 1.436 V
    jaylink: JTAG I/O operation failed: 01.
    Error: jaylink_jtag_io() failed: JAYLINK_ERR_DEV.
    Error: An adapter speed is not selected in the init script. Insert a call to adapter_khz or jtag_rclk to proceed.

     

     

    Any suggestions or things to try out are highly appreciated.

    Many thanks!

    #11340
    support
    Keymaster

    Hi,

    According to the log, it looks like a hardware wiring problem. Please double-check all your wiring and use a logic analyzer to see if the JTAG signals are going through.

    Another advice would be to get a board directly tested by us (e.g. Sparkfun ESP32-Thing ), get the debugging to work with it first and then switch over to ESP32-WROVER.

    #11347
    vard
    Participant

    Thank you kindly for your response, you were quite right, I had a connection problem indeed (broken wire inside the shrink tube of the test wire).

    Found it with the logic analyzer, all is good now!

     

    I can now run the ESP32 Demo as per your latest tutorial, picked up the LED blinky as suggested. The Jlink / OpenOCD seems to be working fine now, but I still have a couple of very quick questions:

    1 – I get some messages in the GDB session window, and I’m too sure I understand what they mean:

    Warning: could not set a breakpoint on main. ‘Step into new instance’ will not work.
    Indeed, after loading the program, the debugger does not stop at main as I believe it should (I’ve got Stepping into new instance (F10) will stop in: main checked).

    Cannot resolve the address of _estack. Skipping stack pointer validity check.

    Obviously, if I un-check the box “Validate stack pointer when starting debugging”  the warning goes away, but I would still like to understand what it means.

    Any suggestions?

     

    2 – What is the maximum number of hardware breakpoints I can have with Jlink/OpenOCD on ESP32? I tried 3 breakpoints and the debugger crashed. I know I’m wasting a breakpoint stopping at main at start-up, I will un-check the stop at main box because the debugger never stops at main anyway, but I would still like to know the maximum number of breakpoints.

     

    Thanks again for all the help and support!

     

    #11348
    vard
    Participant

    Please disregard question number 2 regarding the breakpoints, I read “LIMITATIONS OF THE ESP32 DEBUGGING”, 2 breakpoints (no wonder it was crashing at 3!).

    Thanks!

    • This reply was modified 6 years, 11 months ago by vard.
    #11361
    support
    Keymaster

    Hi,

    The _estack message can be safely ignored. It refers to a mechanism that automatically checks for incorrect end-of-stack setting on ARM devices, however it does not work on ESP8266/ESP32 due to a different linker script layout.

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