.agents/skills/embedded-systems/SKILL.md
Expert in RTOS, bare-metal programming, and embedded Linux. Specializes in Rust for Embedded and high-reliability firmware.
npx skillsauth add ozmosko/firmware-copilot-training embedded-systemsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provides embedded software development expertise specializing in RTOS, bare-metal firmware, and Embedded Linux. Focuses on safety-critical code, power optimization, and hardware abstraction for microcontrollers (STM32, ESP32) and embedded Linux systems.
What is the hardware capability?
│
├─ **Microcontroller (MCU) - < 1MB RAM**
│ ├─ Hard Real-Time? → **Zephyr / FreeRTOS** (Preemptive scheduler)
│ ├─ Safety Critical? → **SafeRTOS / Rust (Bare Metal)**
│ └─ Simple Loop? → **Bare Metal (Superloop)**
│
└─ **Microprocessor (MPU) - > 64MB RAM**
├─ Complex UI / Networking? → **Embedded Linux (Yocto/Buildroot)**
└─ Hard Real-Time? → **RT-Linux (PREEMPT_RT)** or **Dual Core (Linux + MCU)**
| Language | Use Case | Recommendation |
|----------|----------|----------------|
| C (C11/C17) | Legacy / HALs | Still dominant. Use strict static analysis (MISRA). |
| C++ (C++20) | Complex Logic | Use noexcept, no-rtti for embedded. Zero-cost abstractions. |
| Rust | New Projects | Highly Recommended. Memory safety without GC. embedded-hal. |
| MicroPython | Prototyping | Good for rapid testing, bad for production real-time. |
Red Flags → Escalate to security-engineer:
strcpy or unbounded buffers in C codeGoal: Read sensor via I2C and print to console.
Steps:
Device Tree (app.overlay)
&i2c1 {
status = "okay";
bme280@76 {
compatible = "bosch,bme280";
reg = <0x76>;
label = "BME280";
};
};
Configuration (prj.conf)
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_CBPRINTF_FP_SUPPORT=y
Code (main.c)
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
void main(void) {
const struct device *dev = DEVICE_DT_GET_ANY(bosch_bme280);
while (1) {
sensor_sample_fetch(dev);
struct sensor_value temp;
sensor_channel_get(dev, SENSOR_CHAN_AMBIENT_TEMP, &temp);
printk("Temp: %d.%06d C\n", temp.val1, temp.val2);
k_sleep(K_SECONDS(1));
}
}
Use case: Handling complex device logic without an OS.
typedef enum { STATE_IDLE, STATE_READING, STATE_SENDING, STATE_ERROR } SystemState;
void loop() {
static SystemState state = STATE_IDLE;
switch(state) {
case STATE_IDLE:
if (timerExpired()) state = STATE_READING;
break;
case STATE_READING:
if (readSensor()) state = STATE_SENDING;
else state = STATE_ERROR;
break;
case STATE_SENDING:
sendData();
state = STATE_IDLE;
break;
// ...
}
}
Use case: Keeping ISRs (Interrupt Service Routines) short.
Use case: Auto-reset if the system freezes.
void watchdog_task(void *pvParameters) {
while(1) {
// Only kick if critical flags are set
if (check_system_health()) {
wdt_feed();
}
vTaskDelay(1000);
}
}
testing
Generate validation artifacts for dedicated communication port boards and firmware bring-up, especially when the user mentions UART, USART, RS-232, RS-485, serial links, framing, parity, baud rate, DE/RE direction control, communication board verification, port bring-up, host-test stubs, bench-test plans, or deterministic firmware validation. Use this skill whenever the task is to review or validate a communication-port driver/board and produce bring-up checks, validation tests, failure cases, or test scaffolding, even if the user does not explicitly ask for a "validation skill."
testing
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
content-media
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
development
Guide safe connection to a physical PCB board for firmware testing, including power/USB/JTAG bring-up, flashing, serial log capture, and deterministic smoke tests. Use this whenever the user mentions physical board testing, hardware bring-up, flashing a dev board, SWD/JTAG, UART logs, bench validation, or wants to test firmware on real hardware.