Skip to content

Commit 2daf09d

Browse files
committed
riscv32: Add very basic support for Hazard3 SoC on Icebreaker SPRAM
1 parent 232cb94 commit 2daf09d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/target/riscv32.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ static void riscv32_regs_write(target_s *target, const void *data);
7171
static int riscv32_breakwatch_set(target_s *target, breakwatch_s *breakwatch);
7272
static int riscv32_breakwatch_clear(target_s *target, breakwatch_s *breakwatch);
7373

74+
bool hazard3_probe(target_s *const target)
75+
{
76+
target->driver = "Hazard3";
77+
target_add_ram32(target, 0x0, 131072);
78+
return true;
79+
}
80+
7481
bool riscv32_probe(target_s *const target)
7582
{
7683
/* 'E' base ISA has 16 GPRs + PC, 'I' base ISA has 32 GPRs + PC */
@@ -95,6 +102,9 @@ bool riscv32_probe(target_s *const target)
95102
case JEP106_MANUFACTURER_RASPBERRY:
96103
PROBE(rp2350_probe);
97104
break;
105+
case 0xe77:
106+
PROBE(hazard3_probe);
107+
break;
98108
default:
99109
break;
100110
}

0 commit comments

Comments
 (0)