Skip to content

DjangoClouds/cheriot_rtos_notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

CHERIoT RTOS Notes

These are just my notes on installing and using CHERIoT RTOS on the Sonata development board and building the code under Windows.

General Notes

I'm not going to answer all these questions - instead I'll just link to places that explain it all.

Setting Up The Building Platform on Windows 11

These are the basic notes, if you want more details have a look at my setup page. I also have a video you YouTube.

Before You Start

  • 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

Building the Code

I keep forgetting the exact commands required, so here they are:

$ xmake config --sdk=/cheriot-tools --board=sonata
$ xmake
$ xmake run

You 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

Checkout the Git Repo

  • 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

FAQs

Are There Other Example Repos?

Yes, look here.

Where Can I Ask Questions?

There's 3 places that I've found:

  1. The CHERIoT Public Chat group on Signal
  2. CHERIoT Platofrm Discussions on Github
  3. 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.

Are the hardware peripherals protected against from other threads?

Not yet. See this example. A solution is currrently under development.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published