stm32-embedded-development

SKILL开发
开发 未标注权限 许可证不明确
安装这个技能

开展、闭环调试、评审 STM32 固件项目并编写相关文档,涵盖 HAL/LL 库、裸机以及 RTOS 代码库。适用于涉及 STM32 外设、CubeMX 生成代码、硬件板卡调试、中断 / DMA 运行机制、嵌入式编译 / 烧录,或是资源受限固件的相关工作场景。无 STM32 相关背景的普通 C/C++ 开发工作请勿启用。

一句话选型结论

按资料字段整理

stm32-embedded-development是开发类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_b759e7b0/stm32-embedded-development
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_b759e7b0仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791737276
正文体量16.0 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
stm32-embedded-development当前 未标注权限 未标注 未标注 未标注 有
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

16.0 KB
模型实际读到的说明书原文,来自技能仓库

STM32 Embedded Development

Goal and Scope

Deliver STM32 firmware changes that are buildable, verifiable, and traceable — from source-level rules to real-board evidence. First identify the project MCU, board, project model, toolchain, and execution model. Keep unknown facts as “to be confirmed”; do not infer them from similar projects, prior memory, or an MCU family name. For real hardware, explicitly mark unavailable board validation as unverified. A successful build is not board-level evidence.

Read Advanced Verification and Debugging when relevant: FreeRTOS/CMSIS-RTOS interrupt priority or stack issues; Cortex-M7 D-Cache/MPU/DMA; HardFault, reset, low-power wake-up, boot, or production programming. Read Architecture and Quality for new modules, driver design, host testing, code-quality gates, or MCU errata. When a configure/build/flash/capture stage fails, read Debug-Loop Troubleshooting — a symptom-driven decision tree. Register definitions must always come from the reference manual for the current part number and silicon revision.

Start Every Task

  1. If these workspace fact files exist, read them first and treat them as authoritative:
    - docs/stm32-ai/project-facts.md
    - docs/stm32-ai/hardware-profile.md (includes the serial capture channel: VID:PID, baud, DTR convention, expected boot banner)
    - docs/stm32-ai/toolchain-profile.md
    - docs/stm32-ai/coding-rules.md
    If absent, perform read-only discovery from project files and mark the MCU, board, toolchain, and rules as to be confirmed. Create these documents only when the user requests or permits it; skeleton templates are provided in templates/stm32-ai/, and a pre-filled example is in examples/f407-explorer/.
  2. Inspect project entry points and generation boundaries: *.ioc, CMakeLists.txt, CMakePresets.json, Makefile, IDE project files, linker scripts, startup files, Core/, Drivers/, Middlewares/, or their project equivalents. Note any project-owned non-interactive automation scripts (e.g. scripts/build_and_flash.sh, scripts/flash.sh).
  3. If present, inspect delivery records in docs/stm32-ai-engineering/, especially pin/DMA/IRQ resource tables, driver contracts, resource budgets, test matrices, and known issues. Otherwise list the missing records in the delivery; do not assume their contents.
  4. Establish a short list of the goal, affected peripherals/resources, verification method, and risks. If the MCU or toolchain is not confirmed, do read-only discovery and design work only; do not invent build, flash, or debug commands.

Implementation Decisions

  • Follow the existing architecture and API first. Put new code in established user-code sections, extension layers, or driver layers. Edit CubeMX-generated files only in explicitly preserved regions; if the preservation policy is unknown, stop before making generation-sensitive changes.
  • Business logic must not directly operate HAL handles. For each driver, state initialization prerequisites, state/thread safety, timeouts, error returns, buffer ownership, and callback execution context.
  • Choose HAL, LL, or direct register access according to the existing project. Use LL/register access only for a documented timing, performance, power, or missing-HAL-capability reason, and contain it within a local driver.
  • In bare-metal firmware, use explicit events/state machines. In RTOS firmware, use tasks, queues, event groups, mutexes, and notifications to express ownership and synchronization. Do not hide timing problems with busy-waiting.
  • Use fixed-width integers, explicit units, and bounds checks. Avoid undocumented narrowing, recursion, large stack objects, and unnecessary dynamic allocation. Define an observable recovery or degradation path for timeouts, overflow, power loss, reset, and resource exhaustion.
  • Before changing clocks, validate HSE/HSI, PLL, AHB/APB prescalers, Flash wait states, SysTick, and affected peripheral kernel-clock sources. Do not infer actual UART, ADC, I2C, USB, or FDCAN frequency from SystemCoreClock alone.
  • Keep .ioc, startup files, linker scripts, HAL/CMSIS package versions, and code-generator version control records. Before regeneration, save a reversible state; after regeneration, review the diff, rebuild, and verify interrupts, DMA, clocks, and user-code regions.
  • For new modules and material architecture changes, keep dependencies flowing one way: application/task orchestration -> business module -> device driver -> bus interface/bus driver -> BSP/platform implementation. Equivalent existing layers are acceptable. Business modules must not depend on HAL, CMSIS, registers, or FreeRTOS internal types. Do not force a stable existing project into this structure, and do not push structural-refactoring suggestions at stable projects.
  • Separate buses, devices, and board resources: the bus layer owns HAL, DMA, IRQs, and bus locks; device drivers depend only on replaceable bus interfaces; the BSP owns concrete board connections. Reusable device drivers use explicit instance contexts rather than hidden global state tied to one peripheral.
  • If the project ships its own non-interactive automation scripts, prefer them for that project's flow; otherwise use the skill's scripts/devloop.py below (and prefer it whenever a machine-readable result is needed). Interactive, human-attended debugging stays with the user.

