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

# Select the CH347 JTAG driver
adapter driver ch347

# Identify the device
ch347 device_desc "EasyDevKit"
ch347 vid_pid 0x1a86 0x55dd

# Configure activity LED
# Note: The LED is active-low on GPIO4.
adapter gpio led 4 -active-low

# 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 30 MHz.
#   - Best results are typically achieved at 15 MHz.
#
# Supported frequencies (kHz):
#   469, 938, 1875, 3750, 7500, 15000, 30000, 60000
# ---------------------------------------------------------------------------
adapter speed 15000
