riscv-openocd/tcl
Thomas Hebb 7ac389cf47 tcl/target/gd32vf103: work around broken ndmreset
On this chip, the ndmreset bit in the RISC-V debug module doesn't
trigger a system reset like it should. To work around this, add a custom
"reset-assert" handler in its config file that resets the system by
writing to memory-mapped registers.

I've tested this workaround on a Sipeed Longan Nano dev board with a
GD32VF103CBT6 chip. It works correctly for both "reset run" and "reset
halt" (halting at pc=0 for the latter).

I originally submitted[1] this workaround to the riscv-openocd fork of
OpenOCD. That fork's maintainers accepted it, but have not upstreamed it
like they have several other of my changes.

[1] https://github.com/riscv/riscv-openocd/pull/538

Change-Id: I7482990755b300fcbe4963c9a599d599bc02684d
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6957
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
2023-11-30 14:32:09 +00:00
..
board tcl/board: Add TI AM273 launchpad config 2023-11-11 18:46:46 +00:00
chip tcl: add SPDX tag 2022-06-24 21:54:12 +00:00
cpld jtagspi/pld: add interface to get support from pld drivers 2023-09-23 14:33:37 +00:00
cpu tcl/arc: Fix ARC v2 registers r22/r23 2023-09-02 10:40:34 +00:00
fpga ipdbg/pld: ipdbg can get tap and hub/ir from pld driver. 2023-07-08 18:04:24 +00:00
interface tcl/interface/ftdi: Add documentation for HS2 2023-09-17 12:06:44 +00:00
target tcl/target/gd32vf103: work around broken ndmreset 2023-11-30 14:32:09 +00:00
test tcl: add SPDX tag 2022-06-24 21:54:12 +00:00
tools tcl/tools/test_cpu_speed: Fix register name 2023-03-18 21:59:47 +00:00
bitsbytes.tcl tcl: add SPDX tag 2022-06-24 21:54:12 +00:00
mem_helper.tcl tcl: add SPDX tag 2022-06-24 21:54:12 +00:00
memory.tcl tcl: add SPDX tag 2022-06-24 21:54:12 +00:00
mmr_helpers.tcl tcl: add SPDX tag 2022-06-24 21:54:12 +00:00