agency-embedded-firmware-engineer

Implements bare-metal and RTOS firmware for ESP32, STM32, and Nordic microcontrollers.

Updated Jul 27, 2026
One-click install
npx skills add https://github.com/imMamdouhaboammar/Mimera --skill agency-embedded-firmware-engineer-immamdouhaboammar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agency-embedded-firmware-engineer
Source: https://github.com/imMamdouhaboammar/Mimera/tree/main/.agents/skills/engineering-embedded-firmware-engineer
Command: npx skills add https://github.com/imMamdouhaboammar/Mimera --skill agency-embedded-firmware-engineer-immamdouhaboammar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing firmware for resource-constrained microcontrollers is error-prone: stack overflows, ISR misuse, blocking calls, and undefined behavior cause failures that only appear in production. This Skill provides an expert embedded firmware engineer persona that enforces hardware-aware, deterministic coding practices across ESP32, STM32, and Nordic platforms. ## Core Features & Use Cases - Multi-Platform Firmware Development: Produces idiomatic code for ESP-IDF, STM32 HAL/LL, Nordic nRF Connect SDK (Zephyr), Arduino, and PlatformIO with pinned dependency versions. - RTOS Architecture Design: Designs FreeRTOS task structures with calculated stack sizes, correct priorities, queue/semaphore-based inter-task communication, and ISR-safe API usage. - Production-Grade Safety Rules: Enforces no dynamic allocation after init, mandatory return-value checks, non-blocking drivers, and error handling on every peripheral path. - Use Case: Ask it to write an ESP32 sensor acquisition task — it returns a complete FreeRTOS implementation with a queue, proper tick conversions, error checks, and a correctly sized stack, plus guidance on validating it with stack high-water marks. ## Quick Start Ask the agent to write a FreeRTOS task on ESP-IDF that reads a sensor every 100 ms and sends the data through a queue with full error handling.

Frequently Asked Questions about agency-embedded-firmware-engineer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a FreeRTOS task on ESP32 with ESP-IDF?▼

Create a queue with xQueueCreate, then start a task with xTaskCreate using a calculated stack size and priority. Inside the task loop, read the sensor, check the esp_err_t return value, send data with xQueueSend using a tick timeout, and pace the loop with vTaskDelay.

Should I use STM32 HAL or LL drivers for timing-critical code?▼

Prefer LL drivers over HAL for timing-critical code because they have lower overhead and more direct register access. Never poll inside an ISR; defer work to tasks, and use LL functions like LL_SPI_TransmitData8 for tight peripheral control.

Can I use malloc inside FreeRTOS tasks on embedded systems?▼

No — avoid dynamic allocation in RTOS tasks after initialization. Use static allocation or memory pools instead, since heap fragmentation and allocation failures cause non-deterministic behavior that is hard to debug on resource-constrained MCUs.

Why does my firmware crash when calling FreeRTOS APIs from an ISR?▼

Standard FreeRTOS APIs are not interrupt-safe. You must use the FromISR variants (such as xQueueSendFromISR) inside interrupt handlers, and never call blocking APIs like vTaskDelay or xQueueReceive with infinite timeout from ISR context.

How do I prevent library version breakage in PlatformIO projects?▼

Pin every dependency version in platformio.ini, for example espressif32@6.5.0 and library@1.2.3. Never use @latest in production builds, since unpinned updates can silently introduce breaking changes or timing regressions.

How do I verify my FreeRTOS task stack size is correct?▼

Calculate stack sizes rather than guessing, then validate at runtime with uxTaskGetStackHighWaterMark to measure actual usage. Target zero stack overflows in extended stress testing and keep flash and RAM usage within 80 percent of budget.