Add test case for `riscv expose_custom`.
[riscv-tests.git] / debug / targets / RISC-V / spike-2.cfg
index c78cf8f82d6078d7270415082156c2217fe710f6..9dbbfe30911923bdd1b11599f8be8dff6d601b7d 100644 (file)
@@ -14,10 +14,19 @@ target create $_TARGETNAME_0 riscv -chain-position $_CHIPNAME.cpu -coreid 0
 target create $_TARGETNAME_1 riscv -chain-position $_CHIPNAME.cpu -coreid 1
 
 gdb_report_data_abort enable
+gdb_report_register_access_error enable
 
 # Expose an unimplemented CSR so we can test non-existent register access
 # behavior.
 riscv expose_csrs 2288
+riscv expose_custom 1,12345-12348
 
 init
-reset halt
+
+set challenge [ocd_riscv authdata_read]
+riscv authdata_write [expr $challenge + 1]
+
+targets $_TARGETNAME_0
+halt
+targets $_TARGETNAME_1
+halt