Bfd cubemx codegen

From Sonder4/STM32-BFD-Kit · View interactive version

Bfd cubemx codegen is an AI agent skill from the GitHub repository Sonder4/STM32-BFD-Kit. Use when a project already has a valid STM32CubeMX .ioc file and the goal is to regenerate CubeMX-managed code in place without changing clock, pin, peripheral, or toolchain configuration.

How to use this skill

Skill file

BFD CubeMX Codegen

Self-Improvement Loop (Required)

Use this skill to regenerate STM32CubeMX-managed project files from an existing .ioc only.

Quick Start

  1. Pass --ioc or --project-root.
  2. Use a repository-local log directory.
  3. Check the report and confirm the .ioc hash stayed unchanged.

Core Commands

python3 scripts/generate_from_ioc.py \
  --ioc RSCF_H7.ioc \
  --cubemx /home/xuan/STM32CubeMX/STM32CubeMX \
  --log-dir logs/skills
python3 scripts/generate_from_ioc.py \
  --project-root . \
  --log-dir logs/skills

Workflow

  1. Locate the .ioc file and STM32CubeMX executable.
  2. Hash the .ioc file before generation.
  3. Emit a temporary read-only CubeMX command file.
  4. Run CubeMX headless and store logs in the repository.
  5. Hash the .ioc again and fail if it changed.

Hard Rules

Outputs

Scripts

References

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.