xous-core/emulation
Sean Cross 3c156f6ae4 emulation: use BackingFile to make spi persistent
Use the `BackingFile` property of the SPI flash block in order to allow
SPI flash writes to persist across runs. This will write out the SPI
flash contents as data is written.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-24 15:55:05 +08:00
..
ec wf200: add binary file 2022-03-02 21:02:01 +08:00
peripherals emulation: use BackingFile to make spi persistent 2022-06-24 15:55:05 +08:00
soc fix renode build 2022-06-11 23:37:18 +08:00
betrusted.resc emulation: use BackingFile to make spi persistent 2022-06-24 15:55:05 +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
linux-server-rootfs.jffs2 linux-server: update versatile system 2022-03-02 21:08:22 +08:00
linux-server.resc linux-server: update versatile system 2022-03-02 21:08:22 +08:00
peripherals.csproj.template emulation: csproj: update targetframework to 2.1 2022-01-26 12:51:19 +08:00
README.md README: add note about renode version 2022-04-06 00:42:46 +09:00
versatile-vmlinux emulation: add WF200 ethernet implementation 2022-02-23 21:44:01 +08:00
vexriscv-aes.py emulation: add simple vexriscv aes engine 2021-06-01 20:01:43 +08:00
xous-release-tap.resc emulation: add separate TAP and Linux implementations 2022-04-21 10:15:12 +08:00
xous-release.resc emulation: add separate TAP and Linux implementations 2022-04-21 10:15:12 +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 (use the nightly to get SPI.NORFlash peripheral support). 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. On ubuntu, this may be /opt/renode/bin/.
  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.