1 What is Zephyr?

Zephyr is a Real-Time Operating System (RTOS). RTOSs are special lightweight operating systems designed specifically for embedded systems. Zephyr is a project of the Linux® Foundation that aims to create a vendor-agnostic RTOS for embedded systems and is licensed under Apache 2.0.

One of the biggest differences between Zephyr and other RTOSs is its configuration. Zephyr uses two systems to configure the RTOS: KConfig and Devicetree.
  • KConfig is the software-side configuration utility, akin to using #defines in C or C++, but with a GUI interface
  • Devicetree, on the other hand, uses nested YAML files that describe a system in terms of configuration values, pin mappings, and driver versions. Devicetree devices, such as an ADC or UART, are accessed using compile-time macros.

In both cases, KConfig and Devicetree configurations are flattened into a single file before compilation begins, which can aid in troubleshooting errors within these systems.

Tip: The auto-generated software define file is located at the following path by default: <build directory directory> \zephyr\include\generated\zephyr\autoconf.h.