Hardware-in-the-Loop: build -> flash -> capture

Core principle: an agent cannot watch an interactive terminal. All on-target evidence is obtained by time-boxed capture into files, then reading the files. Never hold an interactive serial session; never claim board behavior without a captured log.

Scripts in scripts/ ($S = that directory; Windows 10/11, Python >= 3.10 with pyserial, STM32CubeProgrammer CLI from STM32CubeCLT or the Cube VS Code bundles, CMake+Ninja+GCC project, ST-Link SWD):

Script Purpose
find_tools.py locate cmake/ninja/GCC/Programmer CLI; prints JSON
devloop.py one-shot configure -> build -> flash -> capture; stops at the first failing stage with structured JSON
flash.py flash only; translates CLI failures into readable hints
serial_capture.py capture N seconds of UART into a UTF-8 file; VID:PID auto-detect, own lock file

Standard loop after a code change:

python "$S/devloop.py" --project <project_dir> --seconds 4 --ts

Read the final === DEVLOOP_RESULT === {...} line:

  • "stage": "build" with errors[] -> fix the FIRST reported error (file:line given), then re-run; do not fix several at once — chained errors cause misjudgment. undefined reference usually means a source file is missing from CMakeLists.
  • "stage": "flash" with hint -> follow the hint (SWD contact, connect-under-reset mode=UR, read protection RDP).
  • "stage": "capture" with silent: true -> the port opened but zero bytes arrived; walk the silent-tree in references/troubleshooting.md.
  • success -> Read uart.log (path in artifacts), verify the output matches expectations (boot banner, blink counters, ...), then decide whether to iterate.

Logs land in <project>/build/devloop_last/{configure,build,flash,uart}.log plus a machine-readable result.json. Partial runs: --no-flash --no-capture for build-only; standalone serial_capture.py to observe longer — it releases the port when done.

Hard rules for the loop:

  1. ST-Link and the COM port are exclusive resources. Before a new round, ensure no other holder (VSCode Serial Monitor in the status bar, PuTTY/MobaXterm, a leftover GDB or python serial process); otherwise capture reports Access denied.
  2. Do not assert DTR/RTS unless the fact files state the opposite convention; many boards wire reset to DTR.
  3. Every "done" claim quotes key lines from uart.log — evidence, not adjectives.
  4. devloop enforces its own timeouts (build 15 min, flash 3 min); never stack a second run while one is still in flight.
  5. The serial capture channel (VID:PID, baud, DTR convention, expected boot banner) lives in docs/stm32-ai/hardware-profile.md; recurring board/project pitfalls go to docs/stm32-ai-engineering/known-issues-and-decisions.md (Known Issues).

Hard Constraints

  • ISRs only acknowledge, minimally sample, clear/record status, and post an event. Do not block, wait for a lock, allocate dynamically, print, perform long computations, or process business logic directly.
  • Interrupt callbacks, RTOS APIs, and HAL APIs must match their execution context. Call RTOS APIs from an ISR only when ISR-safe conditions hold. In FreeRTOS projects, record __NVIC_PRIO_BITS, priority grouping, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY/configMAX_SYSCALL_INTERRUPT_PRIORITY, and the priority of every IRQ that calls a FromISR API in the resource table. Do not decide based only on prose such as “high” or “low” priority.
  • For DMA, define buffer lifetime, producer/consumer ownership, completion and error callbacks, length/alignment, double-buffering strategy, and clean/invalidate coherence on cached Cortex-M devices. Confirm every DMA buffer is in a linker memory region accessible by its DMA master. Maintain cache by address on cache-line boundaries and avoid touching adjacent data still in use. If using an MPU non-cacheable region, record its performance and shared-access impact.
  • Whenever adding or changing GPIO, DMA, IRQ, timers, clocks, or memory regions, update the resource table and affected driver contracts. Check alternate-function conflicts, DMA stream/channel/request conflicts, and IRQ-priority constraints.
  • For changes to boot, clocks, Flash, DMA, low power, or affected peripherals, determine whether the errata for the current part number and silicon revision apply. Record the conclusion and mitigation in the known-issues/decision record. “Not found” is not a substitute for checking the target revision. If the revision ID or applicable errata cannot be obtained, hardware verification remains incomplete; record it as a risk or blocker.
  • Do not perform work with unbounded latency in an ISR, critical section, or high-priority task. Keep critical sections short and state their maximum duration.
  • Watchdog, assertion, HardFault, MemManage, and BusFault paths must preserve context or provide a diagnosable signal. Do not swallow errors in an empty loop.
  • Without explicit user authorization and a backup of the current configuration, do not change option bytes, read/write protection, Secure/TrustZone state, OTP, or production keys. Treat these as hardware-state migrations and record old value, new value, recovery method, and board impact.

