Backed by the Linux Foundation, Zephyr Project is yet another RTOS for the IoT age (like ARM’s mBed OS,  Amazon’s FreeRTOS and many more). Oddly enough, it doesn’t contain any Linux kernel code. It’s actually derived from the VxWorks kernel by WindRiver (now owned by Intel). VxWorks is a well known and established brand in the RTOS space. It’s highly common in the aerospace and automotive industries thanks to its superb real-time capabilities, reliability and support by WindRiver.

Zephyr Project is a fair attempt by Intel to make a play in the open source RTOS game. We’ll provide a comparison of these RTOSes in the near future. First, we’ll focus on Zephyr Project, here’s a quick pros and cons list for you to evaluate.

Pros

  • It supports for many ARM MCUs such as the nRF52 and STM32 families.
  • We love its Apache 2.0 permissive license (we use it too).
  • Connectivity-wise, it provides a solid communication infrastructure with open source IP, Thread and BLE ports. We found the BLE one very useful and we actually use it for our Jumper Virtual Lab BLE simulation.
  • Its kernel is the WindRiver VxWorks kernel with all the great threading, memory management and security.
  • The toolchain is cross-platform and can be easily automated. This is critical in creating a continuous integration process for your project.

Cons

  • Setup experience can be better. The documentation missed a couple of dependencies on Linux. Nowadays we’d expect just a docker repo for build environments. So we created one 🙂 here’s the link to a Dockerfile that has the latest instructions from Zephyr Project’s website into it. We used it to compile the samples.
  • Not enough samples.
  • Documentation is often obscure.
  • Zephyr’s QEMU simulation is great, but it lacks I2C, SPI, GPIO and Ethernet.
  • Intel’s focus on IoT is being questioned nowadays with the closing of many IoT related projects. WindRiver is managed separately, but one still wonders how long they’ll keep investing in this project, especially given the tough competition from ARM and Amazon.

Want to take it for a spin?

If you’re looking to play around with Zephyr Project, we’re happy to offer our Jumper Virtual Lab as a fast and easy way to experiment without the friction of running it on hardware and installing too many things.

First, head to https://vlab.jumper.io, create a free account and follow the installation instructions. It works on Windows, Ubuntu and Docker.

Zephyr Project Samples

If you feel like building the samples yourself, you’re welcomed to use a Dockerfile and repo I created based on the documentation from Zephyr Project. Just follow the following instructions to build the nRF52 onoff-app example:

git clone https://github.com/Jumperr-labs/zephyr.git
cd zephyr
docker pull jumperio/zephyr
docker run -v $PWD/:/zephyr -i -t jumperio/zephyr /bin/bash
pip3 install --user -r /zephyr/scripts/requirements.txt
source zephyr/zephyr-env.sh
cd /zephyr/samples/boards/nrf52/mesh/onoff-app/ && mkdir build && cd build
cmake -DBOARD=nrf52_pca10040 ../
make

If you don’t have an urge to build a sample, we built one for you. You can download it here.

Once you either build or download the firmware, it’ll be inside the onoff-app/build/zephyr folder. We can use the zephyr.bin or zephyr.hex files.

From the onoff-app folder, type the following command:

jumper –token “YOUR_VIRTUAL_LAB_TOKEN” run –fw build/zephyr/zephyr.bin –uart

The output will look like this and it’ll contain all the UART log prints from the firmware. Isn’t that cool? Go ahead and try any of the nRF52 and STM32F samples. Let us know what you think!