riscv-emu
is the RISC-V emulator that is written in Rust. This RISC-V emulator supports Linux, xv6, NuttX, FreeRTOS and Zephyr OS.
$ ../target/release/riscv_emu_desktop [options]
Options:
-k, --kernel Kernel image file
-f, --filesystem File system image file
-d, --dtb Device tree binary file
-m, --machine Target machine (SiFive_e|SiFive_u|Qemu_virt)
-t, --testmode Testmode is enabled
-h, --help Help message
git clone https://github.com/HidenoriMatsubayashi/riscv-emu.git
cd desktop
cargo build --release
../target/release/riscv_emu_desktop \
-k ../artifacts/linux/fw_payload.elf \
-m Qemu_virt \
-d ../artifacts/linux/dtb/qemu_virtio.dtb \
-f ../artifacts/linux/rootfs.img
../target/release/riscv_emu_desktop -k ../artifacts/nuttx/nuttx -m SiFive_e
../target/release/riscv_emu_desktop \
-k ../artifacts/xv6/kernel \
-m Qemu_virt \
-f ../artifacts/xv6/fs.img
../target/release/riscv_emu_desktop -k ../artifacts/freertos/RTOSDemo.elf -m SiFive_e
../target/release/riscv_emu_desktop -k ../artifacts/zephyr/zephyr.elf -m SiFive_e
../target/release/riscv_emu_desktop -k ../tests/bin/rv32ui-p-add -t
cargo test
- RV32/64I
- RV32/64M
- RV32/64F
- RV32/64D
- RV32/64V
- RV32/64A
- RV32/64C (Almost implemented)
- SV32
- SV39
- SV48
- SV57
- SV64
- Uart (UART 16550)
- Virtio Disk
- CLINT (Timer)
- PLIC (Interrupt Controller)
- UART
- PRCI
- GPIO
- SPI Flash
- DTIM (SRAM)