Xous SDK (pinned for betrusted transpilation)
Find a file
2021-04-17 15:03:18 +08:00
.cargo xtask: add cargo xtask command 2020-08-17 19:42:39 +08:00
.vscode settings.json for working on hardware 2020-11-25 17:03:11 +08:00
docs Update startup.md 2021-04-17 15:03:18 +08:00
emulation more mods for the braille branch 2021-04-16 05:34:08 +08:00
imports an initial cut at fcc test commands 2021-04-15 04:10:47 +08:00
kernel fix some minor bugs in hosted mode 2021-04-09 17:31:36 +08:00
LICENSES creating LICENSES directory 2021-01-25 14:52:31 +01:00
loader loader: fix debug warnings 2021-04-12 17:15:52 +08:00
macros add PID identification facility to help with debugging 2021-02-15 19:15:58 +08:00
services add SSID scanning 2021-04-16 23:58:30 +08:00
svd2utra more mods for the braille branch 2021-04-16 05:34:08 +08:00
tools tools: specify v0.4 for log 2021-02-06 16:36:34 +08:00
utralib utralib: use canonicalized path for svd in rebuilding 2020-11-23 17:18:44 +08:00
xous-ipc xous-ipc: utilize published xous 0.8.0 2021-04-07 16:38:36 +08:00
xous-rs add keyboard input via UART 2021-04-16 04:11:25 +08:00
xtask fix RTC callbacks 2021-04-14 02:58:22 +08:00
.gitattributes gitattributes: add txt as lf 2021-03-10 17:36:41 +08:00
.gitignore ignore .map file outputs 2021-02-27 15:54:07 +08:00
.gitmodules com_rs: use git protocol in Cargo.toml 2020-11-27 09:47:32 +08:00
buildpush.sh add minimal image as a build option 2021-03-26 15:53:38 +08:00
Cargo.lock add vibe command 2021-04-16 19:27:48 +08:00
Cargo.toml callback test coding 2021-04-12 13:32:00 +08:00
CODE_OF_CONDUCT.md initial commit 2020-03-10 12:13:05 +08:00
CONTRIBUTING.md initial commit 2020-03-10 12:13:05 +08:00
README.md Update README.md 2021-01-22 16:57:51 +08:00
RELEASE-v0.8.md refine/update docs for unhooking callbacks 2021-04-14 03:20:40 +08:00
start-gdb.sh try to layer in the fcc agent 2020-12-31 19:31:12 +08:00
wb-gdb.sh add helper script for wishbone gdb 2021-01-13 23:18:30 +08:00

Xous Core

Core files for the Xous microkernel operating system.

You might find this collection of Xous documentation handy.

This repository contains everything necessary to build the Xous kernel from source. It consists of the following projects:

  • kernel: core memory manager, irq manager, and syscallhandler
  • loader: initial loader used to start the kernel
  • tools: programs used to construct a final boot image
  • docs: documentation on various aspects of Xous
  • emulation: Renode scripts used to emulate Xous
  • xous-rs: userspace library

Quickstart using Hosted Mode

You can try out Xous in a "hosted mode" wherein programs are compiled for your native platform and are run locally as processes within your current operating system. System calls are replaced with network calls to a kernel that simply shuffles messages around.

Xous uses the xtask convention, where various complex build commands are stored under cargo xtask. This allows for us to create arbitrarily complex build sequences without resorting to make (which is platform-dependent), sh (which requires a lot of external tooling), or another build system.

To build a set of sample programs and run them all using the kernel for communication, clone this repository and run:

cargo xtask run

This will build several servers and a "shell" program to control them all. Most notably, a graphics-server will appear and kernel messages will begin scrolling in your terminal.

Quickstart using an emulator

Xous uses Renode as the preferred emulator, because it is easy to extend the hardware peripherals without recompiling the entire emulator.

Download Renode and ensure it is in your path. Then, build Xous:

rustup target add riscv32imac-unknown-none-elf
cargo xtask renode-image

This will compile everything in release mode for RISC-V, compile the tools require to package it all up, then create an image file.

Finally, run Renode and specify the xous-release.resc REnode SCript:

renode emulation/xous-release.resc

Renode will start emulation automatically, and will run the same set of programs as in "Hosted mode".

Generating a hardware image

To build for real hardware, you must specify an .svd file. This file is generated by the SoC build process and describes a single Betrusted core. These addresses will change as hardware is modified, so if you distribute a modified Betrusted core, you should be sure to distribute the .svd file.

An example file may be found under svd2utra/, but this is probably out of date and won't work with your device.

Pass this .svd file to the hw-image xtask command:

cargo xtask hw-image svd2utra/examples/soc.svd

This will compile all runtime packages for riscv32imac-unknown-none-elf, and will generate a release image under the target/ directory, which will be printed on the output.

The image should be written to location 0x2050_0000 (SPI ROM offset 0x50_0000), using the provision-xous.sh script inside betrusted-scripts running on a Betrusted provisioning harness, that is a Raspberry Pi 4 with the appropriate debug hat attached, and the Precursor hardware plugged into the debug hat. You can also check out the dvt-hardware branch for the WIP integration of all the above commands.