# SPDX-License-Identifier: GPL-2.0-or-later
#
# Example OpenOCD configuration file for the EasyDevKits ESP32-WROVER-E FTDI JTAG DevKit.
#
# For example, OpenOCD can be started for ESP32 debugging on
#
#   openocd -f board/esp32-wrover-e-ftdi-jtag-devkit.cfg
#

# Select the FTDI JTAG driver
adapter driver ftdi

# Identify the device
ftdi device_desc "EasyDevKit"
ftdi vid_pid 0x0403 0x6010
# interface 0 is JTAG; interface 1 is the uart
ftdi channel 0

# TCK, TDI, TDO, TMS: ADBUS0-3
# activity LED: ADBUS4
ftdi layout_init 0x0008 0x001b
ftdi layout_signal LED -data 0x0010

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

# ---------------------------------------------------------------------------
# JTAG speed (in kHz)
#
# If you encounter DSR/DIR errors that are not caused by OpenOCD
# attempting to read unmapped memory regions, try lowering this value.
#
# Recommended settings for EasyDevKits:
#   - Do not exceed 20 MHz.
#   - Best results are typically achieved at 20 MHz.
# ---------------------------------------------------------------------------
adapter speed 20000
