
Discover why Zephyr accelerates production embedded systems with a device driver model, device tree, ready subsystems, and the West build system across many vendors.
Set up Zephyr RTOS development environment on Windows by installing prerequisites (CMake, Ninja, Python, device tree compiler) via winget, clone Zephyr ecosystem, and run hello world on the emulator.
Set up the Zephyr development environment on Ubuntu by installing CMake, Ninja, Python, and the Device Tree Compiler. Clone Zephyr ecosystem, install the SDK, and run a hello world emulator.
Set up the Zephyr RTOS development environment on macOS by installing Homebrew and the core dependencies, including CMake, Python, and the Device Tree Compiler, then verify Ninja and path configuration.
Create a Zephyr workspace and a Python virtual environment to isolate build tools, then activate and deactivate the venv with macOS and Ubuntu steps.
Install West with pip, the Python-based official meta tool for Zephyr, to manage projects and build workflows with commands like init, update, build, flash, run, and debug.
Clone Zephyr using West by initializing a project folder and fetching the Zephyr RTOS, then run west update to install modules listed in WEST.yaml, including hardware abstraction layers and libraries.
Install Zephyr Python requirements via pip. WestUpdate pulls modules from west.yaml, registers Zephyr as a CMake package for IDEs, and west packages installs Python packages from each module’s requirements.txt.
Install the Zephyr SDK toolchains for ARM and host x86_64 with West SDK install, then build and run a hello world on QEMU to verify the setup.
Build and test the Zephyr RTOS hello world application on QEMU using west build, board selection, and device tree concepts, including dts merging, .config, and running the elf in QEMU.
Learn how to run the Zephyr blinky application on real hardware, verify board support via the device tree led 0 alias, then build and flash with west on stm32f746g discovery.
Begin developing applications in Zephyr by setting up a minimal project, mastering the west workflow, and exploring device trees, overlays, kconfig, kernel services, and Zephyr subsystems like gpio and uart.
Create a Zephyr application using a reference workspace template or by building the structure manually. Clone the template into the Zephyr workspace and explore the main.c in src.
Understand how the top-level cmake file triggers west build for a zephyr app. Learn how the app target is created and linked with zephyr rtos kernel to produce zephyr.elf.
Understand how a zephyr application's version file uses major, minor, patch, and extra version fields to signal backward-compatible features, breaking changes, and build tags like dev or beta.
Explore prj.conf to override kconfig options for your Zephyr application and use menuconfig to interactively enable or disable items; learn how .config reflects changes and builds depend on gpio settings.
Define application specific kconfig options as an optional app entry point, then integrate device tree overlays and main.c in src with the Zephyr build and Twister testing.
Build a minimal Zephyr LED blinky on a custom board from scratch, covering device tree creation, board bring up, GPIO setup, and flashing to verify on hardware.
Create your first Zephyr application from a template, write a main program to blink an LED, and set up device tree files for a custom board before building.
Describe how device tree describes hardware in a hardware-agnostic way and enables firmware to run across boards by swapping device tree sources; learn structure, basics, and board integration in Zephyr.
Explore the three key device tree file types: dts, dtsi, and overlays, and learn how they define a board, SoC, peripherals, and patches.
Write a board-level device tree from scratch for an stm32-based board, reusing soc and common includes, applying deltas with overlays for add-on hardware like mpu6050 and lcd touchscreen.
Create a minimal DTS file layout for Zephyr by adding the version line, includes, and a root node with compatible and model properties, plus basic device nodes.
Update the dts file by including the stm32f303xcdtsi path from st f3 and omitting optional cpu architecture dtsi, bindings, and memory reserve until needed.
Explore how device tree nodes represent hardware. Understand the root, node naming, unit address, reg and properties, and how bus controllers host child peripherals like I2C, SPI, UART, and USB.
Describe the reg standard property in device trees, showing how reg encodes base address and size in 32-bit cells, with address cells and size cells guiding i2c bus mappings.
Use the compatible property in the device tree to bind devices to drivers in Zephyr, letting the build system match device nodes with the right driver via text identifiers.
Select exact compatible strings using binding documents to link devices with drivers in Zephyr, and consult yaml bindings for required properties to apply them during board bring up.
Explain how device tree compatible strings bind board nodes to drivers at build time using the DT driver compatible macro and YAML bindings, illustrated by the MPU 6050 driver.
Use root level compatible property to identify the board by model name and vendor; in Zephyr, this is metadata for documentation and dts analysis, not for driver binding or init.
Learn how the device tree uses phandle (p handle) references to link nodes, and how Zephyr exposes these relationships through device tree generated.h macros for interrupts and I2C/SMBus.
Learn the p-handles property in device tree as a list of node references with no per-entry arguments or commas, used to configure pins for i2c and usart via pin control.
Explore the p-handle array type in device tree, linking consumers to providers with specifiers like pin number and flags, illustrated by GPIO interrupts and MPU6050 bindings.
Learn how the specifier space defines the argument cells in a phandle-array. The provider node defines this space, and gpio controllers use gpio cells to specify pin and trigger.
Trace how a Zephyr application uses the built-in LED driver and the STM32GPIO backend to blink an on-board LED, with the device tree defining the LED binding.
Add led nodes to the Zephyr device tree using the gpio leds binding, mapping led1, led2, and led3 to gpio port A pins 1–3 with active high.
Understand the Zephyr board directory structure and create the mandatory files, including board.yml and kconfig.yourboardname, within a vendor subdirectory to enable successful west builds for custom boards.
Create a board-specific kconfig file in the Zephyr board directory to select the SoC. Use the board.yml name, avoid defining any type, and understand config and select behavior in menuconfig.
Use a board defconfig to set minimal defaults, enable gpio and the uart console, and leave leds and sensors to applications; rely on prj.conf overrides and device tree for bindings.
Follow the west-driven zephyr build flow from toolchain and board setup through device tree pre-processing to generate zephyr.dts and c headers, not a dtb, then kconfig processing and final elf.
Set up the board directory with board.yml, the device tree file, and dev config; build the Blinky sample with west, then explore menu config and fix dts qualifiers.
Fix DTS syntax, terminate nodes, correct GPIO label to port B, and define RCC clock properties using binding YAML and default 8 MHz HSI during Zephyr bring up.
Update the device tree chosen node with flash 0x08000000, 256 kb, and sram 0x20000000, 40 kb. Then rebuild without a pristine build to apply the changes.
Define flash and sram memory sizes in a persistent source, ideally in the board's device tree chosen node, so the build system generates a consistent linker script across builds.
Understand the chosen node in Zephyr's device tree as a pseudo node that exposes global firmware metadata, memory configuration, base addresses, boot sources, and console interfaces.
flash Zephyr binary to the custom board using west flash and STM32Q programmer via SWD, UART, or USB DFU to test the blinky application, guided by board.cmake and device tree.
Learn to extract led gpio details from the device tree using dt alias macros and implement a gpio dt spec with a static initializer for a custom Zephyr board.
Discover how Zephyr converts device tree nodes into usable device instances, verify readiness with the device is ready API, and understand boot-time initialization of static device objects.
Configure the LED pin as a GPIO output with off state using GPIO pin configure dt; toggle in a Zephyr main loop via the stm32 GPIO driver with kmsleep.
Enable the Zephyr console on uart by configuring device tree to route stdout to usart1, then print led state with printf and verify output via the serial monitor.
Add a custom property to a standard device tree node in Zephyr, and configure a blink period for gpio leds with a wrapper binding yaml.
Learn how to use device tree overlays in Zephyr to edit the board dts without changing the board dts, automatically merged by west build, with overlay placement and search order.
Implement an interrupt-driven led burst on Zephyr RTOS using a GPIO button interrupt, offload work to a processing thread, and schedule a timed burst with a delayable work item.
Learn to scaffold a new zephyr rtos project in vscode, create modular led and button modules with include headers, and refactor main.c for clean, testable code.
Configure a button in Zephyr RTOS with device tree and board bring up, implement gpio callback and interrupt, and post button isr events to queues for consumer threads.
Define a button node in the device tree and bind it to Zephyr's input GPIO keys driver, configuring PA0 as an active-high user button and exposing a button zero alias.
Create a button event structure and a Zephyr message queue to transfer ISR button events to a consumer thread, toggle the LED, and schedule a blink on the work queue.
Explore Zephyr message queues for ISR-to-thread communication, including static definition via kMessageQueueDefine, fixed-size data copies into an internal ring buffer, and differences from standard queues.
Learn how to create threads in Zephyr using static KThreadDefine or dynamic KThreadCreate, control scheduling and priorities, and manage delays and critical sections with IRQ locks.
Create a statically allocated thread with a button handler, share a queue, and use an atomic press counter; schedule a delayable work item to flash an led in six-flash bursts.
Learn how Zephyr's system work queue offloads interrupt work to a worker thread, deferring bottom-half processing via delayable work items for deterministic, thread-safe execution.
Create and initialize a delayable work item (k_work_delayable) and connect a led flash work handler. Submit, reschedule, or cancel it on the Zephyr system work queue using k_work_schedule.
Refactor the LED flash logic into a LEDFlashCTX structure and expose prototypes in LEDFlash.h. Implement a Zephyr workqueue handler using k_work_delayable to toggle the LED every 250 ms.
Demonstrate wiring the LEDFlash module in Zephyr RTOS from button ISR to a thread, using a message queue and work queue to toggle the LED in 250 ms bursts.
Explain how two threads create a data race on shared data and how a spin lock protects the critical section's read-modify-write sequence.
Discover mutex, the mutual exclusion tool for shared data in Zephyr, and the critical section; learn static or runtime k_mutex setup and that mutexes are not for interrupts.
Choose between spinlock and mutex based on the work queue and interrupt context in Zephyr. Use spinlocks for short, non-blocking critical sections and mutex for longer, thread-shared protection.
Build a brick breaker game on the STM32 Nanoboard using Zephyr, with AI-assisted workflows to speed up embedded development, featuring tilting with the MPU6050 IMU sensor, and an LCD display.
Plan tilt brick breaker project by identifying lcd display and mpu6050 imu, integrating drivers and device tree nodes in Zephyr, and implementing a three-screen game with a state machine.
Set up a new Zephyr project from templates, clean the build. Create a minimal codebase with game.c, lcd.c, input.c, and util.c for a state-machine driven display with sensor input.
Explore ai-assisted coding for Zephyr RTOS development with device tree and board bring up. Learn step-by-step and full-file prompting using Cloud Code to speed builds and debugging.
Install cloud code on Windows, run from the terminal, and use it as a VS Code extension to analyze a Zephyr RTOS project on a Fastbit STM32 Nano board.
Install Cloud Code extension in VS Code, log in, and use Cloud Code chat box as an AI code assistant or terminal to run Cloud Code for your project.
Learn to use slash commands and the cloud code config to initialize and tailor your Zephyr RTOS project. Create and manage cloud.md to build persistent context and optimize token usage.
Learn to create a project specification in spec.md, guiding cloud code to read hardware requirements, include stm32f303cct6 board details, mpu 6050 sensor, and clear objectives.
Use AI to read the board schematic and manual pdfs, update spec.md hardware details with sections for microcontroller, motion sensor, and lcd/touch components, and flag missing pin data for verification.
Update the spec.md to outline a Zephyr RTOS based microcontroller game using an MPU 6050 tilt input and RGB LCD for real-time brick breaker gameplay.
Update the device orientation details in the spec.md for Zephyr RTOS board bring up, and move axis and pedal mappings from config.h into Zephyr Kconfig via menuconfig.
Explore configuring Zephyr RTOS with device tree and kconfig, setting display orientation for a 240x240 display, and using menuconfig to adjust options without code changes.
Add KConfig options for LCD orientation in Zephyr, including rotation (0/90/180/270), mirror X/Y, and offsets; document circular safe area in spec.md for easy MenuConfig adjustments.
Generate code for the source files and create the device tree overlay, then build with west, and verify lcd orientation kconfig items in menuconfig, configuring display geometry and orientation.
Develop a step-by-step display bring-up plan for Zephyr RTOS using device-tree overlays and modular, single-responsibility functions, with git commit checkpoints for startup, gameplay, and end screens.
Mapping hardware to device tree nodes, this lecture explains how to enable SPI1 and the LCD display in Zephyr using overlay files, pin controls, and CS-GPIOs.
Perform a smoke test of the display driver in Zephyr RTOS using device-tree overlays, verifying end-to-end display wiring and RGB565/BGR color handling in code.
Resolve display color mismatch by correcting byte order from little endian to big endian for 16-bit RGB565 data, confirming Zephyr's cpu_to_be16 API usage.
Rotate the display to 270-degree clockwise orientation and test shapes such as squares and circles with color codes, implementing per-line clipping for a 240 by 240 circular display.
Implement and test a startup splash screen for a Zephyr RTOS project, convert a Canva image to a byte array stored in a header, and tune layout with UILayout.h macros.
Implement and test the gameplay screen with bricks and a heads-up display for score and lives, plus the pedal and ball at the bottom.
Refactor rendering logic to combine score text and value into a printf-style helper, replace magic numbers with macros, and prepare to diagnose slow pixel rendering in the next video.
Analyze display rendering slowdown in a Zephyr RTOS project with device tree; identify bottlenecks like underclocked MCU, slow SPI clock, and full-screen redraw, and propose fixes like increasing clock speed.
Enable the pll and configure device tree nodes to raise the system clock to 64 megahertz, boost spi1 speed on APB2, and use blanking to smooth display updates.
Implement the end screen and full display sequence, review the generated code, verify it on hardware, and create a prompt to implement and test in the next video.
Implement ball movement with physics, brick and pedal collisions, scoring updates, and life loss, using a runtime game context and tunable config options.
Design a flexible, common input interface that decouples game logic from hardware backends—buttons, mpu 6050 tilt, touch, or serial input—using kconfig, device tree, or zephyr input subsystem.
Design a tilt-based paddle control in Zephyr RTOS, using a tilt backend and device tree with kconfig, enabling x-axis paddle movement through accelerometer data, calibration, low-pass filtering, and clamping.
Explore making paddle movement responsive in Zephyr RTOS by comparing velocity mode and position mode, mapping tilt to velocity versus absolute position, and addressing crawling with event-based rendering and filtering.
### Learn Zephyr RTOS from the ground up with a clear, structured foundation path ###
The embedded industry is shifting. Zephyr RTOS, backed by the Linux Foundation, is rapidly becoming the default choice for production IoT and embedded products. Nordic, NXP, Intel, STMicroelectronics, and dozens of other companies are building their ecosystems around it. No other RTOS brings together a unified build system, DeviceTree based hardware abstraction, and a porting workflow that works across MCU vendors in a single codebase. If you are an embedded engineer and you do not know Zephyr yet, you are falling behind.
This course turns you into the engineer who can take any Zephyr supported MCU, write DeviceTree for it from scratch, port it as a custom board, and build real applications on top of it. Not by copying from samples or following a pre-configured dev kit tutorial. By understanding the complete workflow from the ground up.
Here is what you will be able to do by the end of this course:
- Set up the complete Zephyr workspace and toolchain on Windows, Ubuntu, and MacOS
- Build and run your first Zephyr applications on QEMU and on real hardware
- Configure your Zephyr project using prj.conf, menuconfig, and Kconfig
- Write DeviceTree from scratch for a custom board and understand every node and property
- Port your own board into Zephyr with the full board directory and configuration setup
- Build real applications using interrupts, threads, and workqueues on your custom hardware
- Debug common DeviceTree and build issues with a repeatable step by step process
Zephyr is not just another RTOS. It is where the industry is heading. Companies building IoT products, wearables, industrial controllers, and connected devices are choosing Zephyr because it gives them one codebase that works across multiple chip vendors. The engineer who can bring up a custom board in Zephyr and write DeviceTree is the one who gets the interesting projects, the better roles, and the trust of the team. That skill set is rare right now. This course builds it.
Most Zephyr resources out there show you how to run samples on a supported dev kit. That is the easy part, and you can do it by reading the documentation. This course teaches you the skills that actually matter at work: writing DeviceTree from scratch, creating your own board files, and debugging the problems that show up when you step off the beaten path. Very few Zephyr courses go this deep into DeviceTree and board porting. This one does.
This course is built for:
- Embedded engineers who want to use Zephyr on their own custom hardware
- Engineers who tried Zephyr before but got stuck at DeviceTree or board porting
- Firmware developers, students and hobbyists moving from bare metal or FreeRTOS to Zephyr
Note on using AI assisted coding in this course
In the final project, we use AI-assisted coding to build a real embedded application. We deliberately save this for last. First, you build the foundation. You understand how Zephyr works. You can debug issues on your own. Only then do we bring in AI tools to show you how they can speed up your workflow when you actually know what you are doing. Understand first, accelerate later.
By the end of this course, you will not just know Zephyr. You will be the engineer who can take a bare board, bring it up in Zephyr, and build real applications on it. If that is the engineer you want to become, enroll now. Let us get started.
Hardware Requirement (for hands on practice)
This course uses the Fastbit STM32 Nano board, based on the STM32F303 microcontroller.
You can also follow along using any STM32 or Zephyr supported development board you already have.
If you want to use the exact board used by the instructor, you can explore the Fastbit STM32 Nano board and follow along one to one