mcu-cubemx

Modifies STM32 .ioc configurations and regenerates initialization code via STM32CubeMX on Windows.

5|1|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/BakeSheep/EmberProbe-MCU-Flash-Debug --skill mcu-cubemx-bakesheep
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcu-cubemx
Source: https://github.com/BakeSheep/EmberProbe-MCU-Flash-Debug/tree/main/skills/mcu-cubemx
Command: npx skills add https://github.com/BakeSheep/EmberProbe-MCU-Flash-Debug --skill mcu-cubemx-bakesheep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Changing STM32 pin, peripheral, clock, or initialization settings normally requires manual edits in STM32CubeMX and careful regeneration without losing hand-written code. This Skill automates that workflow through the EmberProbe Agent Bridge, with authorization controls, baseline drift detection, and recovery snapshots. ## Core Features & Use Cases - Candidate-based configuration editing: Generate a candidate .ioc file from JSON property changes or deletions without touching the original project, then preview a categorized diff before applying. - Two-stage authorized regeneration: Prepare and inspect changes first, then execute only after explicit one-time or 24-hour user confirmation, with persisted request IDs for safe retry after network timeouts. - Consistency checking: Run quick manifest-based checks or deep isolated regeneration checks to detect IOC/source drift and stale generated files without mutating the project. - Use Case: You need to change USART2 baud rate to 115200 and regenerate initialization code. The Skill creates a candidate file, shows the diff, asks for your approval, runs CubeMX headlessly, protects your USER CODE blocks, and reports the actual changed files. ## Quick Start Ask the agent to update a peripheral setting in your .ioc configuration and regenerate the STM32 initialization code, then approve the shown changes when prompted.

Frequently Asked Questions about mcu-cubemx

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

FAQPage Schema
How do I regenerate STM32 initialization code after changing .ioc settings?▼

Create a candidate file with --generate-candidate using JSON property changes, run --prepare to review the diff, then approve and run --start with the confirmation ID. CubeMX regenerates code in isolated copies and writes back with a recovery snapshot.

How do I change STM32 pin or peripheral configuration without editing the .ioc directly?▼

Use --generate-candidate with --changes as a JSON object of decoded property names and values, or --changes-file pointing to a workspace JSON file. The original .ioc is never edited directly, and unrelated properties are preserved.

Does this work on macOS or Linux, or without CubeMX installed?▼

No. Generation requires Windows, the EmberProbe Agent Bridge, an existing configured .ioc, and a matching standalone STM32CubeMX installation with bundled Java and the installed firmware package. The quick --check mode works even without CubeMX installed.

What happens if the CubeMX operation times out or the network drops?▼

The CLI persists request IDs bound to candidate content hashes, so re-running the exact same --start command safely resumes or returns the original operation. Query --status with the operation ID first, and never start a new request while one may still be running.

Will regeneration overwrite my hand-written code in the project?▼

Code inside preserved USER CODE blocks is kept. The extension generates baseline and candidate copies, checks for hand edits and concurrent changes, and stops on baseline drift so you can migrate hand-written logic separately before retrying.

What are the limitations of the CubeMX regeneration workflow?▼

It does not migrate CubeMX versions, install firmware packages, change chips or toolchains, or support external generation paths, links, hooks, and custom templates. Successful generation also does not prove compilation or hardware correctness.