Description
Description
This comprehensive hands-on training introduces participants to Zephyr RTOS, a scalable, real-time operating system for embedded systems.
The course covers:
Developing, configuring, debugging, and tracing Zephyr applications.
Device tree (DT) and Kconfig usage and development.
Managing threads, synchronization, memory, and interrupts in Zephyr.
Using west and writing west manifests for project management.
Zephyr kernel services, subsystems, and device drivers.
Hands-on implementation of Zephyr’s multitasking and real-time capabilities.
Training Objectives
- By the end of this course
- participants will be able to:
- Develop real-time Zephyr applications with threads
- memory
- and synchronization.
- Write and configure device trees & Kconfig options.
- Use west
- CMake
- and Zephyr SDK for application development.
- Implement Zephyr-based embedded systems with robust power management.
- Design & develop Zephyr device drivers with real-world applications.
Course Outline
- Day 1: Introduction & Zephyr Basics<br />
- Introduction to Zephyr<br />
- The Zephyr Project & Ecosystem.<
- Why use Zephyr? Key features & advantages.<
- Installing & setting up Zephyr.<
- Build & Configuration Systems<br />
- West: Zephyr’s build system.<
- CMake and Zephyr SDK.<
- Application structure & west manifests.<
- Zephyr Configuration & Device Tree<br />
- Kconfig & Devicetree syntax.<
- Best practices for configuration.<
- Exercise: Write a device tree overlay.<
- Zephyr Without Threads<br />
- Operation without threads (GPIO, utilities, data structures).<
- Exercise: Blink LEDs using Zephyr & configure GPIO.<
- Exercise: Manage linked lists & understand container_of macro.<
- Day 2: Thread Management & Debugging<br />
- Thread Management<br />
- Creating & managing threads in Zephyr.<
- Thread priorities, states, and delays.<
- Kernel scheduling mechanisms (linked-list, red-black tree, multi-queue).<
- Exercise: Create & manage Zephyr threads.<
- Tracing & Logging<br />
- Runtime statistics & scheduling traces.<
- Percepio Tracealyzer integration.<
- Exercise: Enable & analyze Zephyr trace logs.<
- Memory Management in Zephyr<br />
- Dynamic & static memory allocation.<
- Heap, memory blocks, stack overflow detection.<
- Exercise: Allocate dynamic memory & detect stack overflow.<
- Day 3: User Mode, Synchronization & Data Passing<br />
- User Mode & Security<br />
- User mode vs. kernel mode.<
- Memory partitions & syscall mechanisms.<
- Resource Management & Synchronization<br />
- Mutexes, semaphores, atomic operations.<
- Exercise: Solve the producer-consumer problem in Zephyr.<
- Data Passing in Zephyr<br />
- Message queues, FIFOs, LIFOs, mailboxes, pipes.<
- Exercise: Implement a print gatekeeper thread using message queues.<
- Day 4: Interrupts, Timers & Module Development<br />
- Interrupt Management<br />
- Interrupt handling in Zephyr.<
- Thread-safe queues & workqueue threads.<
- Exercise: Pass data from an interrupt to a thread safely.<
- Software Timers<br />
- One-shot & auto-reload timers.<
- Exercise: Implement timers for task scheduling.<
- Modules & Kconfig<br />
- Creating and integrating Zephyr modules.<
- Using and extending Kconfig options.<
- Exercise: Create a custom module with Kconfig integration.<
- Day 5: Zephyr Device Drivers & Power Management<br />
- Zephyr Device Driver Model<br />
- Overview of Zephyr’s device driver framework.<
- Device API extensions & initialization levels.<
- Exercise: Develop a custom device driver.<
- Device Tree Integration<br />
- Device Tree bindings & overlays.<
- Exercise: Write a driver using Device Tree & Kconfig.<
- Power Management in Zephyr<br />
- System & device power management.<
- Exercise: Implement power-efficient drivers for Zephyr.



