4️⃣Zephyr RTOS
https://www.zephyrproject.org/
Introduction
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:
ARCv2 (EM and HS) and ARCv3 (HS6X)
ARMv6-M, ARMv7-M, and ARMv8-M (Cortex-M)
ARMv7-A and ARMv8-A (Cortex-A, 32- and 64-bit)
ARMv7-R, ARMv8-R (Cortex-R, 32- and 64-bit)
Intel x86 (32- and 64-bit)
MIPS (MIPS32 Release 1 specification)
NIOS II Gen 2
RISC-V (32- and 64-bit)
SPARC V8
Tensilica Xtensa
The full list of supported boards based on these architectures 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.
Setting up on Ubuntu version 20.04 LTS and later.
Install dependencies
Tool | Min. Version |
3.20.5 | |
3.8 | |
1.4.6 |
Verify the versions of the main dependencies installed on your system by entering
Get Zephyr and install Python dependencies
Next, clone Zephyr and its modules into a new west workspace named zephyrproject
. You’ll also install Zephyr’s additional Python dependencies.
Install west:
Get the Zephyr source code:
Export a Zephyr CMake package. This allows CMake to automatically load boilerplate code required for building Zephyr applications.
Zephyr’s scripts/requirements.txt
file declares additional Python dependencies. Install them with pip
Install the Zephyr SDK
The Zephyr Software Development Kit (SDK) contains toolchains for each of Zephyr’s supported architectures, which include a compiler, assembler, linker and other programs required to build Zephyr applications.
It also contains additional host tools, such as custom QEMU and OpenOCD builds that are used to emulate, flash and debug Zephyr applications. You can change 0.16.4
to another version in the instructions below if needed; the Zephyr SDK Releases page contains all available SDK releases.
Download and verify the Zephyr SDK bundle
If your host architecture is 64-bit ARM (for example, Raspberry Pi), replace x86_64
with aarch64
in order to download the 64-bit ARM Linux SDK.
Extract the Zephyr SDK bundle archive:
It is recommended to extract the Zephyr SDK bundle at one of the following locations:
$HOME
$HOME/.local
$HOME/.local/opt
$HOME/bin
/opt
/usr/local
The Zephyr SDK bundle archive contains the zephyr-sdk-0.16.4
directory and, when extracted under $HOME
, the resulting installation path will be $HOME/zephyr-sdk-0.16.4
.
Run the Zephyr SDK bundle setup script:
You only need to run the setup script once after extracting the Zephyr SDK bundle. You must rerun the setup script if you relocate the Zephyr SDK bundle directory after the initial setup.
Install udev rules, which allow you to flash most Zephyr boards as a regular user:
Last updated