Introducing Zephyr

The Zephyr OS is based on a small-footprint kernel designed for use on resource-constrained and embedded systems: from simple embedded environmental sensors and LED wearables to sophisticated embedded controllers, smart watches, and IoT wireless applications.

The Zephyr kernel supports multiple architectures, including ARM Cortex-M, Intel x86, ARC, NIOS II, Tensilica Xtensa and RISC-V 32. The full list of supported boards can be found here.

Licensing

Zephyr is permissively licensed using the Apache 2.0 license (as found in the LICENSE file in the project’s GitHub repo). There are some imported or reused components of the Zephyr project that use other licensing, as described in Licensing of Zephyr Project components.

Distinguishing Features

Zephyr offers a large and ever growing number of features including:

Extensive suite of Kernel services

Zephyr offers a number of familiar services for development:

  • Multi-threading Services for cooperative, priority-based, non-preemptive, and preemptive threads with optional round robin time-slicing. Includes POSIX pthreads compatible API support.
  • Interrupt Services for compile-time registration of interrupt handlers.
  • Memory Allocation Services for dynamic allocation and freeing of fixed-size or variable-size memory blocks.
  • Inter-thread Synchronization Services for binary semaphores, counting semaphores, and mutex semaphores.
  • Inter-thread Data Passing Services for basic message queues, enhanced message queues, and byte streams.
  • Power Management Services such as tickless idle and an advanced idling infrastructure.
Multiple Scheduling Algorithms

Zephyr provides a comprehensive set of thread scheduling choices:

  • Cooperative and Preemptive Scheduling
  • Earliest Deadline First (EDF)
  • Meta IRQ scheduling implementing “interrupt bottom half” or “tasklet” behavior
  • Timeslicing: Enables time slicing between preemptible threads of equal priority
  • Multiple queuing strategies:
    • Simple linked-list ready queue
    • Red/black tree ready queue
    • Traditional multi-queue ready queue
Highly configurable / Modular for flexibility
Allows an application to incorporate only the capabilities it needs as it needs them, and to specify their quantity and size.
Cross Architecture
Supports a wide variety of supported boards with different CPU architectures and developer tools. Contributions have added support for an increasing number of SoCs, platforms, and drivers.
Memory Protection

Implements configurable architecture-specific stack-overflow protection, kernel object and device driver permission tracking, and thread isolation with thread-level memory protection on x86, ARC, and ARM architectures, userspace, and memory domains.

For platforms without MMU/MPU and memory constrained devices, supports combining application-specific code with a custom kernel to create a monolithic image that gets loaded and executed on a system’s hardware. Both the application code and kernel code execute in a single shared address space.

Compile-time resource definition
Allows system resources to be defined at compile-time, which reduces code size and increases performance for resource-limited systems.
Optimized Device Driver Model
Provides a consistent device model for configuring the drivers that are part of the platform/system and a consistent model for initializing all the drivers configured into the system and Allows the reuse of drivers across platforms that have common devices/IP blocks
Device Tree Support
Use of Device Tree (DTS) to describe hardware and configuration information for boards. The DTS information will be used only during compile time. Information about the system is extracted from the compiled DTS and used to create the application image.
Native Networking Stack supporting multiple protocols
Networking support is fully featured and optimized, including LwM2M and BSD sockets compatible support. OpenThread support (on Nordic chipsets) is also provided - a mesh network designed to securely and reliably connect hundreds of products around the home.
Bluetooth Low Energy 5.0 support

Bluetooth 5.0 compliant (ESR10) and Bluetooth Low Energy Controller support (LE Link Layer). Includes BLE Mesh and a Bluetooth qualification-ready BLE controller.

  • Generic Access Profile (GAP) with all possible LE roles.
  • GATT (Generic Attribute Profile)
  • Pairing support, including the Secure Connections feature from Bluetooth 4.2
  • Clean HCI driver abstraction
  • Raw HCI interface to run Zephyr as a Controller instead of a full Host stack
  • Verified with multiple popular controllers
  • Highly configurable

Mesh Support:

  • Relay, Friend Node, Low-Power Node (LPN) and GATT Proxy features
  • Both Provisioning bearers supported (PB-ADV & PB-GATT)
  • Highly configurable, fitting in devices with at least 16k RAM
