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 :)

  • It is very interesting indeed, especially the RTOSes that have appeared recently. I cannot comment on plans we have at Nordic, but obviously we would be fools to ignore what is happening in the RTOS space. And if there is interest in the market it is even harder to ignore ;)

  • Thanks for your answer. The nRF52 has a lot of flash/ram, so in my case the size of the SoftDevice is not really an issue - lower power consumption is more important.

    You post is interesting because they are quite a lot of (RT)OSes and IoT OSes out there. I would be interesting in reading a detailed comparison with for instance power consumption measurement for real applications.

    You (Nordic) have you planned to officially support these OS in a near future ? Are you evaluating some of them ?

  • Yes, they both have open source BLE stacks. I don't have a full overview of the feature set, but the implementation seems quite feature rich.

    If you care about power consumption and throughput I think the SoftDevice is the better solution at the moment, since it is heavily power optimized and the throughput is measured. I haven't seen numbers for the open source stacks. The main advantage with the open source stack is flexibility to add features, or remove features that are not needed in the product.

  • Zephyr and mynewt they both use Bluetooth from source, this means they use an open-source implementation of the BLE stack and a custom driver to use the nRF radio ?

    What are the available BLE features for theses OSes ? What about the consumption and the BLE throughout ?