Embedded Firmware with Zephyr RTOS
- A Practical Guide from LED to Custom PCB
Before You Begin — Workspace Setup
- Requirements
- Quick setup (copy-paste)
- Session setup (run at the start of every terminal session)
- Verify the setup
Day 1 — Introduction to Zephyr RTOS
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
- Tomorrow, we will explore Zephyr project structure and the build system in depth.
Day 2 — Zephyr Project Structure and Build System
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
- Tomorrow, we will cover Device Tree basics and how Zephyr maps hardware in software.
Day 3 — Device Tree Basics in Zephyr
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
- Tomorrow, we will study Kconfig and
prj.confconfiguration in Zephyr.
Day 4 — Kconfig and prj.conf Configuration
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
- Tomorrow, we will write a basic Zephyr application with main loop and device initialization.
Day 5 — Writing a Basic Zephyr Application
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
- Tomorrow, we will learn how to use Zephyr drivers and device binding properly.
Day 6 — Using Zephyr Drivers and Device Binding
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
- Tomorrow, we will cover debugging and testing Zephyr applications.
Day 7 — Debugging and Testing Zephyr Applications
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
- After this, you can continue with advanced Zephyr concepts such as Bluetooth, networking, and power management.
Day 8 — Threads and Synchronization
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 9 — GPIO and Interrupts
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 10 — Custom PCB Board Definition
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 11 — USB CDC-ACM Communication
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 12 — CBOR Encoding over USB
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 13 — Zephyr Shell Subsystem
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 14 — I2C Sensor Integration
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 15 — KXTJ3-1057 Accelerometer with USB Shell
- Goal
- What you will learn
- KXTJ3-1057 Overview
- Hardware wiring (nRF52840 DK)
- Project structure
- prj.conf
- Shell commands implemented
- Converting raw counts to mg
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 16 — KXTJ3-1057 Accelerometer with CBOR over USB
- Goal
- What you will learn
- CBOR frame format
- Shell commands
- Python decoder (
tools/decode_accel.py) - Why this matters
- Practice tasks
- Example folder
- Next topic
Day 17 — BLE GATT Services
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 18 — BLE Peripheral Advertising
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 19 — SPI Communication
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 20 — ADC Reading
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 21 — PWM LED Dimming
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 22 — NVS Flash Storage
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 23 — Work Queues and Kernel Timers
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Day 24 — Power Management and Sleep
- Goal
- What you will learn
- Overview
- Why this matters
- Practice tasks
- Example folder
- Next topic
Capstone Project — Days 25–27: Wireless Sensor Node
- Day 25 — Sensor + NVS Integration
- Day 26 — BLE GATT Environmental Service
- Day 27 — Sleep and Wake-Up Loop
- Example folder
Appendix A — Troubleshooting
- Build errors
- Runtime / flashing errors