BFD CubeMX Codegen
Self-Improvement Loop (Required)
- When this skill encounters a build, flash, debug, script-usage, or other workflow problem, do not stop at the local workaround after the issue is solved.
- Record the resolved issue and lesson in
BFD-Kit/.learnings/ERRORS.mdand/orBFD-Kit/.learnings/LEARNINGS.md; unresolved capability gaps go toBFD-Kit/.learnings/FEATURE_REQUESTS.md. - Promote reusable fixes into the affected BFD-Kit asset in the same task when feasible: update the relevant
SKILL.md, script, wrapper, or resource so the next run benefits by default. - When a learning is promoted into a skill or script, append a short entry to
BFD-Kit/.learnings/CHANGELOG.mdand mention the improvement in the task close-out.
Use this skill to regenerate STM32CubeMX-managed project files from an existing .ioc only.
Quick Start
- Pass
--iocor--project-root. - Use a repository-local log directory.
- Check the report and confirm the
.iochash 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
- Locate the
.iocfile andSTM32CubeMXexecutable. - Hash the
.iocfile before generation. - Emit a temporary read-only CubeMX command file.
- Run CubeMX headless and store logs in the repository.
- Hash the
.iocagain and fail if it changed.
Hard Rules
- Do not edit
.iocfiles in this skill. - Do not emit CubeMX commands that change configuration.
- Do not use this skill to create new projects or enable peripherals.
- Keep final logs and reports under
logs/skills/.
Outputs
logs/skills/cubemx_codegen_*.loglogs/skills/cubemx_codegen_*.md
Scripts
scripts/generate_from_ioc.py
References
references/readonly-boundary.md
Related Skills
bfd-ioc-parserbfd-project-initrscf-a-hal-editor