diff --git a/README.md b/README.md index cb0c422..ef2dd99 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ make run 打开另一个终端,进入到tools/openocd目录下,运行openocd: ``` -./openocd_linux -f ../../sim/jtag_debug.cfg +./openocd_linux -f ../../sim/remote_bitbang.cfg ``` ![openocd](./pic/openocd.png) diff --git a/pic/openocd.png b/pic/openocd.png index 898f6fd..661b004 100644 Binary files a/pic/openocd.png and b/pic/openocd.png differ diff --git a/sim/jtag_compliance_test.cfg b/sim/jtag_compliance_test.cfg deleted file mode 100644 index 5512cad..0000000 --- a/sim/jtag_compliance_test.cfg +++ /dev/null @@ -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 diff --git a/sim/jtag_debug.cfg b/sim/remote_bitbang.cfg similarity index 72% rename from sim/jtag_debug.cfg rename to sim/remote_bitbang.cfg index b90f38f..418dcfe 100644 --- a/sim/jtag_debug.cfg +++ b/sim/remote_bitbang.cfg @@ -1,10 +1,9 @@ -debug_level 2 -adapter_khz 10000 +#debug_level 2 -interface remote_bitbang -remote_bitbang_host localhost +adapter driver remote_bitbang -remote_bitbang_port 9999 +remote_bitbang host localhost +remote_bitbang port 9999 set _CHIPNAME riscv 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 # prefer to use sba for system bus access -riscv set_prefer_sba on +riscv set_mem_access sysbus riscv set_enable_virt2phys off # dump jtag chain @@ -29,4 +28,5 @@ scan_chain init halt + echo "Ready for Remote Connections" diff --git a/tools/openocd/openocd_linux b/tools/openocd/openocd_linux index 444f247..69dc4ae 100755 Binary files a/tools/openocd/openocd_linux and b/tools/openocd/openocd_linux differ diff --git a/tools/openocd/openocd_win.exe b/tools/openocd/openocd_win.exe index fbf10d1..eafe761 100644 Binary files a/tools/openocd/openocd_win.exe and b/tools/openocd/openocd_win.exe differ diff --git a/tools/openocd/tinyriscv_cmsisdap.cfg b/tools/openocd/tinyriscv_cmsisdap_jtag.cfg similarity index 70% rename from tools/openocd/tinyriscv_cmsisdap.cfg rename to tools/openocd/tinyriscv_cmsisdap_jtag.cfg index 75586d2..ce3dfba 100644 --- a/tools/openocd/tinyriscv_cmsisdap.cfg +++ b/tools/openocd/tinyriscv_cmsisdap_jtag.cfg @@ -1,13 +1,10 @@ -adapter_khz 1000 +adapter speed 1000 -reset_config srst_only -adapter_nsrst_assert_width 100 - -interface cmsis-dap +adapter driver cmsis-dap transport select jtag -#debug_level 3 +#debug_level 4 set _CHIPNAME riscv 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 # prefer to use sba for system bus access -riscv set_prefer_sba on +riscv set_mem_access sysbus riscv set_enable_virt2phys off init