What problem does it solve?
This Skill provides a structured set of foundational Zephyr RTOS patterns and best practices, enabling developers to write reliable, idiomatic embedded C that scales.
Core Features & Use Cases
- Idiomatic C Patterns: Master macros and patterns like CONTAINER_OF, BIT, GENMASK, and container-based data structures; map hardware with device trees using standard conventions.
- Real-Time Concurrency: Use safe synchronization primitives (k_mutex, k_sem, k_spinlock), ISR-safe coding, and atomic operations to build responsive, deterministic drivers and tasks.
- Hardware Literacy (Devicetree): Understand how hardware topology and overlays drive driver behavior, with proper use of nodes, properties, phandles, and overlays.
- Robust Error Handling: Apply defensive coding with BUILD_ASSERT, parameter validation, and disciplined return code handling to prevent crashes.
Quick Start
Review the template_driver.c in assets/foundation_examples as a complete skeleton, then consult the references for macros and concurrency primitives to adapt the patterns to your specific driver or core logic task.