Native Linux, macOS, and Windows Development
A command-line CMake build environment runs on popular developer OS systems. A native POSIX port, lets you build and run Zephyr as a native application on Linux and other OSes, aiding development and testing.
Virtual File System Interface with NFFS and FATFS Support
Newtron Flash Filesystem (NFFS) and FATFS Support, FCB (Flash Circular Buffer) for memory constrained applications, and file system enhancements for logging and configuration.
Powerful multi-backend logging Framework
Support for log filtering, object dumping, panic mode, multiple backends (memory, networking, filesystem, console, ..) and integration with the shell subsystem.
User friendly and full-featured Shell interface
A multi-instance shell subsystem with user-friendly features such as autocompletion, wildcards, coloring, metakeys (arrows, backspace, ctrl+u, etc.) and history. Support for static commands and dynamic sub-commands.
Settings on non-volatile storage
The settings subsystem gives modules a way to store persistent per-device configuration and runtime state. Settings items are stored as key-value pair strings.
Non-volatile storage (NVS)
NVS allows storage of binary blobs, strings, integers, longs, and any combination of these.
Native POSIX port
Supports running Zephyr as a Linux application with support for various subsystems and networking.

Getting Started

To start developing Zephyr applications refer to the Getting Started Guide in the Zephyr Documentation pages. A brief introduction to Zephyr can be found in the Zephyr Introduction page.

Community Support

The Zephyr Project Developer Community includes developers from member organizations and the general community all joining in the development of software within the Zephyr Project. Members contribute and discuss ideas, submit bugs and bug fixes, and provide training. They also help those in need through the community’s forums such as mailing lists and IRC channels. Anyone can join the developer community and the community is always willing to help its members and the User Community to get the most out of the Zephyr Project.

Welcome to the Zephyr community!

Resources

Here’s a quick summary of resources to find your way around the Zephyr Project support systems:

  • Zephyr Project Website: The https://zephyrproject.org website is the central source of information about the Zephyr Project. On this site, you’ll find background and current information about the project as well as all the relevant links to project material.

  • Releases: Source code for Zephyr kernel releases are available at https://zephyrproject.org/developers/#downloads. On this page, you’ll find release information, and links to download or clone source code from our GitHub repository. You’ll also find links for the Zephyr SDK, a moderated collection of tools and libraries used to develop your applications.

  • Source Code in GitHub: Zephyr Project source code is maintained on a public GitHub repository at https://github.com/zephyrproject-rtos/zephyr. You’ll find information about getting access to the repository and how to contribute to the project in this Contribution Guide document.

  • Samples Code: In addition to the kernel source code, there are also many documented Sample and Demo Code Examples that can help show you how to use Zephyr services and subsystems.

  • Documentation: Extensive Project technical documentation is developed along with the Zephyr kernel itself, and can be found at http://docs.zephyrproject.org. Additional documentation is maintained in the Zephyr GitHub wiki.

  • Cross-reference: Source code cross-reference for the Zephyr kernel and samples code is available at https://elixir.bootlin.com/zephyr/latest/source.

  • Issue Reporting and Tracking: Requirements and Issue tracking is done in the Github issues system: https://github.com/zephyrproject-rtos/zephyr/issues. You can browse through the reported issues and submit issues of your own.

  • Security-related Issue Reporting and Tracking: For security-related inquiries or reporting suspected security-related bugs in the Zephyr OS, please send email to vulnerabilities@zephyrproject.org. We will assess and fix flaws according to our security policy outlined in the Zephyr Project Security Overview.

    Security related issue tracking is done in JIRA. The location of this JIRA is https://zephyrprojectsec.atlassian.net.

  • Mailing List: The Zephyr Development mailing list is perhaps the most convenient way to track developer discussions and to ask your own support questions to the Zephyr project community. There are also specific Zephyr mailing list subgroups for announcements, builds, marketing, and Technical Steering Committee notes, for example. You can read through the message archives to follow past posts and discussions, a good thing to do to discover more about the Zephyr project.

  • Chatting: You can chat online with the Zephyr project developer community and other users in two ways:

    • On Slack: Zephyr has dedicated channels on Slack. To register, use the following Slack Invite.
    • IRC channel #zephyrproject on the freenode.net IRC server. You can use the http://webchat.freenode.net web client or use a client-side application such as pidgin (Note that all discussions have moved to Slack, although we still have many developers still available on the IRC channel).

Fundamental Terms and Concepts

See Glossary of Terms