Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.17 KB

README.md

File metadata and controls

31 lines (21 loc) · 1.17 KB

BasicOs

A basic riscv os just in Rust

Inspirations from xv6-riscv, rrxv6, Writing an OS in Rust and vanadinite

Dependencies

In order to build and run the os you'll need :

  • 🦀 Rust
  • cargo-make which you can install via cargo install --force cargo-make
  • QEMU for Riscv
  • (for linux, if you want to use gdb on your machine) The Newlib cross-compiler of Riscv-GNU-Toolchain

Build & Run

You can use the usual commands cargo build and cargo run to run the OS with QEMU

cargo run just does cargo make qemu (see .cargo/config.toml) which is described in the Makefile.toml

Target

To setup the target just change the target in the .cargo/config.toml

[build]
target = "riscv64imac-unknown-none-elf"

Debugging with gdb

Run in a terminal cargo make qemu-gdb And in another terminal (in this directory) riscv64-unknown-elf-gdb