From 4658ebf8efdda2f85a3c12cab2c5eff99fcdb2c1 Mon Sep 17 00:00:00 2001 From: yingche Date: Thu, 26 Mar 2026 15:25:37 +0800 Subject: [PATCH] Add rv32emu board support Add board configuration for rv32emu, a RISC-V RV32 instruction set simulator. This follows the existing board support pattern under examples/riscv32/. --- examples/riscv32/rv32emu/boardsupport.c | 24 ++++++++++++++++++++++++ examples/riscv32/rv32emu/boardsupport.h | 1 + 2 files changed, 25 insertions(+) create mode 100644 examples/riscv32/rv32emu/boardsupport.c create mode 100644 examples/riscv32/rv32emu/boardsupport.h diff --git a/examples/riscv32/rv32emu/boardsupport.c b/examples/riscv32/rv32emu/boardsupport.c new file mode 100644 index 00000000..c8498c43 --- /dev/null +++ b/examples/riscv32/rv32emu/boardsupport.c @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ + +#include + +void +initialise_board(void) +{ +} + +void __attribute__((noinline)) __attribute__((externally_visible)) +start_trigger(void) +{ +#if defined(__riscv) + __asm__ volatile("li a0, 0" : : : "memory"); +#endif +} + +void __attribute__((noinline)) __attribute__((externally_visible)) +stop_trigger(void) +{ +#if defined(__riscv) + __asm__ volatile("li a0, 0" : : : "memory"); +#endif +} diff --git a/examples/riscv32/rv32emu/boardsupport.h b/examples/riscv32/rv32emu/boardsupport.h new file mode 100644 index 00000000..9def3a33 --- /dev/null +++ b/examples/riscv32/rv32emu/boardsupport.h @@ -0,0 +1 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */