Some boards have jumpers that control the reset vector, and forcing them
one way or another is more annoying than dealing with it in software.
self.gdb.thread(t)
pcs.append(self.gdb.p("$pc"))
for pc in pcs:
- assertEqual(self.hart.reset_vector, pc)
+ assertIn(pc, self.hart.reset_vectors)
# mcycle and minstret have no defined reset value.
mstatus = self.gdb.p("$mstatus")
assertEqual(mstatus & (MSTATUS_MIE | MSTATUS_MPRV |
# Defaults to target-<index>
name = None
+ # When reset, the PC must be at one of the values listed here.
+ # This is a list because on some boards the reset vector depends on
+ # jumpers.
+ reset_vectors = []
+
def extensionSupported(self, letter):
# target.misa is set by testlib.ExamineTarget
if self.misa:
ram = 0x10000000
ram_size = 0x10000000
instruction_hardware_breakpoint_count = 4
- reset_vector = 0x1000
+ reset_vectors = [0x1000]
link_script_path = "spike32.lds"
class spike32(targets.Target):
ram = 0x1212340000
ram_size = 0x10000000
instruction_hardware_breakpoint_count = 4
- reset_vector = 0x1000
+ reset_vectors = [0x1000]
link_script_path = "spike64.lds"
class spike64(targets.Target):