Ocre is a container runtime for constrained devices. It leverages WebAssembly and Zephyr to support OCI-type application containers in a footprint up to 2,000 times smaller than traditional Linux-based container runtimes. Our mission is to modernize the embedded applications by making it as easy to develop and securely deploy apps on constrained edge devices as it is in the cloud.
There is a sample application in ./src/main.c that will demonstrate how to use the Ocre runtime. The sample writes a simple hello world application to flash and directs the Ocre runtime to load and execute it.
- Install Dependencies and Zephyr SDK
Complete the Install dependencies and the Install the Zephyr SDK sections from the Zephyr Getting Started Guide. There are several steps that must be performed if this is the first time you’ve developed for Zephyr on your machine. In general, builds should be done on a Linux machine or on Windows using WSL2.
Note: For the following steps we recommend using a Python virutual environment like venv.
- Install WEST
Install the west CLI tool, which is needed to build, run and manage Zephyr applications.
$ pip install west
- Initialize the workspace
This will checkout the project code and configure the Zephyr workspace.
$ cd
$ mkdir runtime
$ cd runtime
$ west init -m [email protected]:project-ocre/ocre-runtime.git
$ west update
- Install Additional Zephyr (pip) requirements
In order to build the Ocre runtime properly, you'll need to install a few remaining requirements for Zephyr.
pip install -r zephyr/scripts/requirements.txt
Note: This step is only possible after updating the repo with west update.
- Build the application
The following will build the firmware for the virtual, native_sim target which will allow you to run the Ocre runtime on a simulated device, rather than a physical board.
$ west build -b native_sim ./application -d build -- -DMODULE_EXT_ROOT=`pwd`/application
- Run the application
Run the following command:
$ ./build/zephyr/zephyr.exe
To build and flash for a physical device, follow these steps:
-
Connect your board to your computer.
-
Build the application for your specific board. Replace
BOARD_NAMEwith your board's name:$ west build -b BOARD_NAME ./application -d build -- -DMODULE_EXT_ROOT=`pwd`/application -
Flash the application to your device:
$ west flash -
After flashing, restart/reset your board to run the application.
For the latest updates on the project's progress and upcoming features, please refer to the Project Ocre Roadmap page on our Wiki.
For more detailed information about Ocre, please check out the docs at https://docs.project-ocre.org.
