openocd.cfg 875 Bytes
Newer Older
Enrico Pozzobon committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
interface ftdi
ftdi_device_desc "FT2232H MiniModule"
ftdi_vid_pid 0x0403 0x6010
ftdi_serial FT2XAA99
ftdi_channel 0

transport select jtag


ftdi_layout_init 0x0038 0x003b
ftdi_layout_signal nSRST -data 0x0020

set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x1000563d
jtag newtap $_CHIPNAME.1 cpu -irlen 5 -expected-id 0x790007a3

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 10000 -work-area-backup 1

set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME gd32vf103 0x08000000 0 0 0 $_TARGETNAME

riscv expose_csrs 3040-3071

adapter_khz 1000
adapter_nsrst_delay 100
jtag_ntrst_delay 100
#reset_config srst_nogate
#reset_config srst_only srst_push_pull srst_nogate connect_assert_srst
reset_config srst_only srst_push_pull srst_nogate