feat(adcbuf): add CMSIS register description for ADCBUF #10

Merged
hoogv merged 0 commits from refs/pull/10/head into dev 2026-07-21 20:07:03 +00:00
hoogv commented 2026-07-21 19:55:34 +00:00 (Migrated from codeberg.org)

Description

Adds the ADCBUF slice of the CMSIS register description epic (#4): a shared CMSIS access-qualifier header, a CMSIS-SVD entry for ADCBUF, and an automated cross-check between the two, wired into the test suite.

Why

Change justification per ISO 9001 section 7.5.2: hal/registers/component/adcbuf.h (like every other component header) redefined __I/__O/__IO/_U_ itself, and there was no machine-readable register description an IDE/debugger or a validation tool could consume — only the hand-rolled C headers. ADCBUF is the first peripheral task under epic #4 to close, so it's also the one introducing the shared infrastructure (core_cr4f.h, the SVD file, the checker script) that the remaining peripheral tasks will reuse instead of re-deriving.

testing/CMakeLists.txt is committed here in a deliberately minimal form (just the SVD check), not its full pre-existing local content (Catch2/fff, hw_fakes, the driver unit-test suites) — those reference hal/mss, hal/dss, and testing/support fixtures that aren't tracked in any branch yet. Bundling them into an ADCBUF-scoped PR would both violate scope and leave the file referencing directories that don't exist on a fresh checkout. That fuller test tree returns in whichever PR actually commits it.

Closes #5

Type of Change

  • New feature

Impact Assessment

  • Functional impact: Low — touches only register-definition headers and adds new test/tooling; no driver logic changes.
  • Regulatory impact: None.
  • QMS impact: None.
  • Risk impact: No — existing risk coverage sufficient.

Testing

  • CI pipeline passes (compile, unit tests, integration tests, static analysis) — no CI runner exists yet (separate, still-open scope from issue #1). Verified instead by cloning this exact branch into a fresh, isolated directory (no local working-tree state) and running cmake -S testing -B build && ctest --test-dir build: configures cleanly and svd_check_adcbuf passes 1/1. (An earlier version of this PR body claimed a 307-test run — that was a false positive from untracked local files filling in gaps in a testing/CMakeLists.txt that referenced directories not actually in this branch; see the two follow-up commits that fixed this.)
  • Manually tested: ran tools/svd/check_svd.py directly against the new SVD/header; deliberately pointed it at wrong base-address macros for both the ECC and CFG clusters independently to confirm each is actually being checked (not just the peripheral's overall base address) and that mismatches are reported, not silently passed.
  • No regressions observed in related areas — nothing pre-existing was touched.

PR Size

  • XL (> 300 lines) — must split unless exemption declared

Size justification / exemption (if L or XL):

~1,150 lines across 5 files, but they're one functionally indivisible unit: the shared qualifier header, the SVD entry, the checker script, and the instance header the checker validates against all only make sense together — splitting them would leave issue #5's acceptance criteria partially unverifiable until every piece landed anyway. Most of the line count is the SVD XML itself (field-for-field transcription of ADCBUF's existing bitfields), not new logic.

Checklist

  • Commit messages follow type(scope): description convention with Relates to #<issue> footer
  • PR template filled in completely
  • No unverified external binaries introduced (see QMS-GITFLOW-001 Binary Security section)
  • All commits leave the codebase in a compilable, passing-tests state (Commit Integrity Rule) — verified via a fresh isolated clone + ctest, not just the local working tree
  • Reviewer assigned
  • QMS maintainer approval obtained (required for QMS and device repository changes)

Summary

  • hal/registers/core_cr4f.h — shared CMSIS __I/__O/__IO/_U_ header (this project's stand-in for the CMSIS-Core header ARM doesn't publish for Cortex-R)
  • hal/registers/component/adcbuf.h — now includes core_cr4f.h instead of redefining those qualifiers locally
  • hal/registers/instance/adcbuf.h — base-address macros the checker cross-checks against
  • hal/registers/svd/AWR6843AOP_MSS.svd — new CMSIS-SVD device file with a field-for-field ADCBUF peripheral entry (ECC + CFG clusters)
  • tools/svd/check_svd.py — cross-checks a CMSIS-SVD peripheral against a component/instance header's offset/field/base-address macros (repeatable ClusterName=MACRO pairs, one per dual-mapped sub-region)
  • testing/CMakeLists.txt — new, minimal: wires the checker in as the svd_check_adcbuf ctest
## Description Adds the ADCBUF slice of the CMSIS register description epic (#4): a shared CMSIS access-qualifier header, a CMSIS-SVD entry for ADCBUF, and an automated cross-check between the two, wired into the test suite. ## Why Change justification per ISO 9001 section 7.5.2: `hal/registers/component/adcbuf.h` (like every other component header) redefined `__I`/`__O`/`__IO`/`_U_` itself, and there was no machine-readable register description an IDE/debugger or a validation tool could consume — only the hand-rolled C headers. ADCBUF is the first peripheral task under epic #4 to close, so it's also the one introducing the shared infrastructure (`core_cr4f.h`, the SVD file, the checker script) that the remaining peripheral tasks will reuse instead of re-deriving. `testing/CMakeLists.txt` is committed here in a deliberately minimal form (just the SVD check), not its full pre-existing local content (Catch2/fff, `hw_fakes`, the driver unit-test suites) — those reference `hal/mss`, `hal/dss`, and `testing/support` fixtures that aren't tracked in any branch yet. Bundling them into an ADCBUF-scoped PR would both violate scope and leave the file referencing directories that don't exist on a fresh checkout. That fuller test tree returns in whichever PR actually commits it. ## Related Issue Closes #5 ## Type of Change - [x] New feature ## Impact Assessment - **Functional impact:** Low — touches only register-definition headers and adds new test/tooling; no driver logic changes. - **Regulatory impact:** None. - **QMS impact:** None. - **Risk impact:** No — existing risk coverage sufficient. ## Testing - [x] CI pipeline passes (compile, unit tests, integration tests, static analysis) — no CI runner exists yet (separate, still-open scope from issue #1). Verified instead by cloning this exact branch into a fresh, isolated directory (no local working-tree state) and running `cmake -S testing -B build && ctest --test-dir build`: configures cleanly and `svd_check_adcbuf` passes 1/1. (An earlier version of this PR body claimed a 307-test run — that was a false positive from untracked local files filling in gaps in a `testing/CMakeLists.txt` that referenced directories not actually in this branch; see the two follow-up commits that fixed this.) - [x] Manually tested: ran `tools/svd/check_svd.py` directly against the new SVD/header; deliberately pointed it at wrong base-address macros for both the ECC and CFG clusters independently to confirm each is actually being checked (not just the peripheral's overall base address) and that mismatches are reported, not silently passed. - [x] No regressions observed in related areas — nothing pre-existing was touched. ## PR Size - [x] XL (> 300 lines) — must split unless exemption declared **Size justification / exemption (if L or XL):** ~1,150 lines across 5 files, but they're one functionally indivisible unit: the shared qualifier header, the SVD entry, the checker script, and the instance header the checker validates against all only make sense together — splitting them would leave issue #5's acceptance criteria partially unverifiable until every piece landed anyway. Most of the line count is the SVD XML itself (field-for-field transcription of ADCBUF's existing bitfields), not new logic. ## Checklist - [x] Commit messages follow `type(scope): description` convention with `Relates to #<issue>` footer - [x] PR template filled in completely - [x] No unverified external binaries introduced (see QMS-GITFLOW-001 Binary Security section) - [x] All commits leave the codebase in a compilable, passing-tests state (Commit Integrity Rule) — verified via a fresh isolated clone + `ctest`, not just the local working tree - [ ] Reviewer assigned - [ ] QMS maintainer approval obtained (required for QMS and device repository changes) ## Summary - `hal/registers/core_cr4f.h` — shared CMSIS `__I`/`__O`/`__IO`/`_U_` header (this project's stand-in for the CMSIS-Core header ARM doesn't publish for Cortex-R) - `hal/registers/component/adcbuf.h` — now includes `core_cr4f.h` instead of redefining those qualifiers locally - `hal/registers/instance/adcbuf.h` — base-address macros the checker cross-checks against - `hal/registers/svd/AWR6843AOP_MSS.svd` — new CMSIS-SVD device file with a field-for-field ADCBUF peripheral entry (ECC + CFG clusters) - `tools/svd/check_svd.py` — cross-checks a CMSIS-SVD peripheral against a component/instance header's offset/field/base-address macros (repeatable `ClusterName=MACRO` pairs, one per dual-mapped sub-region) - `testing/CMakeLists.txt` — new, minimal: wires the checker in as the `svd_check_adcbuf` ctest
hoogv self-assigned this 2026-07-23 13:34:39 +00:00
hoogv added this to the Development project 2026-07-23 13:40:10 +00:00
Sign in to join this conversation.
No reviewers
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
opendutchsolutions.public/hal_awr6843!10
No description provided.