xous-core/emulation
Sean Cross 66a68f1757 emulation: use riscv32imac-unknown-xous-elf loader
Use the new target for the loader.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-18 18:23:09 +08:00
..
ec emulation: add initial draft of ec 2021-04-25 14:32:02 +08:00
peripherals emulation: add spinor_soft_int and wfi 2021-08-02 17:10:10 +08:00
soc emulation: update offset of xous.img 2021-08-02 18:16:01 +08:00
build-renode.ps1 emulation: add powershell script to build renode 2020-03-18 14:40:23 +08:00
LICENSE initial commit 2020-03-10 12:13:05 +08:00
peripherals.csproj.template xous-release: remove unimplemented lattice_hip block 2021-04-25 14:37:27 +08:00
README.md emulation: document how to edit Renode peripherals 2021-04-25 14:42:28 +08:00
vexriscv-aes.py emulation: add simple vexriscv aes engine 2021-06-01 20:01:43 +08:00
xous-release.resc emulation: use riscv32imac-unknown-xous-elf loader 2021-08-18 18:23:09 +08:00

Platonic RISC-V Device

Platonic is an ideal system useful for developing an operating system. It does not represent any sort of real hardware, though differences between platforms is minimal.

Usage

For emulation, you will need to install Renode. Then, run renode on xous-release.resc. For example:

renode emulation/xous-resc.repl

Editing Renode Peripherals

Renode supports adding peripherals written in C#. For example, many Betrusted peripherals have models created under the peripherals/ directory.

Since there is no external compiler, it can be difficult to know if your code is correct. In fact, if you're unfamiliar with C# or the Renode codebase, editing unfamiliar C# code can be a slow exercise in frustration.

Fortunately, Visual Studio Code is free and has excellent C# tooling. All you need to do is point it at your Renode installation, load the C# plugin, and open a .cs file.

  1. Copy peripherals.csproj.template to peripherals.csproj
  2. Open peripherals.csproj and point <RenodePath> to your Renode installation directory
  3. Install C# for VSCode
  4. You can refer to core Renode peripherals as examples of what C# code looks like.

Debugging with GDB

When running Renode, you can attach a GDB instance. It runs on port 3333. Simply run tar ext :3333 in gdb to attach.