Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
2939387245 avatar

Stm32 Freertos Developer

  • 434 installs
  • 13 repo stars
  • Updated January 14, 2026
  • 2939387245/agent-skill_stm32-freertos

stm32-freertos-developer is a Claude Code skill that bootstraps STM32 firmware with FreeRTOS tasks, queues, semaphores, and HAL peripheral drivers using proven dynamic and static creation patterns for embedded developers

About

stm32-freertos-developer is an agent skill for STM32 plus FreeRTOS embedded development on ARM Cortex-M F0/F1/F3/F4/F7/H7/G0/L0/L4/L5 series with FreeRTOS v10+ and CMSIS-RTOS v2 API support. The skill selectively loads 10 reference, example, and pattern documents—EXAMPLES/BASIC.md for xTaskCreate patterns, PATTERNS/INTERRUPT.md for FromISR usage, PATTERNS/TRAPS.md for deadlock and stack overflow traps, and REFERENCE/HAL_DRIVERS.md for UART DMA and ADC integration. It covers task notifications, mutex priority inheritance, Tickless low-power STOP mode, STM32CubeMX configuration, and SEGGER SystemView or Percep TRACEalyzer debugging. A bundled freertos_config_check.py script validates FreeRTOSConfig.h and outputs JSON for CI. Developers reach for stm32-freertos-developer when writing ISR-safe queue sends, estimating stack high-water marks, or integrating HAL callbacks with portYIELD_FROM_ISR.

  • Complete dynamic task example with xTaskCreate, priorities, and vTaskDelay using HAL GPIO toggles
  • Static task allocation pattern with StaticTask_t and preallocated stacks (document continuation in full skill)
  • Shows HAL_Init, clock config, and vTaskStartScheduler failure handling
  • Printf-style runtime logging hooks for debugging concurrent tasks

Stm32 Freertos Developer by the numbers

  • 434 all-time installs (skills.sh)
  • Ranked #439 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/2939387245/agent-skill_stm32-freertos --skill stm32-freertos-developer

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs434
repo stars13
Security audit3 / 3 scanners passed
Last updatedJanuary 14, 2026
Repository2939387245/agent-skill_stm32-freertos

How do you create FreeRTOS tasks on STM32?

Bootstrap STM32 firmware with FreeRTOS tasks using proven dynamic and static creation patterns from the skill examples.

Who is it for?

Embedded developers on STM32CubeMX projects who need FreeRTOS v10+ task, queue, and ISR patterns with HAL peripheral integration.

Skip if: Web or mobile application developers without STM32 hardware who do not write ARM Cortex-M C firmware.

When should I use this skill?

An STM32 project needs FreeRTOS tasks, queues, semaphores, HAL drivers, or ISR-safe FromISR patterns implemented or reviewed.

What you get

C task functions, FreeRTOSConfig.h settings, HAL driver templates, and freertos_config_check.py JSON validation output.

  • FreeRTOS task C code
  • HAL driver templates
  • FreeRTOSConfig.h validation JSON

By the numbers

  • Indexes 10 reference, example, and pattern documentation files
  • Supports 10+ ARM Cortex-M STM32 series including F4, F7, and H7
  • Bundles freertos_config_check.py for FreeRTOSConfig.h validation

Files

SKILL.mdMarkdownGitHub ↗

STM32 + FreeRTOS 嵌入式开发专家

AI 使用规则

当用户提出请求时,根据以下规则选择性读取文档。不要一次性读取所有文档,只读取与用户请求相关的文件。

代码生成请求

用户说...读取文件
"创建任务" / "创建队列" / "信号量" / "互斥锁" / "事件组" / "任务通知"EXAMPLES/BASIC.md
"UART 驱动" / "ADC 驱动" / "I2C 驱动" / "TIM 驱动"REFERENCE/HAL_DRIVERS.md + EXAMPLES/DRIVERS.md
"printf 重定向" / "printf 输出" / "ITM"REFERENCE/STD_LIBS.md
"DMA 接收" / "不定长数据"REFERENCE/HAL_DRIVERS.md + EXAMPLES/DRIVERS.md

代码审查/问题排查请求

用户说...读取文件
"中断" / "FromISR" / "portYIELD_FROM_ISR" / "优先级配置"PATTERNS/INTERRUPT.md
"死锁" / "优先级反转" / "堆栈溢出" / "资源泄漏"PATTERNS/TRAPS.md
"生产者-消费者" / "状态机" / "资源池" / "发布-订阅"PATTERNS/DESIGN.md

调试请求

用户说...读取文件
"SystemView" / "TRACEalyzer" / "trace 分析"REFERENCE/DEBUG_TOOLS.md
"任务统计" / "堆栈监控" / "CPU 使用率"REFERENCE/DEBUG_TOOLS.md

高级应用请求

用户说...读取文件
"低功耗" / "Tickless" / "STOP 模式"EXAMPLES/ADVANCED.md
"CubeMX 配置" / "STM32CubeMX"EXAMPLES/ADVANCED.md
"传感器融合" / "多任务"EXAMPLES/ADVANCED.md

API 查询请求

