Zephyr Introduction
Zephyr RTOS is a real-time operating system (RTOS) purpose-built for secure, low-power, connected embedded devices, providing a secure, reliable, and scalable software platform for a wide range of applications such as the Internet of Things (IoT), wearables, industrial control, smart home, and medical devices. Zephyr offers excellent scalability, with configurations ranging from a compact kernel for extremely resource-constrained devices to a full-featured system that seamlessly scales up to support high-performance, complex applications.
The Zephyr project is hosted by the Linux Foundation and is an open source project licensed under Apache 2.0. It follows a vendor-neutral governance model and is jointly maintained by the Zephyr project community, which fosters broad industry collaboration and rapid technical innovation.
In addition to a modern real-time kernel, Zephyr also provides a feature-rich ecosystem, including:
Middleware and networking protocol stacks
Cryptography and security features
File system support
Secure Bootloader
Shell interactive command line
Tracing and logging capabilities
Native support for 200+ sensor drivers, with the supported list continuously expanding
Key Advantages
A rich ecosystem beyond the kernel: provides a complete software stack that simplifies development.
Outstanding scalability: supports everything from the smallest microcontrollers to the most advanced devices in the Realtek Ameba product family.
Vendor-neutral governance model: an open, collaborative environment that drives cross-industry innovation.
A strong open source community foundation: promotes software reuse, accelerates product development cycles, and enables rapid issue discovery and resolution.
A focus on security, maintainability, and modern development tooling: meets the high standards required by modern embedded system development.
Realtek actively participates in the Zephyr open source ecosystem, contributing to and supporting the community. Realtek is committed to continuously enhancing and optimizing Zephyr RTOS, ensuring deep integration and seamless operation on Realtek hardware platforms, thereby providing broad technical support for a diverse range of IoT devices.
Zephyr Architecture
Zephyr employs a specially developed Hardware Abstraction Layer (HAL) to support devices from multiple hardware vendors. Developers using Zephyr can directly utilize standard Zephyr APIs to develop applications without needing to delve into the intricacies of the underlying hardware.
The overall architecture of Zephyr OS is shown below:
Overall Framework of Zephyr OS
Kernel / Hardware Abstraction Layer (HAL)
Kernel services: provide thread management, synchronization primitives, data passing, interrupt handling, time management, memory management, and more.
Task scheduling: uses a priority-based preemptive scheduling algorithm with support for cooperative scheduling.
Power management: implements system-level power-saving policies with support for multiple low-power modes.
Platform-specific drivers: including watchdog timers, sensors, cryptographic hardware, flash storage, and more.
Ameba HAL: On the Realtek Ameba platform, this layer is implemented by the HAL provided by Realtek, which simplifies the underlying hardware details and lets developers work directly against the Zephyr API.
OS Services
Unified device driver model: defines standardized APIs and frameworks for developing and integrating drivers for various hardware devices.
File system, logging, shell, and inter-process communication (IPC): provides file operations, logging, an interactive command-line shell, and inter-thread communication mechanisms.
Network link layer (L2) support: provides drivers and abstractions for various link-layer technologies (such as Ethernet, IEEE 802.15.4, and BLE), decoupling from the physical layer.
Core network protocol stack: implements network and transport layer protocols such as IPv4/IPv6 and 6LoWPAN, and provides a unified BSD Sockets API.
Application Services
High-level network protocols: supports application-layer protocols such as HTTP, CoAP, MQTT, TLS, and DTLS, facilitating the creation of connected applications.
Protocol and data format support: integrates support for key IoT communication and security protocols, simplifying application development.