Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (63 sloc) 2.38 KB
#
# OpenOCD config for using FT2232D that is directly connected
# to FPGA as MIPSfpga EJTAG debugger
# Any FTDI USB IC with MPSSE support (required) can be used
#
# 2017, Stanislav Zhelnio
#
# ##########################################################
# interface part
# ##########################################################
# interface, transport and channel setup
# (use zadig to install WinUSB driver instead of FTDI one)
interface ftdi
transport select jtag
ftdi_channel 0
ftdi_vid_pid 0x0403 0x6010
# ftdi MPSSE initial value and direction
# for detailed description of Magic Numbers look at
# connection table and FTDI AppNote AN_108:
# chapter 2.1 Data bit Definition
ftdi_layout_init 0x0018 0x081b
# special signals
# described in OpenOCD User’s Guide:
# chapter 8.2 Interface Drivers (ftdi)
# chapter 9 Reset Configuration
# nTRST is not used
ftdi_layout_signal nSRST -data 0x0010 -oe 0x0020
ftdi_layout_signal LED -ndata 0x0800 -oe 0x0800
# speed setup
# decrease when errors
adapter_khz 10000
# ##########################################################
# target part
# ##########################################################
# reset delays
# described in OpenOCD User’s Guide:
# chapter 9 Reset Configuration
adapter_nsrst_delay 100
jtag_ntrst_delay 100
# reset sygnal config
# nSRST is directly connected to MIPSfpga (~SI_ColdReset) wire
reset_config srst_only separate srst_nogate srst_push_pull
# To check connection and scan EJTAG chain uncomment this
# and comment all that is bellow then 'shutdown' command.
# Use IDCODE value to detect connection errors:
# IDCODE that was set in RTL config should be identical
# to -expected-id result in 'shutdown' output.
# The IDCODE structure is described in EJTAG Specification:
# chapter 6.5.1 Device Identification (ID) Register
#shutdown
# tap connector and target creation
# change -expected-id to your IDCODE value
# for other arguments see at OpenOCD User’s Guide
jtag newtap auto0 tap -expected-id 0x000f1005 -irlen 5 -ircapture 0x1 -irmask 0x1f
target create auto0.tap mips_mAptiv -endian little -chain-position auto0.tap
# tap configuration
# change params acording to compile and memory settings
# for details see at OpenOCD User’s Guide
auto0.tap configure -work-area-phys 0xa0003ff00 -work-area-size 256 -work-area-backup 1
# EJTAG scan perion
mips32 scan_delay 20000
# run the debugger process and wait for gdb connection
init