From d7a6ee87eb748ac8432e75d77074914b214804c5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 May 2026 11:47:39 +0000 Subject: [PATCH 1/4] Add .github/copilot-instructions.md with CMSIS Core version sync reminder Agent-Logs-Url: https://github.com/ARM-software/CMSIS_6/sessions/487631cf-ec34-4ab8-9720-155ab97e8c40 Co-authored-by: JonatanAntoni <25795816+JonatanAntoni@users.noreply.github.com> --- .github/copilot-instructions.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000..6e94b45a --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,16 @@ +# Copilot Code Review Instructions + +## CMSIS Core version consistency + +The CMSIS Core version is defined in two places that must always be kept in sync: + +1. **`ARM.CMSIS.pdsc`** (repo root) — the `Cversion` attribute on each `` element. +2. **`CMSIS/Core/Include/cmsis_version.h`** — the preprocessor defines: + - `__CM_CMSIS_VERSION_MAIN` / `__CM_CMSIS_VERSION_SUB` (Cortex-M) + - `__CA_CMSIS_VERSION_MAIN` / `__CA_CMSIS_VERSION_SUB` (Cortex-A) + - `__CR_CMSIS_VERSION_MAIN` / `__CR_CMSIS_VERSION_SUB` (Cortex-R) + +**Whenever a pull request modifies either of these files, verify that the version is consistent across both locations and remind the author to update the other location if it has not been updated.** + +- If `ARM.CMSIS.pdsc` is changed: check that the `Cversion` values for the CMSIS CORE components match the `_MAIN` and `_SUB` defines in `cmsis_version.h`. +- If `CMSIS/Core/Include/cmsis_version.h` is changed: check that the `_MAIN` and `_SUB` version defines match the `Cversion` attributes in `ARM.CMSIS.pdsc`. From ece9f35c4fcbd317fe33ab612827d4c0d1b7d479 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 May 2026 11:57:00 +0000 Subject: [PATCH 2/4] Refine copilot-instructions.md: map each CORE component condition to its version macros Agent-Logs-Url: https://github.com/ARM-software/CMSIS_6/sessions/57ccccea-30f1-4a2f-81b1-5691cfce0672 Co-authored-by: JonatanAntoni <25795816+JonatanAntoni@users.noreply.github.com> --- .github/copilot-instructions.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 6e94b45a..a97cb539 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -4,13 +4,24 @@ The CMSIS Core version is defined in two places that must always be kept in sync: -1. **`ARM.CMSIS.pdsc`** (repo root) — the `Cversion` attribute on each `` element. -2. **`CMSIS/Core/Include/cmsis_version.h`** — the preprocessor defines: +1. **`ARM.CMSIS.pdsc`** (repo root) — three specific `` entries, each identified by its `condition` attribute: + - `condition="ARMv6_7_8-M Device"` → Cortex-M component (maps to `__CM_` macros) + - `condition="ARMv7_8-A Device"` → Cortex-A component (maps to `__CA_` macros) + - `condition="ARMv7-R Device"` → Cortex-R component (maps to `__CR_` macros) + +2. **`CMSIS/Core/Include/cmsis_version.h`** — the preprocessor defines, grouped by device profile: - `__CM_CMSIS_VERSION_MAIN` / `__CM_CMSIS_VERSION_SUB` (Cortex-M) - `__CA_CMSIS_VERSION_MAIN` / `__CA_CMSIS_VERSION_SUB` (Cortex-A) - `__CR_CMSIS_VERSION_MAIN` / `__CR_CMSIS_VERSION_SUB` (Cortex-R) **Whenever a pull request modifies either of these files, verify that the version is consistent across both locations and remind the author to update the other location if it has not been updated.** -- If `ARM.CMSIS.pdsc` is changed: check that the `Cversion` values for the CMSIS CORE components match the `_MAIN` and `_SUB` defines in `cmsis_version.h`. -- If `CMSIS/Core/Include/cmsis_version.h` is changed: check that the `_MAIN` and `_SUB` version defines match the `Cversion` attributes in `ARM.CMSIS.pdsc`. +The version check must be done per device profile (A, M, R): + +| `ARM.CMSIS.pdsc` component (`condition`) | `cmsis_version.h` macros | +|---|---| +| `Cversion` on `condition="ARMv6_7_8-M Device"` | `__CM_CMSIS_VERSION_MAIN` . `__CM_CMSIS_VERSION_SUB` | +| `Cversion` on `condition="ARMv7_8-A Device"` | `__CA_CMSIS_VERSION_MAIN` . `__CA_CMSIS_VERSION_SUB` | +| `Cversion` on `condition="ARMv7-R Device"` | `__CR_CMSIS_VERSION_MAIN` . `__CR_CMSIS_VERSION_SUB` | + +For example, if `Cversion="6.2.0"` for the `ARMv6_7_8-M Device` component, then `__CM_CMSIS_VERSION_MAIN` must be `6` and `__CM_CMSIS_VERSION_SUB` must be `2`. Each profile's version must be checked independently. From 9fcec787157b3866360c4fa74d7b7c2aeb0e87f6 Mon Sep 17 00:00:00 2001 From: Jonatan Antoni Date: Thu, 21 May 2026 14:14:24 +0200 Subject: [PATCH 3/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a97cb539..3029687c 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -20,8 +20,10 @@ The version check must be done per device profile (A, M, R): | `ARM.CMSIS.pdsc` component (`condition`) | `cmsis_version.h` macros | |---|---| -| `Cversion` on `condition="ARMv6_7_8-M Device"` | `__CM_CMSIS_VERSION_MAIN` . `__CM_CMSIS_VERSION_SUB` | -| `Cversion` on `condition="ARMv7_8-A Device"` | `__CA_CMSIS_VERSION_MAIN` . `__CA_CMSIS_VERSION_SUB` | -| `Cversion` on `condition="ARMv7-R Device"` | `__CR_CMSIS_VERSION_MAIN` . `__CR_CMSIS_VERSION_SUB` | +| `Cversion` on `condition="ARMv6_7_8-M Device"` | first component → `__CM_CMSIS_VERSION_MAIN`, second component → `__CM_CMSIS_VERSION_SUB` | +| `Cversion` on `condition="ARMv7_8-A Device"` | first component → `__CA_CMSIS_VERSION_MAIN`, second component → `__CA_CMSIS_VERSION_SUB` | +| `Cversion` on `condition="ARMv7-R Device"` | first component → `__CR_CMSIS_VERSION_MAIN`, second component → `__CR_CMSIS_VERSION_SUB` | -For example, if `Cversion="6.2.0"` for the `ARMv6_7_8-M Device` component, then `__CM_CMSIS_VERSION_MAIN` must be `6` and `__CM_CMSIS_VERSION_SUB` must be `2`. Each profile's version must be checked independently. +Only the first two `Cversion` components are checked here. If `Cversion` includes a third patch/revision component (for example, `6.2.0`), treat it as intentionally not mapped in `cmsis_version.h` unless a corresponding patch/revision macro is added and documented. + +For example, if `Cversion="6.2.0"` for the `ARMv6_7_8-M Device` component, then `__CM_CMSIS_VERSION_MAIN` must be `6` and `__CM_CMSIS_VERSION_SUB` must be `2`; the trailing `.0` is not checked by these instructions. Each profile's version must be checked independently. From b7b2b4ff9f6fc936bc68e2aaa4ae5c93057608af Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 May 2026 12:36:00 +0000 Subject: [PATCH 4/4] Extend CMSIS Core version sync instructions to Doxygen and history files Agent-Logs-Url: https://github.com/ARM-software/CMSIS_6/sessions/95d9c060-a565-4973-927a-dd5108963576 Co-authored-by: JonatanAntoni <25795816+JonatanAntoni@users.noreply.github.com> --- .github/copilot-instructions.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 3029687c..1b88443a 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -2,7 +2,7 @@ ## CMSIS Core version consistency -The CMSIS Core version is defined in two places that must always be kept in sync: +The CMSIS Core version is defined in multiple places that must always be kept in sync: 1. **`ARM.CMSIS.pdsc`** (repo root) — three specific `` entries, each identified by its `condition` attribute: - `condition="ARMv6_7_8-M Device"` → Cortex-M component (maps to `__CM_` macros) @@ -14,7 +14,12 @@ The CMSIS Core version is defined in two places that must always be kept in sync - `__CA_CMSIS_VERSION_MAIN` / `__CA_CMSIS_VERSION_SUB` (Cortex-A) - `__CR_CMSIS_VERSION_MAIN` / `__CR_CMSIS_VERSION_SUB` (Cortex-R) -**Whenever a pull request modifies either of these files, verify that the version is consistent across both locations and remind the author to update the other location if it has not been updated.** +3. **`CMSIS/Documentation/Doxygen/Core/Core.dxy.in`** — `PROJECT_NUMBER` for Cortex-M documentation. +4. **`CMSIS/Documentation/Doxygen/Core_A/Core_A.dxy.in`** — `PROJECT_NUMBER` for Cortex-A documentation. +5. **`CMSIS/Documentation/Doxygen/Core/src/history.md`** — revision table row for Cortex-M version changelog. +6. **`CMSIS/Documentation/Doxygen/Core_A/src/history.md`** — revision table row for Cortex-A version changelog. + +**Whenever a pull request modifies any of these files, verify that the version is consistent across the related locations and remind the author to update missing synchronized locations.** The version check must be done per device profile (A, M, R): @@ -24,6 +29,14 @@ The version check must be done per device profile (A, M, R): | `Cversion` on `condition="ARMv7_8-A Device"` | first component → `__CA_CMSIS_VERSION_MAIN`, second component → `__CA_CMSIS_VERSION_SUB` | | `Cversion` on `condition="ARMv7-R Device"` | first component → `__CR_CMSIS_VERSION_MAIN`, second component → `__CR_CMSIS_VERSION_SUB` | -Only the first two `Cversion` components are checked here. If `Cversion` includes a third patch/revision component (for example, `6.2.0`), treat it as intentionally not mapped in `cmsis_version.h` unless a corresponding patch/revision macro is added and documented. +Additional synchronization rules: +- Cortex-M (`ARMv6_7_8-M Device`): + - `Cversion` in `ARM.CMSIS.pdsc` ↔ `__CM_CMSIS_VERSION_MAIN`/`__CM_CMSIS_VERSION_SUB` ↔ `PROJECT_NUMBER` in `Core.dxy.in` ↔ version row in `Core/src/history.md`. +- Cortex-A (`ARMv7_8-A Device`): + - `Cversion` in `ARM.CMSIS.pdsc` ↔ `__CA_CMSIS_VERSION_MAIN`/`__CA_CMSIS_VERSION_SUB` ↔ `PROJECT_NUMBER` in `Core_A.dxy.in` ↔ version row in `Core_A/src/history.md`. +- Cortex-R (`ARMv7-R Device`): + - Check synchronization only between `ARM.CMSIS.pdsc` and `cmsis_version.h` (`__CR_*` macros). No documentation synchronization is required yet. + +Only the first two `Cversion` components are checked against `cmsis_version.h`. If `Cversion` includes a third patch/revision component (for example, `6.2.0`), treat it as intentionally not mapped in `cmsis_version.h` unless a corresponding patch/revision macro is added and documented. For example, if `Cversion="6.2.0"` for the `ARMv6_7_8-M Device` component, then `__CM_CMSIS_VERSION_MAIN` must be `6` and `__CM_CMSIS_VERSION_SUB` must be `2`; the trailing `.0` is not checked by these instructions. Each profile's version must be checked independently.