These are just my notes on installing and using CHERIoT RTOS on the Sonata development board and building the code under Windows.
I'm not going to answer all these questions - instead I'll just link to places that explain it all.
- What is CHERI?
- What is CHERI in more detail?
- What is the CHERIoT Platform?
- What is CHERIoT RTOS?
- Why did they write a new RTOS for CHERIoT?
- What is the Sonata Development Platform?
- Where can a get a Sonata board?
These are the basic notes, if you want more details have a look at my setup page. I also have a video you YouTube.
- Make sure that you have installed:
- Update the Sonata and Run Some Firmware
- In the examples below they will suggest cloning the CHERIoT RTOS but you will likely write something that can be used as an example and you may want to commit back so I would suggest forking the repo and working from that. My fork is where I'm workong on finishing the CAN driver conversion that I started as an open source project in a previous job (& I now work on just for fun).
- Update the Sonata Firmware and bit file We ran with V1.1, which works with the version of CHERIoT RTOS that we are currently using.
- From zero to CHERIoT in two minutes with Sonata This is a little out of date now as it was using V0.2 of the bitfile but it hasn't changed that much so it's not a bad example. The part about automatically upload the compiler code to the Sonata doesn't seem to work under Windows (there have been several attempts to get it working but, honestly, it's easy to just copy th files accross).
- Connecting to the serial port
I keep forgetting the exact commands required, so here they are:
$ xmake config --sdk=/cheriot-tools --board=sonata
$ xmake
$ xmake runYou only need to run the first line once per project or if you've changed the project config. The --board can be changed to target a specific build of the hardware. The processor is an FPGA so the hardware can change, these files are released as the bitfiles that we loaded at the beginning. If you look in the code you find the available boards list and you will notice that sonata.json is actually a link to a json file with a specific version number specified. You can change the target board to try out code for new version of the bitfile that are not yet the default. For example, this specifically targets V1.1.
$ xmake config --sdk=/cheriot-tools --board=sonata-1.1- Make sure that Docker for Desktop is running
- Open WSL
- I created a "github" folder to put everything into
- Checkout the cheriot-rtos repo.
- Build the examples
- Copy the files across to the Sonata Board
- Watch the magic work
There's 3 places that I've found:
- The CHERIoT Public Chat group on Signal
- CHERIoT Platofrm Discussions on Github
- There is a Slack channel for CHERI in general but I don't use it as most of the CHERIoT specific conversations take place on Signal.
Not yet. See this example. A solution is currrently under development.