An operating system (OS) is software that supports essential computer functions by managing software and hardware in a computer system. An embedded OS is typically tailored for a specific system and is usually as small as is necessary to do its job. You can find OSes in smartphones, routers, smart watches, game consoles, Alexa/Google Home, and many other devices. Zephyr™ is a microcontroller OS that has been developed primarily for the Internet of Things (IoT) and supports multiple architectures. Zephyr has roots in a Real-Time OS (RTOS) created by Wind River in 2015, called the “Rocket OS,” which was designed for resource-constrained systems. In 2016, WindRiver transferred Rocket OS into the Zephyr project managed by the Linux Foundation as open source.
Zephyr is also an open source project to create a free, independent OS that operates in a tiny memory footprint, running in as low as 8k. The Linux Foundation hosts Zephyr under a permissive Apache 2.0 license. [i] Some IoT needs an RTOS that can perform on a predictable schedule, with priority on getting the most important tasks completed on time. Smart devices are becoming more complicated and challenging to manage. Devices with multiple sensors, processes, and connectivity may need to perform specific tasks on time and be able to prioritize tasks to a time-sensitive goal.[ii]
Any operating system for an IoT device would need to consume as few resources as possible for cost- and power- constrained resources, but also capable of high-performance connectivity. The Zephyr RTOS is highly configurable and modular, with statically allocated memory and resources, and no “user space” or dynamic runtimes. Zephyr supports IoT across several architectures.
Zephyr prioritizes the system layer for IoT terminal devices such as sensors, wearables, and other small connected objects. At the same time, Zephyr is a secure system, offering memory protection support as of version 1.1 released in early 2018. The Zephyr kernel supports several architectures, including the Intel x86, ARM Cortex -M, NIOS II, ARC, and RISC-V. [iii] As of this writing, Zephyr is supported on 113 boards and two shields, with more on the way.[iv]
Zephyr support presently includes Bluetooth, Bluetooth LE 5.0, Ethernet, 802.15.4, Wi-Fi, IPv4/IPv6, 6LoWPAN, Thread, and NFC.[v] As with the Linux OS, developers can change Zephyr to suit their needs. The Zephyr community encourages successful changes to be contributed back to the project.
The Zephyr project community is made up of developers from the member organizations and the general community involved in software development as part of the Zephyr project. Today, Zephyr has a healthy and diverse community. From 2016 to 2018, Zephyr’s repositories had grown from five to fifteen, authors from 80 to 354, and commits from 2,806 to 23,324. Organizations involved include Intel, Nordic Semiconductor, Linaro, Synopsys, Google, NXP, Tencent, Acer, Sony, STMicroelectronics, and many others.
Design and technical details
Zephyr is a highly configurable and modular OS that implements memory protection (even for platforms without an MMU/MPU), uses Device Tree Support (DTS) only during compile time, provides fully featured networking support, offers non-volatile storage support, virtual file system interface with NTSS and FATFS support, an extensive suite of kernel services, and many other features. Zephyr includes support for the Thread protocol, as well.
Zephyr is a library-based OS; the application code and the kernel are united in the same binary compilation. According to Geoffrey Le Gourrierec, who writes the Linux Embedded blog, Zephyr has only one address space, and “there is no notion of privilege level.”[vi] He goes on to state that one selects features before compilation so that only the bare necessities are used, with no loss of performance due to contextual changes, and a decrease in the size of the memory footprint. However, on a remote device that needs to be updated, you cannot change a single module, but have to flash a whole new binary image to the device.
Zephyr has high ambitions, and the list of boards that support it is getting longer. Host machines include both Linux and Windows machines. Zephyr has excellent documentation and a complete System Development Kit (SDK). Zephyr’s future includes support for LoRa, CanBus, enhanced sensor support, MIPS support, and ecosystem tools that include tracing, profiling, 3rd party debugging support, and much more. It’s worth taking a look at Zephyr. To learn how to contribute, visit https://www.zephyrproject.org/community/how-to-contribute
[i] https://docs.zephyrproject.org/latest/introduction/introducing_zephyr.html
[iv] https://docs.zephyrproject.org/latest/boards/boards.html
[v] https://www.zephyrproject.org/what-is-zephyr/
[vi] http://www.linuxembedded.fr/2017/04/decouverte-de-los-zephyr/
Leave a Reply