Is there a way to run RISCV sim spike on bare metal?

This page summarizes the projects mentioned and recommended in the original post on /r/RISCV

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • jailhouse

    Linux-based partitioning hypervisor

    You could run it inside something like jailhouse hypervisor (https://github.com/siemens/jailhouse) if you want to give it direct dedicated "baremetal" access to hardware. You could do this inside of a buildroot linux image. This would need a customized simulator.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • buildroot

    Buildroot, making embedded Linux easy. Note that this is not the official repository, but only a mirror. The official Git repository is at https://gitlab.com/buildroot.org/buildroot/. Do not open issues or file pull requests here.

    You could integrate spike easily into a custom buildroot linux image (https://buildroot.org/) and make it boot directly into spike and run whatever software image you would like to run. This would work on an ARM/RISC-V linux capable SBC or x86 PC. You would not need to change the source code. A POSIX-capable RTOS should be able to do the same thing.

  • riscv-isa-sim

    Spike, a RISC-V ISA Simulator

    If you want to run bare metal with no RTOS, it should be possible, but you will need to replace the main startup program (https://github.com/riscv-software-src/riscv-isa-sim/blob/master/spike_main/spike.cc) with some program to set up the hardware and instantiate the simulator, load the OS image etc and then have a decent runtime environment to that supports malloc() etc and redirect IO to serial or flash memory etc. There is a bit of work you would need to do.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Nano98: Windows 98 that boots and runs under 5MB

    4 projects | news.ycombinator.com | 20 Sep 2021
  • The installation nightmare that is ROS

    1 project | /r/ROS | 9 Feb 2023
  • Running an HTTP Server with AWS Nitro Enclaves

    2 projects | dev.to | 26 Oct 2022
  • Built my first project with rust!

    3 projects | /r/rust | 22 Jul 2022
  • Ask HN: C/C++ web framework with routes (like Node.js, Python Flask)

    4 projects | news.ycombinator.com | 18 May 2022

Did you konow that Makefile is
the 35th most popular programming language
based on number of metions?