ESP32 OpenOCD+Jlink+Windows7

newsettler_AI
Posts: 121
Joined: Wed Apr 05, 2017 12:49 pm

ESP32 OpenOCD+Jlink+Windows7

Postby newsettler_AI » Mon Jul 03, 2017 8:16 am

Hi,

I have established debugging with Jlink+openOCD under linux.

But when I tried to do it under windows (7), I have problem: openOCD cannot locate Jlink.

Here is console output:

Code: Select all

admin@workpc MSYS ~/openocd-esp32
$ openocd -f esp32.cfg
Open On-Chip Debugger 0.10.0-dev-gebfc3bad (2017-06-27-15:50)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Error: The specified debug interface was not found (jlink)
Config files located below.

esp32.cfg:

Code: Select all

# Include the configuration for the JTAG adapter. We use the Tian TUMPA here.
# If you have a different interface, please edit this to include the 
# configuration file of yours.
source [find interface/jlink.cfg]

# The ESP32 only supports JTAG.
transport select jtag

# The speed of the JTAG interface, in KHz. If you get DSR/DIR errors (and they
# do not relate to OpenOCD trying to read from a memory range without physical
# memory being present there), you can try lowering this.
adapter_khz 2000

# With no variables set, openocd will configure JTAG for the two cores of the ESP32 and
# will do automatic RTOS detection. This can be be adjusted by uncommenting any of the
# following lines:

# Only configure the PRO CPU
#set ESP32_ONLYCPU 1
# Only configure the APP CPU
#set ESP32_ONLYCPU 2
# Disable RTOS support
#set ESP32_RTOS none
# Force RTOS to be FreeRTOS
#set ESP32_RTOS FreeRTOS

#Source the ESP32 configuration file
source [find target/esp32.cfg]


# The TDI pin of ESP32 is also a bootstrap pin that selects the voltage the SPI flash
# chip runs at. When a hard reset happens (e.g. because someone switches the board off
# and on) the ESP32 will use the current TDI value as the bootstrap value because the
# JTAG adapter overrides the pull-up or pull-down resistor that is supposed to do the
# bootstrapping. These lines basically set the idle value of the TDO line to a 
# specified value, therefore reducing the chance of a bad bootup due to a bad flash
# voltage greatly.

# Enable this for 1.8V SPI flash
#esp108 flashbootstrap 1.8
# Enable this for 3.3V SPI flash
esp108 flashbootstrap 3.3
Jlink.cfg:

Code: Select all

#
# SEGGER J-Link
#
# http://www.segger.com/jlink.html
#

interface jlink

# The serial number can be used to select a specific device in case more than
# one is connected to the host.
#
# Example: Select J-Link with serial number 123456789
#
# jlink serial 123456789
jlink serial 304439649
What I need to edit or add to configs?

YOUNG HOON CHA
Posts: 1
Joined: Thu Jul 06, 2017 11:51 pm

Re: ESP32 OpenOCD+Jlink+Windows7

Postby YOUNG HOON CHA » Fri Jul 07, 2017 12:08 am

Did you use VM(virtual machine) on same PC?
If so, you may disconnect j-link which using in VM.
I also experience similar case.
If some device is connected in VM, windows does not recognize same device at the same time.

Who is online

Users browsing this forum: No registered users and 109 guests