English
Mới nhấtAI & Dữ liệuIn 3D & CNCNhúng & IoTPhần mềmVề VHITEK MakerLiên hệQuy tắc bình luận

Zephyr RTOS: More Than a Kernel

Bởi Lê Văn Quý|
Zephyr RTOS: More Than a Kernel
Cover: Zephyr RTOS, more than a kernel, with the Zephyr logo.

Zephyr RTOS, part 1. What Zephyr is, where it came from, what comes in the box, and when it is worth the learning curve.

This is the first part of a series on Zephyr RTOS. Before any code, it answers the question I had when I began: what exactly is Zephyr, and why is it so often called more than an RTOS?

What is Zephyr?

Zephyr is a free, open-source real-time operating system (RTOS) for small, resource-constrained devices: sensors, wearables, controllers and gateways. It is hosted by the Linux Foundation and released under the Apache-2.0 license, which allows commercial use.

At its heart is a small kernel that runs threads, timers and interrupts, like any RTOS. The difference is how much else comes in the box:

  • Drivers for GPIO, UART, I2C, SPI, displays, sensors and more, with the same API on every chip.

  • Connectivity: an IPv4/IPv6 stack with MQTT, CoAP and HTTP, plus Bluetooth Low Energy.

  • Everyday services: logging, an interactive shell, file systems, settings storage and firmware updates.

  • Tools to build, flash and test your firmware.

The hardware is described in configuration files instead of being hard-coded, so the same application can move to another board with little or no change. Part 2 looks at how all of this is put together.

Where it came from

  • April 2015: the first commit in Zephyr's Git history. The code comes from Wind River's small RTOS kernel.

  • November 2015: Wind River open-sources that RTOS under the name Rocket.

  • 17 February 2016: the Linux Foundation announces the Zephyr Project, with Intel (including Wind River), NXP, Synopsys and UbiquiOS as early backers.

  • Since then: regular releases, plus Long Term Support (LTS) releases such as 1.14, 2.7 and 3.7.

  • 2026: Zephyr turns ten as a Linux Foundation project.

A new release comes out roughly every six months. LTS releases are maintained for at least five years and are the recommended base for products.

Zephyr by the numbers

I counted these in the Zephyr source tree at a recent commit of the main branch (f4656a39, 21 September 2026), so they are a snapshot, not marketing figures:

What

Count

Boards (board.yml files)

1,122

CPU architecture ports

12, plus a POSIX port that runs Zephyr as a Linux program

Driver classes (folders under drivers/)

101

Sample applications

666

Commits

153,020

Distinct author e-mail addresses

4,636

The architectures include Arm (Cortex-M, Cortex-A and Cortex-R), RISC-V, x86, Tensilica Xtensa, ARC and several more.

Zephyr, FreeRTOS or bare metal?

Bare metal with a vendor SDK

FreeRTOS

Zephyr

What you get

Your code and the vendor's libraries

A scheduler and kernel objects, plus optional libraries

Kernel, drivers, connectivity, services and tools

Moving to another chip

Mostly a rewrite

The kernel moves; drivers come from the new vendor

Same driver APIs on every supported board

License

Varies

MIT

Apache-2.0

Learning curve

Gentle at first

Gentle

Steep: new tools and configuration files to learn

None of these is the "right" answer. A small single-purpose firmware on one chip family is often simplest on bare metal or FreeRTOS. Zephyr pays off when a product needs networking or Bluetooth, has to run on more than one board, or must be maintained for years.

Consider Zephyr when you want the same driver APIs across vendors, need a mature networking or Bluetooth stack, expect to switch or add chips, or want a long-term-supported base.

Think twice when your chip is not supported and you cannot spend time on a port, your team is already productive with a vendor SDK, or the firmware is so small that Zephyr's setup costs more than it gives back.

Size grows with what you turn on. Zephyr compiles only the parts you enable, so a minimal application stays small, and every subsystem you add costs flash and RAM.

What's next in this series

The first three parts cover Zephyr itself:

  • Part 2: Zephyr RTOS architecture: the layers, devicetree, Kconfig, and what happens during a build.

  • Part 3: Installing Zephyr RTOS on Windows: the host tools, west, the Zephyr SDK, and a first build.

From part 4 on, the series moves to real hardware, an ESP32-P4 board that Zephyr does not officially support yet:

  • Part 4: Bringing up the board: a board port with devicetree, and a first boot.

  • Part 5: Threads, timers and work queues.

  • Part 6: GPIO interrupts and debouncing a button.

  • Part 7: Testing on real hardware with Twister, ztest and pytest.

  • Later: the display, touch and Wi-Fi.

Resources

Found a mistake or something unclear? Let me know in the comments below, and I will correct the post.

Bình luận

Chưa có bình luận nào. Nếu bài này sai ở đâu, nói giúp.

Bình luận được duyệt trước khi hiện. Chúng tôi lưu địa chỉ IP và trình duyệt của bạn trong 90 ngày để chống spam, và không lưu email ở dạng đọc được. Chi tiết ở quy tắc bình luận.