Skip to content
Snippets Groups Projects
openocd_digilent_hs2.cfg 1.06 KiB
# SPDX-License-Identifier: GPL-2.0-or-later

# this supports JTAG-HS2 (and apparently Nexys4 as well)

# ADBUS5 controls TMS tri-state buffer enable
# ACBUS6=SEL_TMS controls mux to TMS output buffer: 0=TMS 1=TDI
# ACBUS5=SEL_TDO controls mux to TDO input: 0=TDO 1=TMS

adapter driver ftdi
# ftdi device_desc "Digilent USB Device"
ftdi vid_pid 0x0403 0x6014

ftdi channel 0
ftdi layout_init 0x00e8 0x60eb
ftdi layout_signal SWD_EN -data 0x6000
ftdi layout_signal SWDIO_OE -data 0x20

reset_config none

adapter_khz     1000

 transport select jtag
 
 set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x249511C3

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME -coreid 0

# jtag newtap auto0 tap -irlen 5 -expected-id 0x249511c3
gdb_report_data_abort enable
gdb_report_register_access_error enable

riscv set_reset_timeout_sec 120
riscv set_command_timeout_sec 120

# prefer to use sba for system bus access
# riscv set_prefer_sba on

# dump jtag chain
scan_chain
bindto 0.0.0.0

init
halt
echo "Ready for Remote Connections"