nRF5 Series - a popular platform for open source RTOS

Note: Many things have changed since I wrote this article, in particular for Zephyr and Arm Mbed. The information is outdated and the article is mainly of historical interest.

Regarding the choice Nordic Semiconductor has made one as you might know: The Zephyr Project. There was key thing about this choice that is not mentioned, which is the governance model: Open, backed by companies in the industry, and not dominated by a single company.

There is seemingly a gap to fill in the world of Internet of Things (IoT) when it comes to proving a suitable operation system. Real-time operating systems (RTOS) that are specialized for network connectivity has existed for a while, but they all provide quite different benefits and drawbacks, and as such there is no on OS that rules the MCU market. In all this new OSes continue to appear.

What these OSes have in common is that they target resource constrained devices, focusing on low memory usage and low power to allow long battery life. The OSes are designed for connectivity and Internet protocols comes bundled with the OS. Another thing with these OSes is that they provide ready made ports for microcontrollers and development kits.

And on that last point we have good news for Nordic developers. The major IoT OSes all support Nordic chips: ARM mbed, Contiki OS, mynewt, RIOT OS, and Zephyr Project.

With increasing application complexity the use of an OS becomes more and more interesting, to manage that complexity. With the introduction of nRF52, featuring an ARM Cortex-M4F, it is suddenly much more interesting to use an RTOS for application development. And now there is a lot to choose from.

How to get started with an IoT OS

At the moment the mentioned OSes are not available from Nordic's website; you will need to visit the OS's website and follow the instructions:

All the OSes are available as source code and hosted in a Git repository. For some of the OSes you actually start by cloning the repository and run scripts.

There is also a couple of getting started guides on Devzone, both focusing on enabling IPv6 over BLE:

What OS should you chose?

With choices comes the problem of choosing. This can be a complex issue, and at the moment Nordic is not promoting any particular RTOS. Below is a table of some simple parameters that are easy to compare when choosing:

OS License Pre-emptive Bluetooth IPv6 Nordic platform
Arm Mbed OS Apache 2.0 Yes SoftDevice Yes nRF51 and nRF52
Contiki OS 3-clause BSD No SoftDevice Yes nRF52
mynewt Apache 2.0 Yes Source No nRF51 and nRF52
RIOT OS LGPL Yes SoftDevice Yes nRF51 and nRF52
Zephyr Project Apache 2.0 Yes Source Yes nRF51 and nRF52

In addition there is also the question about maturity and community support. Since this is an emerging field this will not be static, and you will also have the chance to influence on this part.

If you prefer a more mature RTOS there is support for FreeRTOS and RTX in the nRF5 SDK. These are not IoT OSes, but it is fully possible to combine them with Internet protocols and build an IoT product with them.

Only community support at the moment

We are happy and proud to see so many of these IoT generation OSes supporting Nordic chips. There are various reasons for this: Personal initiative from Nordic employees, requests to help, and in one case the popularity of nRF5. For the moment these ports are not officially supported by Nordic as our SDKs. However, there is hopefully many developers willing to help on Devzone, and in the RTOSes' respective communities.

For the moment we want to communicate that there are several choices available, all with Nordic support, that will hopefully be helpful for your IoT project. We would love to hear your feedback on this. Please comment :)