Resurrect spike debug support
authorPalmer Dabbelt <palmer@dabbelt.com>
Fri, 3 Mar 2017 23:13:11 +0000 (15:13 -0800)
committerPalmer Dabbelt <palmer@dabbelt.com>
Fri, 3 Mar 2017 23:18:16 +0000 (15:18 -0800)
debug/Makefile
debug/targets/spike/openocd.cfg [new file with mode: 0644]

index 56db73178201087e6817e5af7a0d35d0887347d2..79e89cbe397d912d024a26cdb09ddd081491c02f 100644 (file)
@@ -12,7 +12,7 @@ pylint:
        pylint --rcfile=pylint.rc *.py
 
 %.log:
-       $(GDBSERVER_PY) --isolate --$(subst .log,,$@) --cmd $(RISCV_SIM) \
+       $(GDBSERVER_PY) --isolate --$(subst .log,,$@) \
            > $@ 2>&1 || (sed s/^/$@:\ / $@ && false)
 
 clean:
diff --git a/debug/targets/spike/openocd.cfg b/debug/targets/spike/openocd.cfg
new file mode 100644 (file)
index 0000000..5389da8
--- /dev/null
@@ -0,0 +1,17 @@
+adapter_khz     10000
+
+interface remote_bitbang
+remote_bitbang_host $::env(REMOTE_BITBANG_HOST)
+remote_bitbang_port $::env(REMOTE_BITBANG_PORT)
+
+set _CHIPNAME riscv
+jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10e31913
+
+set _TARGETNAME $_CHIPNAME.cpu
+target create $_TARGETNAME riscv -chain-position $_TARGETNAME
+
+gdb_report_data_abort enable
+
+init
+
+halt