From 852b861fcb0b2869ca663a3acb4ac753befe4df5 Mon Sep 17 00:00:00 2001
From: Jonatan Antoni <jonatan.antoni@arm.com>
Date: Tue, 7 May 2024 14:44:14 +0200
Subject: [PATCH] Updates for upcoming release

---
 .../ubuntu-22.04/vcpkg-configuration.json     |  2 +-
 .github/workflows/core.yml                    | 47 +++------------
 .github/workflows/corevalidation.yml          | 57 ++++---------------
 CMSIS/Core/Include/cmsis_version.h            |  4 +-
 CMSIS/Core/Test/vcpkg-configuration.json      |  2 +-
 .../Project/vcpkg-configuration.json          |  4 +-
 .../Doxygen/Core/src/core_std_files.md        |  1 +
 7 files changed, 26 insertions(+), 91 deletions(-)

diff --git a/.devcontainer/ubuntu-22.04/vcpkg-configuration.json b/.devcontainer/ubuntu-22.04/vcpkg-configuration.json
index 0909193a8..8761aad3d 100644
--- a/.devcontainer/ubuntu-22.04/vcpkg-configuration.json
+++ b/.devcontainer/ubuntu-22.04/vcpkg-configuration.json
@@ -2,7 +2,7 @@
     "registries": [
       {
         "kind": "artifact",
-        "location": "https://artifacts.tools.arm.com/vcpkg-ce-registry/registry.zip",
+        "location": "https://artifacts.tools.arm.com/vcpkg-registry",
         "name": "arm"
       }
     ],
diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml
index dd9be07ad..457c07976 100644
--- a/.github/workflows/core.yml
+++ b/.github/workflows/core.yml
@@ -33,14 +33,6 @@ jobs:
         run: |
           pip install -r ./CMSIS/Core/Test/requirements.txt
 
-      - name: Cache vcpkg
-        uses: actions/cache@v4
-        with:
-          key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}-${{ matrix.compiler }}
-          restore-keys: |
-            vcpkg-${{ runner.os }}-${{ runner.arch }}-
-          path: /home/runner/.vcpkg
-
       - name: Install LLVM dependencies and tools
         working-directory: /home/runner
         run: |
@@ -48,48 +40,25 @@ jobs:
           sudo apt-get install libtinfo5 llvm-15-tools
           sudo ln -s /usr/bin/FileCheck-15 /usr/bin/FileCheck
     
-      - name: Prepare vcpkg env
-        working-directory: ./CMSIS/Core/Test
-        run: |
-          . <(curl https://aka.ms/vcpkg-init.sh -L)
-          vcpkg x-update-registry --all
-          vcpkg activate
+      - name: Activate vcpkg environment
+        uses: ARM-software/cmsis-actions/vcpkg@v1
+        with:
+          config: ./CMSIS/Core/Test/vcpkg-configuration.json
           
       - name: Activate Arm tool license
-        working-directory: ./CMSIS/Core/Test
-        run: |
-          . /home/runner/.vcpkg/vcpkg-init
-          vcpkg activate
-          if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
-            armlm activate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
-          else
-            armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
-          fi
+        uses: ARM-software/cmsis-actions/armlm@v1
+        with:
+          code: "${{ env.ARM_UBL_ACTIVATION_CODE }}"
 
       - uses: ammaraskar/gcc-problem-matcher@master
 
       - name: Run LIT
         working-directory: ./CMSIS/Core/Test
         run: |
-          . /home/runner/.vcpkg/vcpkg-init
-          vcpkg activate
-
           ./build.py lit
 
-      - name: Deactivate Arm tool license
-        if: always()
-        working-directory: ./CMSIS/Core/Test
-        run: |
-          . /home/runner/.vcpkg/vcpkg-init
-          vcpkg activate
-          if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
-            armlm deactivate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
-          else
-            armlm deactivate --product KEMDK-COM0
-          fi
-
       - name: Publish Test Results
-        if: ${{ !cancelled() && env.ARM_UBL_ACTIVATION_CODE }}
+        if: ${{ !cancelled() }}
         uses: EnricoMi/publish-unit-test-result-action@v2
         with:
           report_individual_runs: true
diff --git a/.github/workflows/corevalidation.yml b/.github/workflows/corevalidation.yml
index a802747d4..4a8d309e0 100644
--- a/.github/workflows/corevalidation.yml
+++ b/.github/workflows/corevalidation.yml
@@ -56,14 +56,6 @@ jobs:
         run: |
           pip install -r ./CMSIS/CoreValidation/Project/requirements.txt
 
-      - name: Cache vcpkg
-        uses: actions/cache@v4
-        with:
-          key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}-${{ matrix.compiler }}
-          restore-keys: |
-            vcpkg-${{ runner.os }}-${{ runner.arch }}-
-          path: /home/runner/.vcpkg
-
       - name: Install LLVM/Clang dependencies
         if: matrix.compiler == 'Clang'
         working-directory: /home/runner
