xous-core/emulation
tunnell dd45a11c7b emulation: cast frequency to ulong for Renode v1.16+ compatibility
Renode v1.16 changed the LimitTimer constructor signature from
`long frequency` to `ulong frequency`. Without this cast, the
LiteX_Timer_32 peripheral fails to compile against current Renode
versions, causing emulation to exit immediately with a peripheral
build failure rather than booting Xous.

Tested with Renode v1.16.1.4499 (build 9d55b4e6-202604170227)
against the standard emulation/xous-release.resc startup. With
the cast, Xous boots through to the main loop. Without it,
Renode exits before any boot output appears.
2026-04-26 08:39:01 -05:00
..
ec emulation: ec: add new riscv suffixes for csr/fence 2023-12-29 18:42:16 +08:00
peripherals emulation: cast frequency to ulong for Renode v1.16+ compatibility 2026-04-26 08:39:01 -05:00
soc turn off WDT in swap debug config 2024-05-06 13:19:37 +08:00
betrusted-swap.resc remove com bus handler in case it is making things not deterministic 2024-05-27 23:06:42 +08:00
betrusted.resc emulation: expose gdb serial to port 3456 2024-03-11 14:01:37 +08:00
build-renode.ps1
LICENSE
linux-server-rootfs.jffs2
linux-server.resc make busybox linux image ro so it doesn't modify the JFFS2 image in renode 2022-10-12 01:27:54 +08:00
peripherals.csproj.template
README.md
renode-keybox.bin extract the renode key box as a dump 2022-11-01 13:03:52 +08:00
renode.key key file for decrypting .System basis on Renode 2022-10-31 22:14:10 +08:00
rootkeys-to-renode.md add some .gitigore entries that help make my life a little easier 2022-07-29 15:58:02 +08:00
versatile-vmlinux
vexriscv-aes.py
xous-release-tap.resc
xous-release.resc add @xobs patch to get a local-only interface working 2023-09-21 18:39:32 +08:00
xous-swap.resc move log files to reports/ 2024-05-28 20:41:51 +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.