bucaps / marss-riscv

TinyEMU based full system cycle-level micro-architectural research simulator for single-core RISC-V systems
MIT License
144 stars 23 forks source link

Bare metal simulation support #23

Closed felix-boeseler closed 3 years ago

felix-boeseler commented 3 years ago

Hello,

In how far does marss-riscv support bare-metal simulation. More specifically, is it possible to start a simulation on a fixed pc, without specifying a bios or kernel, and having a specified elf file statically loaded into the memory from the beginning in which I handle system calls myself. This should simulate a flash memory for a microcontroller where the instructions are saved. If yes, what are the necessary steps to achieve this behaviour. Optimally, further settings such as the mtvec register should be configurable directly at start so that a CPU can be simulated where the interrupt and trap addresses are fixed.

Best regards and many thanks in advance

gkothar1 commented 3 years ago

Hi,

The current version doesn't support direct executables, you need to run the applications using kernel image. You can find 32-bit and 64-bit bootloader, kernel, and disk images here: https://cs.binghamton.edu/~marss-riscv/marss-riscv-images.tar.gz

Currently, we are working on a adding a support for a bare metal mode to run executables directly. It will be available in the next release.

Regards, Gaurav