@@ -71,24 +63,16 @@ jobs:
           sudo apt-get update
           sudo apt-get install libtinfo5
     
-      - name: Prepare vcpkg env
-        working-directory: ./CMSIS/CoreValidation/Project
-        run: |
-          . <(curl https://aka.ms/vcpkg-init.sh -L)
-          vcpkg x-update-registry --all
-          vcpkg activate
-
+      - name: Activate vcpkg environment
+        uses: ARM-software/cmsis-actions/vcpkg@v1
+        with:
+          config: ./CMSIS/CoreValidation/Project/vcpkg-configuration.json
+          
       - name: Activate Arm tool license
-        working-directory: ./CMSIS/CoreValidation/Project
-        run: |
-          . /home/runner/.vcpkg/vcpkg-init
-          vcpkg activate
-          if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
-            armlm activate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
-          else
-            armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
-          fi
-        
+        uses: ARM-software/cmsis-actions/armlm@v1
+        with:
+          code: "${{ env.ARM_UBL_ACTIVATION_CODE }}"
+      
       - name: Initialize CodeQL
         if: matrix.compiler == 'GCC'
         uses: github/codeql-action/init@v3
@@ -102,9 +86,6 @@ jobs:
       - name: Build
         working-directory: ./CMSIS/CoreValidation/Project
         run: |
-          . /home/runner/.vcpkg/vcpkg-init
-          vcpkg activate
-
           echo "Register local Cortex_DFP pack"
           cpackget add /home/runner/Cortex_DFP/ARM.Cortex_DFP.pdsc
 
@@ -116,29 +97,13 @@ jobs:
         uses: github/codeql-action/analyze@v3
 
       - name: Execute
-        if: ${{ env.ARM_UBL_ACTIVATION_CODE }}
         working-directory: ./CMSIS/CoreValidation/Project
-        run: |
-          . /home/runner/.vcpkg/vcpkg-init
-          vcpkg activate
-      
+        run: |     
           echo "Run test projects ..."
           ./build.py --verbose -c ${{ matrix.compiler }} -d "CM*" run || echo "::warning::==== Some configurations failed to run! ==="
 
-      - name: Deactivate Arm tool license
-        if: always()
-        working-directory: ./CMSIS/CoreValidation/Project
-        run: |
-          . /home/runner/.vcpkg/vcpkg-init
-          vcpkg activate
-          if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
-            armlm deactivate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
-          else
-            armlm deactivate --product KEMDK-COM0
-          fi
-
       - name: Archive Test Reports
-        if: ${{ !cancelled() && env.ARM_UBL_ACTIVATION_CODE }}
+        if: ${{ !cancelled() }}
         uses: actions/upload-artifact@v4
         with:
           name: test-results-${{ matrix.compiler }}
diff --git a/CMSIS/Core/Include/cmsis_version.h b/CMSIS/Core/Include/cmsis_version.h
index bdb65ddb4..849a8a4a1 100644
--- a/CMSIS/Core/Include/cmsis_version.h
+++ b/CMSIS/Core/Include/cmsis_version.h
@@ -31,13 +31,13 @@
 
 /*  CMSIS-Core(M) Version definitions */
 #define __CM_CMSIS_VERSION_MAIN  ( 6U)                                    /*!< \brief [31:16] CMSIS-Core(M) main version */
-#define __CM_CMSIS_VERSION_SUB   ( 0U)                                    /*!< \brief [15:0]  CMSIS-Core(M) sub version */
+#define __CM_CMSIS_VERSION_SUB   ( 1U)                                    /*!< \brief [15:0]  CMSIS-Core(M) sub version */
 #define __CM_CMSIS_VERSION       ((__CM_CMSIS_VERSION_MAIN << 16U) | \
                                    __CM_CMSIS_VERSION_SUB           )     /*!< \brief CMSIS Core(M) version number */
 
 /*  CMSIS-Core(A) Version definitions */
 #define __CA_CMSIS_VERSION_MAIN  ( 6U)                                    /*!< \brief [31:16] CMSIS-Core(A) main version */
