aboutsummaryrefslogtreecommitdiff
path: root/debug/targets
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2017-06-15 12:58:40 -0700
committerTim Newsome <tim@sifive.com>2017-06-15 12:58:40 -0700
commite9d129ab0fd2c2ce9e5ce4a409bacbf1b0b3a81c (patch)
tree5d3279a927a21b28e4a77f62025c15a02e0e8c5d /debug/targets
parent9ce37f9542f2a38edc837c1d05f4a19c18580cc4 (diff)
downloadriscv-tests-e9d129ab0fd2c2ce9e5ce4a409bacbf1b0b3a81c.zip
riscv-tests-e9d129ab0fd2c2ce9e5ce4a409bacbf1b0b3a81c.tar.gz
riscv-tests-e9d129ab0fd2c2ce9e5ce4a409bacbf1b0b3a81c.tar.bz2
Test 64-bit addressing.
The spike64 target now links all test programs at 0x7fff_ffff_ffff_0000. Also a minor change to log file naming so that 'make all' works again. I'll fix this better later.
Diffstat (limited to 'debug/targets')
-rwxr-xr-xdebug/targets/spike32/link.lds (renamed from debug/targets/spike/link.lds)0
-rw-r--r--debug/targets/spike32/openocd.cfg (renamed from debug/targets/spike/openocd.cfg)0
-rwxr-xr-xdebug/targets/spike64/link.lds34
-rw-r--r--debug/targets/spike64/openocd.cfg19
4 files changed, 53 insertions, 0 deletions
diff --git a/debug/targets/spike/link.lds b/debug/targets/spike32/link.lds
index 01d0e3d..01d0e3d 100755
--- a/debug/targets/spike/link.lds
+++ b/debug/targets/spike32/link.lds
diff --git a/debug/targets/spike/openocd.cfg b/debug/targets/spike32/openocd.cfg
index 2742335..2742335 100644
--- a/debug/targets/spike/openocd.cfg
+++ b/debug/targets/spike32/openocd.cfg
diff --git a/debug/targets/spike64/link.lds b/debug/targets/spike64/link.lds
new file mode 100755
index 0000000..dc7cb63
--- /dev/null
+++ b/debug/targets/spike64/link.lds
@@ -0,0 +1,34 @@
+OUTPUT_ARCH( "riscv" )
+
+SECTIONS
+{
+ . = 0x1212340000;
+ .text :
+ {
+ *(.text.entry)
+ *(.text)
+ }
+
+ /* data segment */
+ .data : { *(.data) }
+
+ .sdata : {
+ __global_pointer$ = . + 0x800;
+ *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2)
+ *(.srodata*)
+ *(.sdata .sdata.* .gnu.linkonce.s.*)
+ }
+
+ /* bss segment */
+ .sbss : {
+ *(.sbss .sbss.* .gnu.linkonce.sb.*)
+ *(.scommon)
+ }
+ .bss : { *(.bss) }
+
+ __malloc_start = .;
+ . = . + 512;
+
+ /* End of uninitalized data segement */
+ _end = .;
+}
diff --git a/debug/targets/spike64/openocd.cfg b/debug/targets/spike64/openocd.cfg
new file mode 100644
index 0000000..2742335
--- /dev/null
+++ b/debug/targets/spike64/openocd.cfg
@@ -0,0 +1,19 @@
+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 -rtos riscv
+target create $_TARGETNAME riscv -chain-position $_TARGETNAME
+
+gdb_report_data_abort enable
+
+init
+reset halt
+
+echo "Ready for Remote Connections"