Learn Zephyr® – the new Era of Real Time OS
In 2022, Zephyr OS became the largest open-source RTOS project by the number of commits and developers.
Build secure, connected, future-proof devices with Zephyr®
Zephyr RTOS is easy to deploy, secure, connect and manage. It has a growing set of software libraries that can be used across various applications and industry sectors such as Industrial IoT, wearables, machine learning and more. Zephyr is built with an emphasis on broad chipset support, security, dependability, long term support releases and a growing opensource ecosystem.
- Learn how to develop, configure, debug and trace Zephyr applications.
- Discover the real time multitasking concept.
- Understand Real Time constraints.
- Understand the Zephyr kernel Services.
- Learn communication and synchronization mechanisms.
- Interactions with processor architecture features.
- Understand Zephyr memory management and data structures.
- Theoretical course
- PDF course material (in English)
- Course dispensed using the Teams video-conferencing system.
- The trainer to answer trainees’ questions during the training and provide technical and pedagogical assistance through the Teams video-conferencing system.
- Practical activities
- Practical activities represent from 40% to 50% of course duration.
- The trainer has access to trainees’ Online PCs for technical and pedagogical assistance.
- Example code, labs and solutions.
- Virtual Machine with System Workbench for STM32 with GNU ARM Eclipse QEMU
- Emulated board STM32F4-Discovery
- Online course, 4 sessions, 6 hours each (excluding break time) total 24 hours.
- Lots of hands-on exercises during the course
- Some Labs may be completed between sessions and are checked by the trainer on the next session.
- good C Language skills
- Base real time concepts
- The Real Time constraints
- Multi-task and real time
- Tasks and Task Descriptors
- Content of the task descriptor
- List of task descriptors
- Context Switch
Introduction to Zephyr
- Zephyr Project
- Zephyr Ecosystem
- Why use Zephyr
- Install and use Zephyr
- Build and Configuration Systems
- Kconfig and configuration overlay
- Configuration tools: menuconfig and guiconfig
Zephyr Without Threads
- Operation without Threads
- Random Number Generation
- Data Structures
- Single-linked List
- Double-linked List
- Ring Buffers
- Task Scheduling and Preemption
- Tick based or tickless scheduling
- Scheduling systems and schedulability proof
- Fixed priorities scheduling
- RMA and EDF scheduling
- Scheduling through Zephyr
- Scheduling Algorithm
- Cooperative Time Slicing
- Preemptive Time Slicing
Exercise: Hello World from Zephyr, configure and blink LEDs using Zephyr
Exercise: Manage Zephyr linked list and understand container of macro
- Thread Control Block
- Creating Threads
- Threads Priorities
- Thread States
- Main and Idle Threads
- Changing Thread Priority
- Suspending Threads
- Kernel Structures
- Simple linked-list ready queue
- Red/black tree ready queue
- Traditional multi-queue ready queue
- Thread Custom Data
- Scheduling Traces
- Runtime Statistics
- User-Defined Tracing
- Percepio Tracealyzer
Memory Management in Zephyr
- Memory Managers
- Dynamic memory managers
- System heap
- Memory Slabs
- Memory Blocks
- Heap Listeners
- Stack Overflow detection
Exercise: Create and manage threads
Exercise: Create periodic threads
Exercise: Create config overlay for visual trace diagnostics using Tracealyzer
Exercise: Understand dynamic memory allocation in Zephyr
Exercise: Display threads information and detect stack overflow
- Mutual Exclusion
- Critical Sections
- Gatekeeper threads
- Lock-Free Data Structures
- The Readers/Writer Problem
- Condition variables
- Events and Event Groups
Exercise: Implement mutual exclusion between threads
Exercise: The producer-consumer problem, synchronize and avoid concurrent access problems
Exercise: Understanding event bit group by synchronizing several threads
- Message Queues
- Threads and Interrupts
- Interrupts in zephyr
- Interrupts on ARM Cortex-M
- Handler thread
- Queue within an ISR
- Workqueue Threads
- Power Management
- Defining a Timer
- Using a Timer Expiry Function
- Timer types
- One-shot timers
- Auto-reload timers
- Timer Commands
Exercise: Create a print gatekeeper thread using message queue
Exercise: Understand how to wait on multiple events and interrupt safe APIs
Exercise: Understand how to pass data using Queues from an interrupt to a thread
Exercise: Create and submit work items from interrupts to custom WorkQueue
Exercise: Understand the use of one-shot and auto-reload timers