tools:openocd: update to support cmsis_dap-v2 driver

Signed-off-by: liangkangnan <liangkangnan@163.com>
verilator
liangkangnan 2022-08-17 10:22:17 +08:00
parent 490c52054b
commit a27d949a5d
7 changed files with 11 additions and 45 deletions

View File

@ -54,7 +54,7 @@ make run
打开另一个终端进入到tools/openocd目录下运行openocd 打开另一个终端进入到tools/openocd目录下运行openocd
``` ```
./openocd_linux -f ../../sim/jtag_debug.cfg ./openocd_linux -f ../../sim/remote_bitbang.cfg
``` ```
![openocd](./pic/openocd.png) ![openocd](./pic/openocd.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,31 +0,0 @@
debug_level 2
adapter_khz 10000
interface remote_bitbang
remote_bitbang_host localhost
remote_bitbang_port 9999
set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x1e200a6f
foreach t [jtag names] {
puts [format "TAP: %s\n" $t]
}
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME -rtos riscv
riscv set_reset_timeout_sec 2000
riscv set_command_timeout_sec 2000
# prefer to use sba for system bus access
riscv set_prefer_sba on
riscv set_enable_virt2phys off
# dump jtag chain
scan_chain
init
riscv test_compliance
shutdown

View File

@ -1,10 +1,9 @@
debug_level 2 #debug_level 2
adapter_khz 10000
interface remote_bitbang adapter driver remote_bitbang
remote_bitbang_host localhost
remote_bitbang_port 9999 remote_bitbang host localhost
remote_bitbang port 9999
set _CHIPNAME riscv set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x1e200a6f jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x1e200a6f
@ -20,7 +19,7 @@ riscv set_reset_timeout_sec 10
riscv set_command_timeout_sec 20 riscv set_command_timeout_sec 20
# prefer to use sba for system bus access # prefer to use sba for system bus access
riscv set_prefer_sba on riscv set_mem_access sysbus
riscv set_enable_virt2phys off riscv set_enable_virt2phys off
# dump jtag chain # dump jtag chain
@ -29,4 +28,5 @@ scan_chain
init init
halt halt
echo "Ready for Remote Connections" echo "Ready for Remote Connections"

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,10 @@
adapter_khz 1000 adapter speed 1000
reset_config srst_only adapter driver cmsis-dap
adapter_nsrst_assert_width 100
interface cmsis-dap
transport select jtag transport select jtag
#debug_level 3 #debug_level 4
set _CHIPNAME riscv set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x1e200a6f jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x1e200a6f
@ -19,7 +16,7 @@ riscv set_reset_timeout_sec 10
riscv set_command_timeout_sec 10 riscv set_command_timeout_sec 10
# prefer to use sba for system bus access # prefer to use sba for system bus access
riscv set_prefer_sba on riscv set_mem_access sysbus
riscv set_enable_virt2phys off riscv set_enable_virt2phys off
init init