Skip to content

Reconstruct STM32 SVD files from CMSIS headers - #16

Merged
salkinium merged 15 commits into
mainfrom
feature/header2svd
Sep 15, 2026
Merged

salkinium merged 15 commits into
mainfrom
feature/header2svd

Conversation

@salkinium

@salkinium salkinium commented Sep 15, 2026

Copy link
Copy Markdown
Member

Reconstructs SVD files for all STM32 devices from the CMSIS device headers, which are compiled and therefore more accurate than the ST SVD files.

  • Extracts macro values and structure layouts by cross-compiling the headers with arm-none-eabi-gcc (with caching).
  • Matches the bit field macros to the structure members, covering 97.4% of all bit field macros.
  • Uses the CubeHAL sources to pair registers with bit field macros, restrict bit fields per instance via the IS_*_INSTANCE macros and add enumerated values.
  • Adds interrupts, descriptions and alternate registers for overlapping bit fields.
  • Optionally compares the result with the ST SVD files and writes a report of the differences.
  • Publishes the SVD files on the homepage with the SVD Explorer and attaches them to releases as svd-archive.zip.
  • Adds a CI workflow that generates all SVD files.

The first two commits fix CI failures that already exist on main: the knowledge graph model still unpacked the old CubeMX peripheral modules, and the Ruff action installed a newer Ruff that reports 352 issues in unrelated files.

@salkinium
salkinium merged commit a64911c into main Sep 15, 2026
10 checks passed
@salkinium
salkinium deleted the feature/header2svd branch September 15, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant