zephyr/boards/riscv/hifive1/support/openocd.cfg

43 lines
991 B
INI

adapter speed 10000
adapter driver ftdi
ftdi device_desc "Dual RS232-HS"
ftdi vid_pid 0x0403 0x6010
ftdi layout_init 0x0008 0x000b
ftdi layout_signal nSRST -data 0x0020 -oe 0x0020
set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10e31913
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME
$_TARGETNAME configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1
flash bank onboard_spi_flash fespi 0x20000000 0 0 0 $_TARGETNAME
proc hifive1-load {file} {
flash protect 0 64 last off
flash write_image erase $file
}
proc hifive1-reset-halt {} {
halt
}
proc hifive1-post-verify {} {
# `reset halt` not correctly works.
# toggles the nSRST directly.
ftdi set_signal nSRST 0
ftdi set_signal nSRST z
shutdown
}
$_TARGETNAME configure -event gdb-attach {
halt
gdb_breakpoint_override hard
}
$_TARGETNAME configure -event gdb-detach {
resume
shutdown
}