1
0
Fork 0
RISC-V OpenSBI Hello, World! https://github.com/jenra-uwu/example-os
This repository has been archived on 2022-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2021-07-25 16:08:37 -04:00
src Initial commit 2021-07-25 15:09:53 -04:00
.gitignore Initial commit 2021-07-25 15:09:53 -04:00
kernel.ld Initial commit 2021-07-25 15:09:53 -04:00
Makefile Initial commit 2021-07-25 15:09:53 -04:00
README.md Update README.md 2021-07-25 16:08:37 -04:00

example-os

An example bare bones OS template for RISC V.

Build instructions

Install the Newlib GNU RISC V toolchain and do make to build. Do make run to run. It should print out a bunch of debug information related to OpenSBI and then a single a.

Exiting QEMU

This is the new "how to exit Vi" I guess. To exit, press control+x, unpress those keys, and then press a.

Debugging

Execute riscv64-unknown-elf-gdb and run the following commands:

(gdb) symbol-file kernel
(gdb) target remote localhost:1234

If you'd like to trace the execution since the beginning, uncomment the # -S at the end of the line in the makefile and run. This halts the emulator until a gdb connection is established.

Resources