def test(self):
self.check_reg("f18", "fs2")
+class SimpleNoExistTest(GdbTest):
+ def test(self):
+ try:
+ self.gdb.p("$csr2288")
+ assert False, "Reading csr2288 should have failed"
+ except testlib.CouldNotFetch:
+ pass
+ try:
+ self.gdb.p("$csr2288=5")
+ assert False, "Writing csr2288 should have failed"
+ except testlib.CouldNotFetch:
+ pass
+
class SimpleMemoryTest(GdbTest):
def access_test(self, size, data_type):
assertEqual(self.gdb.p("sizeof(%s)" % data_type), size)
$_TARGETNAME configure -work-area-phys 0x80000000 -work-area-size 8096 -work-area-backup 1
#-rtos riscv
+# Expose an unimplemented CSR so we can test non-existent register access
+# behavior.
+riscv expose_csrs 2288
+
flash bank my_first_flash fespi 0x20000000 0 0 0 $_TARGETNAME
init
#reset