Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 971540b

Browse files
ALTracerALTracer
authored andcommitted
riscv32: Add very basic support for Hazard3 SoC on Icebreaker SPRAM
1 parent 86b3ccb commit 971540b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/target/riscv32.c

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

95+
bool hazard3_probe(target_s *const target)
96+
{
97+
target->driver = "Hazard3";
98+
target_add_ram32(target, 0x0, 131072);
99+
return true;
100+
}
101+
95102
bool riscv32_probe(target_s *const target)
96103
{
97104
/* 'E' base ISA has 16 GPRs + PC, 'I' base ISA has 32 GPRs + PC */
@@ -123,6 +130,9 @@ bool riscv32_probe(target_s *const target)
123130
PROBE(ch32v003x_probe);
124131
PROBE(ch32vx_probe);
125132
break;
133+
case 0xe77:
134+
PROBE(hazard3_probe);
135+
break;
126136
default:
127137
break;
128138
}

0 commit comments

Comments
 (0)