-#define __CA_CMSIS_VERSION_SUB   ( 0U)                                    /*!< \brief [15:0]  CMSIS-Core(A) sub version */
+#define __CA_CMSIS_VERSION_SUB   ( 1U)                                    /*!< \brief [15:0]  CMSIS-Core(A) sub version */
 #define __CA_CMSIS_VERSION       ((__CA_CMSIS_VERSION_MAIN << 16U) | \
                                    __CA_CMSIS_VERSION_SUB          )      /*!< \brief CMSIS-Core(A) version number */
 
diff --git a/CMSIS/Core/Test/vcpkg-configuration.json b/CMSIS/Core/Test/vcpkg-configuration.json
index c63c199a9..0a78c764f 100644
--- a/CMSIS/Core/Test/vcpkg-configuration.json
+++ b/CMSIS/Core/Test/vcpkg-configuration.json
@@ -2,7 +2,7 @@
     "registries": [
       {
         "kind": "artifact",
-        "location": "https://artifacts.tools.arm.com/vcpkg-ce-registry/registry.zip",
+        "location": "https://artifacts.tools.arm.com/vcpkg-registry",
         "name": "arm"
       }
     ],
diff --git a/CMSIS/CoreValidation/Project/vcpkg-configuration.json b/CMSIS/CoreValidation/Project/vcpkg-configuration.json
index 59e74fba9..8761aad3d 100644
--- a/CMSIS/CoreValidation/Project/vcpkg-configuration.json
+++ b/CMSIS/CoreValidation/Project/vcpkg-configuration.json
@@ -2,7 +2,7 @@
     "registries": [
       {
         "kind": "artifact",
-        "location": "https://artifacts.keil.arm.com/vcpkg-ce-registry/registry.zip",
+        "location": "https://artifacts.tools.arm.com/vcpkg-registry",
         "name": "arm"
       }
     ],
@@ -11,7 +11,7 @@
       "arm:ninja": "^1.10.2",
       "arm:compilers/arm/armclang":"^6.22.0",
       "arm:compilers/arm/arm-none-eabi-gcc": "^13.2.1",
-      "arm:compilers/arm/llvm-embedded": "^17.0.1-0",
+      "arm:compilers/arm/llvm-embedded": "^18.1.3",
       "arm:tools/open-cmsis-pack/cmsis-toolbox": "^2.1.0-0",
       "arm:models/arm/avh-fvp": "11.22.39",
       "arm:debuggers/arm/armdbg": "^6.0.0"
diff --git a/CMSIS/Documentation/Doxygen/Core/src/core_std_files.md b/CMSIS/Documentation/Doxygen/Core/src/core_std_files.md
index d9e567436..5cd89c669 100644
--- a/CMSIS/Documentation/Doxygen/Core/src/core_std_files.md
+++ b/CMSIS/Documentation/Doxygen/Core/src/core_std_files.md
@@ -39,6 +39,7 @@ Header File            | Target Processor Core
  ┣ 📄 core_cm23.h      | Cortex-M23 processor
  ┣ 📄 core_cm33.h      | Cortex-M33 processor
  ┣ 📄 core_cm35p.h     | Cortex-M35P processor
+ ┣ 📄 core_cm52.h      | Cortex-M52 processor
  ┣ 📄 core_cm55.h      | Cortex-M55 processor
  ┣ 📄 core_cm85.h      | Cortex-M85 processor
  ┣ 📄 core_starmc1.h   | STAR-MC1 processor