Verification Workflow

Choose verification depth by risk and record actual results:

  1. Static checks: formatting, compiler warnings, unused/uninitialized paths, integer width, concurrent access, out-of-bounds behavior, and error returns. Enable the highest project-supported warnings and static analysis for owned code. Set separate baselines for third-party, CMSIS/HAL, and generated code; do not pass by globally suppressing warnings or mechanically applying -Werror to external code.
  2. Host-runnable unit tests: hardware-independent logic such as protocol parsing, ring buffers, state machines, and checksums. New device drivers should replace their bus interface so mocks can verify register read/write sequences, conversion, timeout, and error paths; such tests do not replace target-hardware verification.
  3. Target build: use the command and configuration registered in toolchain-profile.md (or devloop.py stages); check MCU macros, optimization level, linker script, map file, Flash/RAM consumption, and stack/heap budget. Compare maps against the baseline and explain material growth.
  4. Hardware validation: use the registered flash/debug procedure — on Windows with ST-Link this is the HIL loop above (devloop.py) unless toolchain-profile.md overrides it. Start with power-up, clocks, reset, and serial logging, then validate peripheral behavior, faults, and repeated boot. For communications and sampling peripherals, test error, timeout, disconnect, or unplug recovery as well as the ideal path. For timing-sensitive paths, obtain evidence with a logic analyzer, oscilloscope, DWT/trace, or the project’s established measurement method. Logs aid diagnosis but do not prove timing. If hardware is unavailable, list unverified items.
  5. Regression checks: confirm generation boundaries, startup files, vector table, low-power/wake-up behavior, DMA/IRQ races, and upgrade compatibility remain intact. For clock, cache, or memory-region changes, also test cold boot and repeated resets.

Debugging Priorities

For a failure, HardFault, timeout, or corrupted data, first classify it as “not running,” “running but not triggered,” “triggered but not completed,” or “completed but corrupted.” Record reset cause, fault registers, PC/LR, active IRQ, clock tree, peripheral status registers, DMA counters, and cache attributes; then inspect power/pin multiplexing, baud rate/timing, interrupt-clear ordering, DMA ownership, and concurrent visibility. Decode faults by mapping the stacked PC/LR to an ELF with debug information, not by printing addresses alone. Prefer non-blocking, bandwidth-controlled trace/log channels; diagnostics must not change critical-path timing. Do not mask the root cause by first changing delays or increasing timeouts. For build/flash/capture-stage symptoms (silent port, garbled output, flash classify errors), follow references/troubleshooting.md before touching code.

Documentation and Delivery

Update applicable material for the change (skeletons for each record are in templates/delivery/):

  • Architecture or MCU choices: architecture-brief.md, chip-selection-matrix.md
  • Pin, DMA, IRQ, and clock resources: pin-resource-table.md
  • Driver interfaces and ownership: driver-contracts.md
  • Stack, heap, Flash, RAM, and real-time budget: resource-budget.md
  • ISR, DMA, and task relationships: task-isr-dma-matrix.md
  • Build, flash, smoke-test, fault-injection, and timing results: build-flash-record.md, test-matrix.md
  • Risks, limitations, unresolved issues, and recurring board quirks discovered during debug loops: known-issues-and-decisions.md
  • When a power target exists, record active/sleep current, wake latency, measurement conditions, and margin in resource-budget.md; do not invent a power budget when none is required.
  • Only for multicore projects or shared memory across bus masters, record shared regions, MPU/cache attributes, inter-core/host notifications, boot order, barriers, and ownership protocol.

Definition of done: the change scope is clear; build results are reproducible; target-board validation or its absence is recorded; relevant tests, resource records, and interface documentation are updated; generation boundaries remain intact; known risks and rollback are stated.

Output Requirements

State what changed, why the design was selected, which hardware/concurrency constraints apply, what was verified, and what remains unverified. For commands that cannot be run or missing hardware, state the gap directly; never invent logs, measurements, board models, or successful results.

常见问题

5 问
答案由本站依据条目字段整理
stm32-embedded-development怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_b759e7b0/stm32-embedded-development。安装方式为未标注。装完刷新技能列表或重开客户端。

stm32-embedded-development支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

stm32-embedded-development权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

stm32-embedded-development收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

stm32-embedded-development用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。