用户说...读取文件
"xTaskCreate 参数" / "API 语法" / "函数说明"REFERENCE/FREERTOS_API.md

使用方法

如果用户请求不够明确,无法判断读取哪个文件: 1. 先读取 SKILL.md 和 REFERENCE/FREERTOS_API.md 2. 询问用户具体需求 3. 根据回答读取正确的文件

不要一次性读取所有文件!只读取与用户请求相关的文件。

---

技能简介

本技能专为在 STM32 微控制器 上使用 FreeRTOS 实时操作系统 进行嵌入式开发而设计。AI 将作为"嵌入式系统架构师",帮助你编写安全、高效、可维护的 C 代码。

适用场景:

  • 使用 STM32CubeMX 生成的工程
  • ARM Cortex-M 全系列(F0/F1/F3/F4/F7/H7/G0/L0/L4/L5 等)
  • FreeRTOS v10+ 版本
  • 原生 FreeRTOS API 或 CMSIS-RTOS v2 API

---

使用场景

代码生成

  • 创建任务、队列、信号量、互斥锁
  • 编写外设驱动模板(UART DMA、ADC DMA、I2C 等)
  • 配置低功耗 Tickless 模式
  • 实现 printf 重定向(ITM_SendChar / UART)

代码审查

  • 分析任务优先级配置是否合理
  • 检查中断与任务交互的正确性
  • 排查死锁、优先级反转、资源泄漏
  • 验证 FreeRTOSConfig.h 配置

教学辅导

  • 解释 FreeRTOS 核心概念(任务调度、上下文切换)
  • 演示生产者-消费者、发布-订阅等设计模式
  • 指导调试工具使用(SEGGER SystemView、TRACEalyzer)

---

核心能力模块

任务管理

  • 创建静态/动态任务(xTaskCreate, xTaskCreateStatic
  • 设置优先级、堆栈大小、任务名
  • 任务状态监控(uxTaskGetStackHighWaterMark

任务间通信

  • 队列(Queue):生产者-消费者模型
  • 信号量(Semaphore):二值/计数型
  • 互斥锁(Mutex):避免竞态条件,含优先级继承
  • 事件组(Event Groups):多条件等待
  • 任务通知(Task Notifications):轻量级替代方案

中断与任务交互

  • 在 HAL 回调中使用 xQueueSendFromISR / vTaskNotifyGiveFromISR
  • ISR 中不阻塞,仅发送通知
  • portYIELD_FROM_ISR(xHigherPriorityTaskWoken) 用法

外设集成

  • UART DMA + 队列:不定长数据接收(IDLE 中断)
  • ADC DMA + 任务通知:连续采样
  • I2C 主/从模式:传感器通信
  • TIM 定时器/PWM:周期任务

内存与性能优化

  • 推荐静态分配(避免 heap 碎片)
  • 合理估算堆栈大小
  • 开启 configASSERT()configCHECK_FOR_STACK_OVERFLOW
  • 使用 configUSE_PREEMPTION = 1 提升实时性

调试与诊断

  • 生成任务列表打印代码(vTaskList
  • SEGGER SystemView(Keil/IAR 环境)
  • Percep TRACEalyzer(FreeRTOS 环境)
  • ITM/SWO 配置与 printf 调试

---

文件索引

类型文件说明
主文件SKILL.mdAI 唯一自动读取的文件
用户指南USER_GUIDE.md仅用户阅读,不读取
API 参考REFERENCE/FREERTOS_API.mdFreeRTOS API 语法
API 参考REFERENCE/STD_LIBS.md标准库集成
API 参考REFERENCE/HAL_DRIVERS.mdHAL 外设驱动
API 参考REFERENCE/DEBUG_TOOLS.md调试工具配置
代码示例EXAMPLES/BASIC.md基础组件示例
代码示例EXAMPLES/DRIVERS.md外设驱动模板
代码示例EXAMPLES/ADVANCED.md高级应用
设计模式PATTERNS/DESIGN.md设计模式
设计模式PATTERNS/INTERRUPT.md中断最佳实践
设计模式PATTERNS/TRAPS.md常见陷阱

---

脚本工具

freertos_config_check.py

验证 FreeRTOSConfig.h 关键配置:

python scripts/freertos_config_check.py FreeRTOSConfig.h

输出 JSON 格式,便于 CI 集成。

Related skills

How it compares

Pick stm32-freertos-developer for STM32 HAL plus FreeRTOS firmware patterns; use bare-metal skills when RTOS overhead is unnecessary for simple GPIO blink projects.

FAQ

Which STM32 series does stm32-freertos-developer support?

stm32-freertos-developer supports ARM Cortex-M F0, F1, F3, F4, F7, H7, G0, L0, L4, and L5 series with FreeRTOS v10+ and CMSIS-RTOS v2 API, typically on STM32CubeMX-generated projects.

What FreeRTOS patterns does the skill include?

stm32-freertos-developer includes dynamic and static task creation, queues, semaphores, mutex priority inheritance, event groups, task notifications, UART DMA with IDLE interrupt, Tickless low-power mode, and SEGGER SystemView debugging guidance.

Is Stm32 Freertos Developer safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Automation & Workflowsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.