MLECO-3225: Using official support for Arm Cortex-M85 CPU.

 * CMake version requirement bumped up to 3.21.0
   * CMake 3.22.4 installed in the local Python virtualenv
 * CPU flags updated in toolchain files.
 * Using __ARM_FEATURE_DSP instead of potentially defining
   ARM_MATH_DSP wrongly.
 * CMake project version bumped up to 22.05.0

Changes also made for MLECO-3107 (pack generation):

 * TensorFlow Lite Micro CMSIS-pack version updated to
   1.22.02.
 * Change to using __ARM_FEATURE_DSP will also help the
   generated pack.

Partial changes for MLECO-3095:

 * CMSIS updated to version post 5.9.0
 * TensorFlow Lite Micro updated to latest available
 * Ethos-U driver and core-platform repositories updated
   to 20.05_rc2 tags.

Change-Id: I012c9e65897aed8ce589cff9bfe3a19efc3edeb9
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index feb69b6..150c668 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 #----------------------------------------------------------------------------
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 include(ExternalProject)
 
 # Build in release mode by default
@@ -83,7 +83,7 @@
 endif()
 
 project(arm_ml_embedded_evaluation_kit
-        VERSION     22.02.0
+        VERSION     22.05.0
         DESCRIPTION "ARM ML Embedded Evaluation Kit"
         LANGUAGES   C CXX ASM)
 
@@ -227,7 +227,8 @@
         arm_math
         hal
         profiler
-        tensorflow-lite-micro)
+        tensorflow-lite-micro
+        common_api)
 
     # If an API exists for this use case, include the projects here and add to
     # the library list.
diff --git a/Readme.md b/Readme.md
index 4567a72..38942d0 100644
--- a/Readme.md
+++ b/Readme.md
@@ -1,27 +1,31 @@
 
-***NOTE: The default branch for this repository is now the main branch, the master branch is deprecated, and will be removed after 22.05 release. Please ensure any changes are added to the main branch.***
-
 # Arm® ML embedded evaluation kit
 
 This repository is for building and deploying Machine Learning (ML) applications targeted for Arm® Cortex®-M and Arm®
 Ethos™-U NPU.
 To run evaluations using this software, we suggest using:
 
-- an [MPS3 board](https://developer.arm.com/tools-and-software/development-boards/fpga-prototyping-boards/mps3) that runs a combination of
-the [Arm® Cortex™-M55 processor](https://www.arm.com/products/silicon-ip-cpu/cortex-m/cortex-m55) and the
-[Arm® Ethos™-U55 NPU](https://www.arm.com/products/silicon-ip-cpu/ethos/ethos-u55)
-- a [Corstone™-300 MPS3 based Fixed Virtual Platform (FVP)](https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps)
+- an [MPS3 board](https://developer.arm.com/tools-and-software/development-boards/fpga-prototyping-boards/mps3) with
+  [Arm® Corstone-300](https://developer.arm.com/Processors/Corstone-300) or [Arm® Corstone-310](https://developer.arm.com/Processors/Corstone-310) implementations.
+  - Arm® Corstone-300 runs a combination of
+  the [Arm® Cortex™-M55 processor](https://www.arm.com/products/silicon-ip-cpu/cortex-m/cortex-m55) and the
+  [Arm® Ethos™-U55 NPU](https://www.arm.com/products/silicon-ip-cpu/ethos/ethos-u55).
+  - Arm® Corstone-310 runs a combination of
+      the [Arm® Cortex™-M85 processor](https://www.arm.com/products/silicon-ip-cpu/cortex-m/cortex-m85) and the
+      [Arm® Ethos™-U55 NPU](https://www.arm.com/products/silicon-ip-cpu/ethos/ethos-u55).
+
+- a [Arm® Corstone™-300 MPS3 based Fixed Virtual Platform (FVP)](https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps)
   that offers a choice of the [Arm® Ethos™-U55 NPU](https://www.arm.com/products/silicon-ip-cpu/ethos/ethos-u55)
   or [Arm® Ethos™-U65 NPU](https://www.arm.com/products/silicon-ip-cpu/ethos/ethos-u65) software fast model in combination of
   the new [Arm® Cortex™-M55 processor](https://www.arm.com/products/silicon-ip-cpu/cortex-m/cortex-m55). You can also take advantage of
-  [Arm Virtual Hardware](https://www.arm.com/products/development-tools/simulation/virtual-hardware) and [run the Fixed Virtual Platform
-  in the cloud](./docs/sections/arm_virtual_hardware.md).
+  [Arm Virtual Hardware](https://www.arm.com/products/development-tools/simulation/virtual-hardware) (AVH) and [run the Fixed Virtual Platform
+  in the cloud](./docs/sections/arm_virtual_hardware.md). An FVP implementation of Arm® Corstone-310 is also available via AVH.
 
 ## Overview of the evaluation kit
 
-The purpose of this evaluation kit is to allow users to develop software and test the performance of the Ethos-U NPU and
-Cortex-M55 CPU. The Ethos-U NPU is a new class of machine learning (ML) processor, specifically designed to accelerate
-computation for ML workloads in constrained embedded and IoT devices. The product is optimized to execute
+The purpose of this evaluation kit is to allow users to develop software and test the performance of the Arm® Ethos-U NPU and
+Arm® Cortex-M CPUs for ML workloads. The Ethos-U NPU is a new class of machine learning (ML) processor, specifically designed
+to accelerate ML computation in constrained embedded and IoT devices. The product is optimized to execute
 mathematical operations efficiently that are commonly used in ML algorithms, such as convolutions or activation functions.
 
 ## ML use cases
@@ -116,7 +120,7 @@
 
 - The contribution have certified origin and give us your permission. To manage this process we use
   [Developer Certificate of Origin (DCO) V1.1](https://developercertificate.org/).
-  To indicate that contributors agree to the the terms of the DCO, it's necessary "sign off" the
+  To indicate that contributors agree to the terms of the DCO, it's necessary "sign off" the
   contribution by adding a line with name and e-mail address to every git commit message:
 
   ```log
@@ -169,7 +173,7 @@
 ### Code Reviews
 
 Contributions must go through code review. Code reviews are performed through the
-[mlplatform.org Gerrit server](https://review.mlplatform.org). Contributors need to signup to this
+[mlplatform.org Gerrit server](https://review.mlplatform.org). Contributors need to sign up to this
 Gerrit server with their GitHub account credentials.
 In order to be merged a patch needs to:
 
diff --git a/build_default.py b/build_default.py
index e37a9ad..3a308a9 100755
--- a/build_default.py
+++ b/build_default.py
@@ -86,7 +86,7 @@
     # 2. Download models if specified
     if download_resources is True:
         logging.info("Downloading resources.")
-        set_up_resources(
+        (download_dir, env_path) = set_up_resources(
             run_vela_on_models=run_vela_on_models,
             additional_npu_config_names=[npu_config_name],
             additional_requirements_file=current_file_dir / "scripts" / "py" / "requirements.txt"
@@ -114,26 +114,25 @@
 
     logpipe = PipeLogging(logging.INFO)
 
-    os.chdir(build_dir)
     cmake_toolchain_file = current_file_dir / "scripts" / "cmake" / "toolchains" / toolchain_file_name
-
+    cmake_path = env_path / "bin" / "cmake"
     cmake_command = (
-        f"cmake .. -DTARGET_PLATFORM={target_platform}"
+        f"{cmake_path} -B {build_dir} -DTARGET_PLATFORM={target_platform}"
         + f" -DTARGET_SUBSYSTEM={target_subsystem}"
         + f" -DCMAKE_TOOLCHAIN_FILE={cmake_toolchain_file}"
         + f" -DETHOS_U_NPU_ID={ethos_u_cfg.ethos_u_npu_id}"
         + f" -DETHOS_U_NPU_CONFIG_ID={ethos_u_cfg.ethos_u_config_id}"
     )
 
-    logging.info(cmake_command)
+    logging.info(f"\n\n\n{cmake_command}\n\n\n")
     state = subprocess.run(
         cmake_command, shell=True, stdout=logpipe, stderr=subprocess.STDOUT
     )
 
-    make_command = f"make -j{make_jobs}"
+    make_command = f"{cmake_path} --build {build_dir} -j{make_jobs}"
     if make_verbose:
-        make_command += " VERBOSE=1"
-    logging.info(make_command)
+        make_command += "--verbose"
+    logging.info(f"\n\n\n{make_command}\n\n\n")
     state = subprocess.run(
         make_command, shell=True, stdout=logpipe, stderr=subprocess.STDOUT
     )
diff --git a/dependencies/cmsis b/dependencies/cmsis
index 9b5df64..6a18a74 160000
--- a/dependencies/cmsis
+++ b/dependencies/cmsis
@@ -1 +1 @@
-Subproject commit 9b5df640c777563919affb4e9201c96c657adbb2
+Subproject commit 6a18a74b46ac1501a7a750dd83b8bfb06fb24504
diff --git a/dependencies/core-driver b/dependencies/core-driver
index 24455ee..1c0e7ae 160000
--- a/dependencies/core-driver
+++ b/dependencies/core-driver
@@ -1 +1 @@
-Subproject commit 24455eedb9e8939f8a28ca0101a6f2d171e1b2f9
+Subproject commit 1c0e7ae4bbf8ee81411b4c2e02c70ca892d17390
diff --git a/dependencies/core-platform b/dependencies/core-platform
index 456dbb7..deb120c 160000
--- a/dependencies/core-platform
+++ b/dependencies/core-platform
@@ -1 +1 @@
-Subproject commit 456dbb742d1b04c346047b18c993b5e7cd699aba
+Subproject commit deb120cb49f21929455f622d6024de0717791f45
diff --git a/dependencies/tensorflow b/dependencies/tensorflow
index 1a0287f..07821fd 160000
--- a/dependencies/tensorflow
+++ b/dependencies/tensorflow
@@ -1 +1 @@
-Subproject commit 1a0287fc5fa81fa6aa1dcfb0c5b2e01f74164393
+Subproject commit 07821fd35e8aaca66855fa07b402325be3b70398
diff --git a/docs/sections/building.md b/docs/sections/building.md
index 8fe9f8a..c135afd 100644
--- a/docs/sections/building.md
+++ b/docs/sections/building.md
@@ -44,6 +44,8 @@
     Component: ARM Compiler 6.16
     ```
 
+> **Note:** To compile for Arm® Cortex™-M85 CPU (default CPU for Arm® Corstone-310), 6.18 is the minimum version required.
+
   Alternatively, use:
 
     ```commandline
@@ -63,19 +65,24 @@
 
 - If you are using the proprietary Arm Compiler, ensure that the compiler license has been correctly configured.
 
-- CMake version 3.16.3 or above is installed and available on the path. Test CMake by running:
+- CMake version 3.21.0 or above is installed and available on the path. Test CMake by running:
 
     ```commandline
     cmake --version
     ```
 
     ```log
-    cmake version 3.16.3
-    ```
+    cmake version 3.22.4
+    ``` 
 
-> **Note:** How to add cmake to the path:
+> **Note:** Required version of CMake is also installed in the Python3 virtual environment created by
+> `setup_default_resources.py` script. See [Fetching resource files](./building.md#fetching-resource-files) section.
 >
-> `export PATH=/path/to/cmake/bin:$PATH`
+> To add CMake to the PATH on Ubuntu for example, use: `export PATH=/absolute/path/for/cmake/:${PATH}`
+> Once `setup_default_resources.py` has been executed, activating the virtual environment will enable you
+> to use that CMake. Alternatively, from the root of the repository, you could use:
+>
+> `export PATH=$(readlink -e resources_downloaded/env/bin):${PATH}`
 
 - Python 3.8 or above is installed. Check your current installed version of Python by running:
 
@@ -319,6 +326,8 @@
 
 > **Note:** This script requires Python version 3.8 or higher. Please make sure all [build prerequisites](./building.md#build-prerequisites)
 > are satisfied.
+>
+> **Note:** This script also installs required version of CMake into the virtual environment, which can be used by activating it.
 
 Additional command line arguments supported by this script are:
 
diff --git a/scripts/cmake/cmsis-dsp.cmake b/scripts/cmake/cmsis-dsp.cmake
index 73f6100..f22d5ef 100644
--- a/scripts/cmake/cmsis-dsp.cmake
+++ b/scripts/cmake/cmsis-dsp.cmake
@@ -68,16 +68,8 @@
     endif()
 endif ()
 
-# 5. Add any custom/conditional flags for compilation or linkage
-if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "cortex-m55" OR "${CMAKE_SYSTEM_ARCH}" STREQUAL "armv8.1-m.main")
-    target_compile_definitions(${CMSIS_DSP_TARGET} PUBLIC
-        ARM_MATH_MVEI
-        ARM_MATH_DSP
-        ARM_MATH_LOOPUNROLL)
-elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL cortex-m33)
-    # Placeholder, if building with Cortex-M33
-endif()
-
+# 5. General compile definitions
+target_compile_definitions(${CMSIS_DSP_TARGET} PUBLIC ARM_MATH_LOOPUNROLL)
 
 # 6. Provide the library path for the top level CMake to use:
 set(CMSIS_DSP_LIB   "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${CMSIS_DSP_TARGET}.a")
diff --git a/scripts/cmake/cmsis-pack-gen/CMakeLists.txt b/scripts/cmake/cmsis-pack-gen/CMakeLists.txt
index 19787b6..db5cfff 100644
--- a/scripts/cmake/cmsis-pack-gen/CMakeLists.txt
+++ b/scripts/cmake/cmsis-pack-gen/CMakeLists.txt
@@ -22,7 +22,7 @@
 # here along with their dependencies.                   #
 #########################################################
 
-cmake_minimum_required(VERSION 3.15.6)
+cmake_minimum_required(VERSION 3.21.0)
 
 project(ml-embedded-eval-kit-api
         DESCRIPTION     "Platform agnostic API for all examples.")
diff --git a/scripts/cmake/cmsis-pack-gen/use-case-api.yml b/scripts/cmake/cmsis-pack-gen/use-case-api.yml
index 8796dff..fb0cbd9 100644
--- a/scripts/cmake/cmsis-pack-gen/use-case-api.yml
+++ b/scripts/cmake/cmsis-pack-gen/use-case-api.yml
@@ -23,7 +23,7 @@
 #
 # Ideal usage: from the root of the repository
 #
-# ml-embedded-eval-kit $ packgen -s ./source/                   \ # Source dir
+# ml-embedded-eval-kit $ packgen -s ./                          \ # Source dir (run this from repo root)
 #           -v ./scripts/cmake/cmsis-pack-gen/use-case-api.yml  \ # This file's path
 #           -o <path-to>/ml-embedded-eval-kit-pack              \ # Where to generate the ouput
 #           -i <path-to>/tensorflow.tensorflow-lite-micro.pdsc  \ # Tensorflow packs' PDSC file
@@ -41,18 +41,18 @@
   - name: "ml-embedded-eval-kit-uc-api"
     description: "Sample use case APIs derived from ml-embedded-eval-kit"
     vendor: "ARM"
-    license: ""
+    license: "LICENSE_APACHE_2.0.txt"
     url: "https://review.mlplatform.org/admin/repos/ml/ethos-u/ml-embedded-evaluation-kit/"
 
     requirements:
       packages:
-        - attributes: {vendor: "tensorflow", name: "tensorflow-lite-micro", version: "0.4.0"}
-        - attributes: {vendor: "ARM", name: "CMSIS", version: "5.9.0"}
+        - attributes: {vendor: "tensorflow", name: "tensorflow-lite-micro", version: "1.22.02"}
+        - attributes: {vendor: "ARM", name: "CMSIS", version: "5.8.0"}
 
     releases:
       - version: "22.05.0"
-        date: "2022-05-04"
-        description: "Experimental package"
+        date: "2022-05-23"
+        description: "Beta release package"
 
 #    @TODO: Add API header names and descriptions here (see placeholder below).
 #    apis:
diff --git a/scripts/cmake/platforms/mps3/build_configuration.cmake b/scripts/cmake/platforms/mps3/build_configuration.cmake
index 6e21d9b..749b1e1 100644
--- a/scripts/cmake/platforms/mps3/build_configuration.cmake
+++ b/scripts/cmake/platforms/mps3/build_configuration.cmake
@@ -22,18 +22,7 @@
         if (TARGET_SUBSYSTEM STREQUAL sse-300)
             set(CMAKE_SYSTEM_PROCESSOR cortex-m55 CACHE STRING "Cortex-M CPU to use")
         elseif(TARGET_SUBSYSTEM STREQUAL sse-310)
-            # For CMake versions older than 3.21, the compiler and linker flags for
-            # ArmClang are added by CMake automatically which makes it mandatory to
-            # define the system processor. For CMake versions 3.21 or later (that
-            # implement policy CMP0123) we use armv8.1-m as the arch until the
-            # toolchain officially supports Cortex-M85. For older version of CMake
-            # we revert to using Cortex-M55 as the processor (as this will work
-            # for M85 too).
-            if(POLICY CMP0123)
-                set(CMAKE_SYSTEM_ARCH armv8.1-m.main CACHE STRING "System arch to use")
-            else()
-                set(CMAKE_SYSTEM_PROCESSOR  cortex-m55)
-            endif()
+            set(CMAKE_SYSTEM_PROCESSOR cortex-m85 CACHE STRING "Cortex-M CPU to use")
         endif()
     endif()
 
diff --git a/scripts/cmake/tensorflow.cmake b/scripts/cmake/tensorflow.cmake
index 8a790bc..ac11542 100644
--- a/scripts/cmake/tensorflow.cmake
+++ b/scripts/cmake/tensorflow.cmake
@@ -51,7 +51,7 @@
 else()
     set(TENSORFLOW_LITE_MICRO_TARGET "cortex_m_generic")
 
-    if ("${CMAKE_SYSTEM_ARCH}" STREQUAL "armv8.1-m.main")
+    if ("${CMAKE_SYSTEM_ARCH}" STREQUAL "armv8.1-m.main" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "cortex-m85")
         # TensorFlow's generic makefile doesn't currently have a flow for Cortex-M85.
         # We build for Arm Cortex-M55 instead.
         # @TODO: check with latest TensorFlow package.
diff --git a/scripts/cmake/toolchains/bare-metal-armclang.cmake b/scripts/cmake/toolchains/bare-metal-armclang.cmake
index 97da76f..3db3320 100644
--- a/scripts/cmake/toolchains/bare-metal-armclang.cmake
+++ b/scripts/cmake/toolchains/bare-metal-armclang.cmake
@@ -25,40 +25,46 @@
 set(CMAKE_CROSSCOMPILING            true)
 set(CMAKE_SYSTEM_NAME               Generic)
 
-set(MIN_ARM_CLANG_VERSION           6.16)
-
 # Skip compiler test execution
 set(CMAKE_C_COMPILER_WORKS          1)
 set(CMAKE_CXX_COMPILER_WORKS        1)
 
 if (NOT DEFINED CMAKE_SYSTEM_PROCESSOR AND NOT DEFINED CMAKE_SYSTEM_ARCH)
-    set(CMAKE_SYSTEM_PROCESSOR      cortex-m55)
+    set(CMAKE_SYSTEM_PROCESSOR      cortex-m55 CACHE STRING "Cortex-M CPU to use")
 endif()
 
 if (CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m55)
     # Flags for cortex-m55
+    set(MIN_ARM_CLANG_VERSION       6.16)
     set(CPU_ID                      M55)
     set(CPU_COMPILE_DEF             CPU_CORTEX_${CPU_ID})
     set(ARM_CPU                     "ARMC${CPU_ID}")
-    set(FLOAT_ABI                   hard)
-    set(ARM_MATH_DSP                1)
-    set(ARM_MATH_LOOPUNROLL         1)
     set(CPU_HEADER_FILE             "${ARM_CPU}.h")
     set(CPU_COMPILE_OPTION          "-mcpu=${CMAKE_SYSTEM_PROCESSOR}")
+    set(FLOAT_ABI_COMPILE_OPTION    "-mfloat-abi=hard")
     set(CPU_LINK_OPT                "--cpu=Cortex-${CPU_ID}")
-elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m85 OR CMAKE_SYSTEM_ARCH STREQUAL armv8.1-m.main)
-    # Flags for Cortex-M85
+elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m85)
+    # Flags for cortex-m85
+    set(MIN_ARM_CLANG_VERSION       6.18)
+    set(CPU_ID                      M85)
+    set(CPU_COMPILE_DEF             CPU_CORTEX_${CPU_ID})
+    set(ARM_CPU                     "ARMC${CPU_ID}")
+    set(CPU_HEADER_FILE             "${ARM_CPU}.h")
+    set(CPU_COMPILE_OPTION          "-mcpu=${CMAKE_SYSTEM_PROCESSOR}")
+    set(FLOAT_ABI_COMPILE_OPTION    "-mfloat-abi=hard")
+    set(CPU_LINK_OPT                "--cpu=Cortex-${CPU_ID}")
+elseif (CMAKE_SYSTEM_ARCH STREQUAL armv8.1-m.main)
+    # Flags for generic armv8.1-m profile
+    set(MIN_ARM_CLANG_VERSION       6.16)
     set(CPU_ID                      ARMv81MML_DSP_DP_MVE_FP)
     set(ARM_CPU                     "ARMv81MML")
     set(CPU_COMPILE_DEF             ${CPU_ID})
-    set(FLOAT_ABI                   hard)
-    set(ARM_MATH_DSP                1)
-    set(ARM_MATH_LOOPUNROLL         1)
 
     # @TODO: Revise once we have the CPU file in CMSIS and CPU flags
     # are supported by toolchains.
     set(CPU_HEADER_FILE             "${CPU_ID}.h")
     set(CPU_COMPILE_OPTION          "-march=armv8.1-m.main+mve.fp+fp.dp")
+    set(FLOAT_ABI_COMPILE_OPTION    "-mfloat-abi=hard")
     set(CPU_LINK_OPT                "--cpu=8.1-M.Main.mve.fp")
 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m33)
     # Flags for cortex-m33 to go here
@@ -81,18 +87,16 @@
 # Arch compile options:
 add_compile_options(
     -mthumb
-    -mfloat-abi=${FLOAT_ABI}
     --target=arm-arm-non-eabi
     -mlittle-endian
     -MD
-    ${CPU_COMPILE_OPTION})
+    ${CPU_COMPILE_OPTION}
+    ${FLOAT_ABI_COMPILE_OPTION})
 
 # Compile definitions:
 add_compile_definitions(
     CPU_HEADER_FILE=\"${CPU_HEADER_FILE}\"
-    $<$<BOOL:${CPU_COMPILE_DEF}>:${CPU_COMPILE_DEF}>
-    $<$<BOOL:${ARM_MATH_DSP}>:ARM_MATH_DSP>
-    $<$<BOOL:${ARM_MATH_LOOPUNROLL}>:ARM_MATH_LOOPUNROLL>)
+    $<$<BOOL:${CPU_COMPILE_DEF}>:${CPU_COMPILE_DEF}>)
 
 # Link options:
 add_link_options(${CPU_LINK_OPT})
diff --git a/scripts/cmake/toolchains/bare-metal-gcc.cmake b/scripts/cmake/toolchains/bare-metal-gcc.cmake
index a6d6c0e..9c1cd4f 100644
--- a/scripts/cmake/toolchains/bare-metal-gcc.cmake
+++ b/scripts/cmake/toolchains/bare-metal-gcc.cmake
@@ -30,7 +30,7 @@
 set(CMAKE_CXX_COMPILER_WORKS        1)
 
 if (NOT DEFINED CMAKE_SYSTEM_PROCESSOR AND NOT DEFINED CMAKE_SYSTEM_ARCH)
-    set(CMAKE_SYSTEM_PROCESSOR      cortex-m55)
+    set(CMAKE_SYSTEM_PROCESSOR      cortex-m55 CACHE STRING "Cortex-M CPU to use")
 endif()
 
 if (CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m55)
@@ -38,25 +38,26 @@
     set(CPU_ID                      M55)
     set(CPU_COMPILE_DEF             CPU_CORTEX_${CPU_ID})
     set(ARM_CPU                     "ARMC${CPU_ID}")
-    set(FLOAT_ABI                   hard)
-    set(ARM_MATH_DSP                1)
-    set(ARM_MATH_LOOPUNROLL         1)
     set(CPU_HEADER_FILE             "${ARM_CPU}.h")
     set(CPU_COMPILE_OPTION          "-mcpu=${CMAKE_SYSTEM_PROCESSOR}")
+    set(FLOAT_ABI_COMPILE_OPTION    "-mfloat-abi=hard")
     set(CPU_LINK_OPT                "--cpu=Cortex-${CPU_ID}")
-elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m85 OR CMAKE_SYSTEM_ARCH STREQUAL armv8.1-m.main)
-    # Flags for Cortex-M85
+elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m85)
+    # Flags for cortex-m85
+    # @TODO: Current versions of GNU compiler do not support Cortex-M85, we compile for Cortex-M55 instead.
+    message(WARNING                 "Arm GNU Toolchain does not support Arm Cortex-M85 yet, switching to Cortex-M55.")
+    set(CMAKE_SYSTEM_PROCESSOR      cortex-m55 CACHE STRING "Cortex-M CPU to use" FORCE)
+    # No need to duplicate the definitions here.
+    # Flags from Cortex-M55 will be added as this toolchain file will be read by CMake again.
+elseif (CMAKE_SYSTEM_ARCH STREQUAL armv8.1-m.main)
+    # Flags for generic target armv8.1-m.main (will work for cortex-m55 and cortex-m85
     set(CPU_ID                      ARMv81MML_DSP_DP_MVE_FP)
     set(ARM_CPU                     "ARMv81MML")
     set(CPU_COMPILE_DEF             ${CPU_ID})
     set(FLOAT_ABI                   hard)
-    set(ARM_MATH_DSP                1)
-    set(ARM_MATH_LOOPUNROLL         1)
-
-    # @TODO: Revise once we have the CPU file in CMSIS and CPU flags
-    # are supported by toolchains.
     set(CPU_HEADER_FILE             "${CPU_ID}.h")
     set(CPU_COMPILE_OPTION          "-march=armv8.1-m.main+mve.fp+fp.dp")
+    set(FLOAT_ABI_COMPILE_OPTION    "-mfloat-abi=hard")
     set(CPU_LINK_OPT                "--cpu=8.1-M.Main.mve.fp")
 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m33)
     # Flags for cortex-m33 to go here
@@ -81,23 +82,21 @@
 # Arch compile options:
 add_compile_options(
     -mthumb
-    -mfloat-abi=${FLOAT_ABI}
     -mlittle-endian
     -MD
+    ${FLOAT_ABI_COMPILE_OPTION}
     ${CPU_COMPILE_OPTION})
 
 # Compile definitions:
 add_compile_definitions(
-    CPU_HEADER_FILE=\"${CPU_HEADER_FILE}\"
-    $<$<BOOL:${CPU_COMPILE_DEF}>:${CPU_COMPILE_DEF}>
-    $<$<BOOL:${ARM_MATH_DSP}>:ARM_MATH_DSP>
-    $<$<BOOL:${ARM_MATH_LOOPUNROLL}>:ARM_MATH_LOOPUNROLL>)
+    $<$<BOOL:${CPU_HEADER_FILE}>:CPU_HEADER_FILE=\"${CPU_HEADER_FILE}\">
+    $<$<BOOL:${CPU_COMPILE_DEF}>:${CPU_COMPILE_DEF}>)
 
 # Link options:
 add_link_options(
     -mthumb
     ${CPU_COMPILE_OPTION}
-    -mfloat-abi=${FLOAT_ABI}
+    ${FLOAT_ABI_COMPILE_OPTION}
     -mlittle-endian
     --stats
     "SHELL:-Xlinker --gc-sections"
diff --git a/scripts/py/requirements.txt b/scripts/py/requirements.txt
index aeff2e0..7b4045c 100644
--- a/scripts/py/requirements.txt
+++ b/scripts/py/requirements.txt
@@ -10,3 +10,4 @@
 scipy==1.8.0
 six==1.16.0
 SoundFile==0.10.3.post1
+cmake==3.22.4
diff --git a/set_up_default_resources.py b/set_up_default_resources.py
index 0b885c0..c9f83c9 100755
--- a/set_up_default_resources.py
+++ b/set_up_default_resources.py
@@ -349,8 +349,7 @@
     additional_npu_config_names: tuple = (),
     arena_cache_size: int = 0,
     check_clean_folder: bool = False,
-    additional_requirements_file: str = "",
-):
+    additional_requirements_file: str = "") -> (Path, Path):
     """
     Helpers function that retrieve the output from a command.
 
@@ -367,6 +366,14 @@
     additional_requirements_file (str): Path to a requirements.txt file if
                                         additional packages need to be
                                         installed.
+
+    Returns
+    -------
+
+    Tuple of pair of Paths: (download_directory_path,  virtual_env_path)
+
+    download_directory_path: Root of the directory where the resources have been downloaded to.
+    virtual_env_path: Path to the root of virtual environment.
     """
     # Paths.
     current_file_dir = Path(__file__).parent.resolve()
@@ -420,13 +427,15 @@
             raise
 
     # 1.2 Does the virtual environment exist?
-    env_python = str(download_dir / "env" / "bin" / "python3")
-    env_activate = str(download_dir / "env" / "bin" / "activate")
+    env_dirname = "env"
+    env_path = download_dir / env_dirname
+    env_python = str(env_path / "bin" / "python3")
+    env_activate = str(env_path / "bin" / "activate")
 
-    if not (download_dir / "env").is_dir():
+    if not env_path.is_dir():
         os.chdir(download_dir)
         # Create the virtual environment.
-        command = "python3 -m venv env"
+        command = f"python3 -m venv {env_dirname}"
         call_command(command)
         commands = ["pip install --upgrade pip", "pip install --upgrade setuptools"]
         for c in commands:
@@ -603,6 +612,8 @@
     with open(metadata_file_path, "w") as metadata_file:
         json.dump(metadata_dict, metadata_file, indent=4)
 
+    return download_dir, env_path
+
 
 if __name__ == "__main__":
     parser = ArgumentParser()
diff --git a/source/application/api/common/CMakeLists.txt b/source/application/api/common/CMakeLists.txt
index 5078adc..1d72eef 100644
--- a/source/application/api/common/CMakeLists.txt
+++ b/source/application/api/common/CMakeLists.txt
@@ -20,7 +20,7 @@
 #  NOTE: this library should not depend on HAL.         #
 #########################################################
 
-cmake_minimum_required(VERSION 3.15.6)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(COMMON_UC_UTILS_TARGET common_api)
 project(${COMMON_UC_UTILS_TARGET}
diff --git a/source/application/api/use_case/ad/CMakeLists.txt b/source/application/api/use_case/ad/CMakeLists.txt
index 224816f..8cd703d 100644
--- a/source/application/api/use_case/ad/CMakeLists.txt
+++ b/source/application/api/use_case/ad/CMakeLists.txt
@@ -17,7 +17,7 @@
 #########################################################
 #             ANOMALY DETECTION API library             #
 #########################################################
-cmake_minimum_required(VERSION 3.15.6)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(AD_API_TARGET ad_api)
 project(${AD_API_TARGET}
diff --git a/source/application/api/use_case/asr/CMakeLists.txt b/source/application/api/use_case/asr/CMakeLists.txt
index 77e3d6a..dcd4bec 100644
--- a/source/application/api/use_case/asr/CMakeLists.txt
+++ b/source/application/api/use_case/asr/CMakeLists.txt
@@ -17,7 +17,7 @@
 #########################################################
 #       AUTOMATIC SPEECH RECOGNITION API library        #
 #########################################################
-cmake_minimum_required(VERSION 3.15.6)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(ASR_API_TARGET asr_api)
 project(${ASR_API_TARGET}
diff --git a/source/application/api/use_case/img_class/CMakeLists.txt b/source/application/api/use_case/img_class/CMakeLists.txt
index f4818d8..e8ec5f4 100644
--- a/source/application/api/use_case/img_class/CMakeLists.txt
+++ b/source/application/api/use_case/img_class/CMakeLists.txt
@@ -17,7 +17,7 @@
 #########################################################
 #                IMG CLASS API library                  #
 #########################################################
-cmake_minimum_required(VERSION 3.15.6)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(IMG_CLASS_API_TARGET img_class_api)
 project(${IMG_CLASS_API_TARGET}
diff --git a/source/application/api/use_case/inference_runner/CMakeLists.txt b/source/application/api/use_case/inference_runner/CMakeLists.txt
index d0fe629..728330f 100644
--- a/source/application/api/use_case/inference_runner/CMakeLists.txt
+++ b/source/application/api/use_case/inference_runner/CMakeLists.txt
@@ -17,7 +17,7 @@
 #########################################################
 #              INFERENCE RUNNER API library             #
 #########################################################
-cmake_minimum_required(VERSION 3.15.6)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(INFERENCE_RUNNER_API_TARGET inference_runner_api)
 project(${INFERENCE_RUNNER_API_TARGET}
diff --git a/source/application/api/use_case/kws/CMakeLists.txt b/source/application/api/use_case/kws/CMakeLists.txt
index 3256d03..517a35a 100644
--- a/source/application/api/use_case/kws/CMakeLists.txt
+++ b/source/application/api/use_case/kws/CMakeLists.txt
@@ -17,7 +17,7 @@
 #########################################################
 #            KEYWORD SPOTTING API library               #
 #########################################################
-cmake_minimum_required(VERSION 3.15.6)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(KWS_API_TARGET kws_api)
 project(${KWS_API_TARGET}
diff --git a/source/application/api/use_case/noise_reduction/CMakeLists.txt b/source/application/api/use_case/noise_reduction/CMakeLists.txt
index 5fa9a73..1c19009 100644
--- a/source/application/api/use_case/noise_reduction/CMakeLists.txt
+++ b/source/application/api/use_case/noise_reduction/CMakeLists.txt
@@ -17,7 +17,7 @@
 #########################################################
 #            NOISE REDUCTION API library                #
 #########################################################
-cmake_minimum_required(VERSION 3.15.6)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(NOISE_REDUCTION_API_TARGET noise_reduction_api)
 project(${NOISE_REDUCTION_API_TARGET}
diff --git a/source/application/api/use_case/object_detection/CMakeLists.txt b/source/application/api/use_case/object_detection/CMakeLists.txt
index 797ff55..f3438e4 100644
--- a/source/application/api/use_case/object_detection/CMakeLists.txt
+++ b/source/application/api/use_case/object_detection/CMakeLists.txt
@@ -17,7 +17,7 @@
 #########################################################
 #             OBJECT DETECTION API library              #
 #########################################################
-cmake_minimum_required(VERSION 3.15.6)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(OBJECT_DETECTION_API_TARGET object_detection_api)
 project(${OBJECT_DETECTION_API_TARGET}
diff --git a/source/application/api/use_case/vww/CMakeLists.txt b/source/application/api/use_case/vww/CMakeLists.txt
index b933d32..4d7257b 100644
--- a/source/application/api/use_case/vww/CMakeLists.txt
+++ b/source/application/api/use_case/vww/CMakeLists.txt
@@ -17,7 +17,7 @@
 #########################################################
 #             VISUAL WAKE WORD API library              #
 #########################################################
-cmake_minimum_required(VERSION 3.15.6)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(VWW_API_TARGET vww_api)
 project(${VWW_API_TARGET}
diff --git a/source/hal/CMakeLists.txt b/source/hal/CMakeLists.txt
index b8c115c..018e970 100644
--- a/source/hal/CMakeLists.txt
+++ b/source/hal/CMakeLists.txt
@@ -19,7 +19,7 @@
 #                       HAL library                     #
 #########################################################
 
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(HAL_TARGET hal)
 project(${HAL_TARGET}
@@ -67,5 +67,4 @@
 message(STATUS "*******************************************************")
 message(STATUS "Library                                : " ${HAL_TARGET})
 message(STATUS "CMAKE_SYSTEM_PROCESSOR                 : " ${CMAKE_SYSTEM_PROCESSOR})
-message(STATUS "CMAKE_SYSTEM_ARCH                      : " ${CMAKE_SYSTEM_ARCH})
 message(STATUS "*******************************************************")
diff --git a/source/hal/source/components/cmsis_device/CMakeLists.txt b/source/hal/source/components/cmsis_device/CMakeLists.txt
index 5615506..d2173ec 100644
--- a/source/hal/source/components/cmsis_device/CMakeLists.txt
+++ b/source/hal/source/components/cmsis_device/CMakeLists.txt
@@ -18,7 +18,7 @@
 #########################################################
 # Generic CMSIS Start up library for Cortex-M targets   #
 #########################################################
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(CMSIS_DEVICE_TARGET cmsis_device)
 set(CPU_HEADER_TARGET rte_components)
@@ -86,5 +86,4 @@
 message(STATUS "*******************************************************")
 message(STATUS "Library                                : " ${CMSIS_DEVICE_TARGET})
 message(STATUS "CMAKE_SYSTEM_PROCESSOR                 : " ${CMAKE_SYSTEM_PROCESSOR})
-message(STATUS "CMAKE_SYSTEM_ARCH                      : " ${CMAKE_SYSTEM_ARCH})
 message(STATUS "*******************************************************")
diff --git a/source/hal/source/components/lcd/CMakeLists.txt b/source/hal/source/components/lcd/CMakeLists.txt
index 7262618..fead814 100644
--- a/source/hal/source/components/lcd/CMakeLists.txt
+++ b/source/hal/source/components/lcd/CMakeLists.txt
@@ -19,7 +19,7 @@
 # LCD library                                           #
 #########################################################
 
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 
 project(lcd_component
     DESCRIPTION     "LCD support library"
@@ -95,4 +95,4 @@
 message(STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR})
 message(STATUS "*******************************************************")
 message(STATUS "Library                                : " ${LCD_STUBS_COMPONENT_TARGET})
-message(STATUS "*******************************************************")
\ No newline at end of file
+message(STATUS "*******************************************************")
diff --git a/source/hal/source/components/npu/CMakeLists.txt b/source/hal/source/components/npu/CMakeLists.txt
index f94d0f9..299fe45 100644
--- a/source/hal/source/components/npu/CMakeLists.txt
+++ b/source/hal/source/components/npu/CMakeLists.txt
@@ -19,7 +19,7 @@
 #         Ethos-U NPU initialization library            #
 #########################################################
 
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 set(ETHOS_U_NPU_COMPONENT ethos_u_npu)
 project(${ETHOS_U_NPU_COMPONENT}
     DESCRIPTION     "Ethos-U NPU initialization library"
diff --git a/source/hal/source/components/npu_ta/CMakeLists.txt b/source/hal/source/components/npu_ta/CMakeLists.txt
index 358dab9..a3f98d8 100644
--- a/source/hal/source/components/npu_ta/CMakeLists.txt
+++ b/source/hal/source/components/npu_ta/CMakeLists.txt
@@ -24,7 +24,7 @@
 # sweeps on the Arm Ethos-U NPUs. The wrapper library here provides an
 # easy way to add initialisation of the timing adapter block.
 
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 set(ETHOS_U_NPU_TA_COMPONENT ethos_u_ta)
 project(${ETHOS_U_NPU_TA_COMPONENT}
     DESCRIPTION     "Ethos-U NPU timing adapter initialization library"
diff --git a/source/hal/source/components/platform_pmu/CMakeLists.txt b/source/hal/source/components/platform_pmu/CMakeLists.txt
index df375c3..a25363f 100644
--- a/source/hal/source/components/platform_pmu/CMakeLists.txt
+++ b/source/hal/source/components/platform_pmu/CMakeLists.txt
@@ -18,7 +18,7 @@
 #####################################################################
 #  Interface library for platform performance monitoring unit       #
 #####################################################################
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 
 project(platform_pmu
     DESCRIPTION     "Header/interface for platform PMU"
diff --git a/source/hal/source/components/stdout/CMakeLists.txt b/source/hal/source/components/stdout/CMakeLists.txt
index 9e60e36..7bc2c92 100644
--- a/source/hal/source/components/stdout/CMakeLists.txt
+++ b/source/hal/source/components/stdout/CMakeLists.txt
@@ -22,7 +22,7 @@
 # and PL011 UART drivers with retarget functions.       #
 #########################################################
 
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 
 project(stdout
     DESCRIPTION     "Standard output and err redirection over UART"
diff --git a/source/hal/source/platform/mps3/CMakeLists.txt b/source/hal/source/platform/mps3/CMakeLists.txt
index b90f6b7..57394f4 100644
--- a/source/hal/source/platform/mps3/CMakeLists.txt
+++ b/source/hal/source/platform/mps3/CMakeLists.txt
@@ -19,7 +19,7 @@
 #           MPS3 platform support library               #
 #########################################################
 
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 set(PLATFORM_DRIVERS_TARGET platform_drivers)
 project(${PLATFORM_DRIVERS_TARGET}
     DESCRIPTION     "Platform drivers library for MPS3 FPGA/FVP targets"
@@ -160,5 +160,4 @@
 message(STATUS "*******************************************************")
 message(STATUS "Library                                : " ${PLATFORM_DRIVERS_TARGET})
 message(STATUS "CMAKE_SYSTEM_PROCESSOR                 : " ${CMAKE_SYSTEM_PROCESSOR})
-message(STATUS "CMAKE_SYSTEM_ARCH                      : " ${CMAKE_SYSTEM_ARCH})
 message(STATUS "*******************************************************")
diff --git a/source/hal/source/platform/native/CMakeLists.txt b/source/hal/source/platform/native/CMakeLists.txt
index 41d68e9..cb95c88 100644
--- a/source/hal/source/platform/native/CMakeLists.txt
+++ b/source/hal/source/platform/native/CMakeLists.txt
@@ -19,7 +19,7 @@
 #    Native target platform support library             #
 #########################################################
 
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(PLATFORM_DRIVERS_TARGET platform_drivers)
 
@@ -73,5 +73,4 @@
 message(STATUS "*******************************************************")
 message(STATUS "Library                                : " ${PLATFORM_DRIVERS_TARGET})
 message(STATUS "CMAKE_SYSTEM_PROCESSOR                 : " ${CMAKE_SYSTEM_PROCESSOR})
-message(STATUS "CMAKE_SYSTEM_ARCH                      : " ${CMAKE_SYSTEM_ARCH})
 message(STATUS "*******************************************************")
diff --git a/source/hal/source/platform/simple/CMakeLists.txt b/source/hal/source/platform/simple/CMakeLists.txt
index 1ab8e25..7cdfe9a 100644
--- a/source/hal/source/platform/simple/CMakeLists.txt
+++ b/source/hal/source/platform/simple/CMakeLists.txt
@@ -19,7 +19,7 @@
 #       A generic (simple) platform support library     #
 #########################################################
 
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 set(PLATFORM_DRIVERS_TARGET platform_drivers)
 project(${PLATFORM_DRIVERS_TARGET}
     DESCRIPTION     "Platform drivers library for a generic target"
@@ -124,5 +124,4 @@
 message(STATUS "*******************************************************")
 message(STATUS "Library                                : " ${PLATFORM_DRIVERS_TARGET})
 message(STATUS "CMAKE_SYSTEM_PROCESSOR                 : " ${CMAKE_SYSTEM_PROCESSOR})
-message(STATUS "CMAKE_SYSTEM_ARCH                      : " ${CMAKE_SYSTEM_ARCH})
 message(STATUS "*******************************************************")
diff --git a/source/log/CMakeLists.txt b/source/log/CMakeLists.txt
index 79ebc2d..88789b5 100644
--- a/source/log/CMakeLists.txt
+++ b/source/log/CMakeLists.txt
@@ -18,7 +18,7 @@
 #######################################################
 # Header-only logging definitions as an interface lib.#
 #######################################################
-cmake_minimum_required(VERSION 3.16.3)
+cmake_minimum_required(VERSION 3.21.0)
 
 set(BSP_LOGGING_TARGET log)
 
@@ -40,5 +40,4 @@
 message(STATUS "*******************************************************")
 message(STATUS "Library                                : " ${BSP_LOGGING_TARGET})
 message(STATUS "CMAKE_SYSTEM_PROCESSOR                 : " ${CMAKE_SYSTEM_PROCESSOR})
-message(STATUS "CMAKE_SYSTEM_ARCH                      : " ${CMAKE_SYSTEM_ARCH})
 message(STATUS "*******************************************************")
diff --git a/source/math/CMakeLists.txt b/source/math/CMakeLists.txt
index eee8f75..462ffb3 100644
--- a/source/math/CMakeLists.txt
+++ b/source/math/CMakeLists.txt
@@ -33,7 +33,7 @@
 
 target_link_libraries(arm_math PRIVATE log)
 
-if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "cortex-m55" OR "${CMAKE_SYSTEM_ARCH}" STREQUAL "armv8.1-m.main")
+if (${CMAKE_CROSSCOMPILING})
     include(${CMAKE_SCRIPTS_DIR}/cmsis-dsp.cmake)
     target_link_libraries(arm_math PUBLIC cmsis-dsp)
 endif ()
@@ -41,5 +41,4 @@
 message(STATUS "*******************************************************")
 message(STATUS "Library                                : " arm_math)
 message(STATUS "CMAKE_SYSTEM_PROCESSOR                 : " ${CMAKE_SYSTEM_PROCESSOR})
-message(STATUS "CMAKE_SYSTEM_ARCH                      : " ${CMAKE_SYSTEM_ARCH})
 message(STATUS "*******************************************************")
diff --git a/source/math/PlatformMath.cc b/source/math/PlatformMath.cc
index b666d29..8950941 100644
--- a/source/math/PlatformMath.cc
+++ b/source/math/PlatformMath.cc
@@ -24,31 +24,31 @@
 
     float MathUtils::CosineF32(float radians)
     {
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
         return arm_cos_f32(radians);
-#else /* ARM_MATH_DSP */
+#else  /* __ARM_FEATURE_DSP */
         return cosf(radians);
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
     }
 
     float MathUtils::SineF32(float radians)
     {
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
         return arm_sin_f32(radians);
-#else /* ARM_MATH_DSP */
+#else  /* __ARM_FEATURE_DSP */
         return sinf(radians);
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
     }
 
     float MathUtils::SqrtF32(float input)
     {
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
         float output = 0.f;
         arm_sqrt_f32(input, &output);
         return output;
-#else /* ARM_MATH_DSP */
+#else  /* __ARM_FEATURE_DSP */
         return sqrtf(input);
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
     }
 
     float MathUtils::MeanF32(float* ptrSrc, const uint32_t srcLen)
@@ -57,14 +57,14 @@
             return 0.f;
         }
 
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
         float result = 0.f;
         arm_mean_f32(ptrSrc, srcLen, &result);
         return result;
-#else /* ARM_MATH_DSP */
+#else  /* __ARM_FEATURE_DSP */
         float acc = std::accumulate(ptrSrc, ptrSrc + srcLen, 0.0);
         return acc/srcLen;
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
     }
 
     float MathUtils::StdDevF32(float* ptrSrc, const uint32_t srcLen,
@@ -73,7 +73,7 @@
         if (!srcLen) {
             return 0.f;
         }
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
         /**
          * Note Standard deviation calculation can be off
          * by > 0.01 but less than < 0.1, according to
@@ -83,7 +83,7 @@
         float stdDev = 0;
         arm_std_f32(ptrSrc, srcLen, &stdDev);
         return stdDev;
-#else /* ARM_MATH_DSP */
+#else  /* __ARM_FEATURE_DSP */
         auto VarianceFunction = [=](float acc, const float value) {
             return acc + (((value - mean) * (value - mean))/ srcLen);
         };
@@ -92,7 +92,7 @@
                                     VarianceFunction);
 
         return sqrtf(acc);
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
     }
 
     void MathUtils::FftInitF32(const uint16_t fftLen,
@@ -104,7 +104,7 @@
         fftInstance.m_optimisedOptionAvailable = false;
         fftInstance.m_type = type;
 
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
         arm_status status = ARM_MATH_ARGUMENT_ERROR;
         switch (fftInstance.m_type) {
         case FftType::real:
@@ -125,7 +125,7 @@
         } else {
             fftInstance.m_optimisedOptionAvailable = true;
         }
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
 
         debug("Optimised FFT will be used: %s.\n", fftInstance.m_optimisedOptionAvailable? "yes": "no");
 
@@ -203,12 +203,12 @@
         switch (fftInstance.m_type) {
         case FftType::real:
 
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
             if (fftInstance.m_optimisedOptionAvailable) {
                 arm_rfft_fast_f32(&fftInstance.m_instanceReal, input.data(), fftOutput.data(), 0);
                 return;
             }
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
             FftRealF32(input, fftOutput);
             return;
 
@@ -217,13 +217,13 @@
                 printf_err("Complex FFT instance should have input size >= (FFT len x 2)");
                 return;
             }
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
             if (fftInstance.m_optimisedOptionAvailable) {
                 fftOutput = input; /* Complex function works in-place */
                 arm_cfft_f32(&fftInstance.m_instanceComplex, fftOutput.data(), 0, 1);
                 return;
             }
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
             FftComplexF32(input, fftOutput);
             return;
 
@@ -236,15 +236,15 @@
     void MathUtils::VecLogarithmF32(std::vector <float>& input,
                                     std::vector <float>& output)
     {
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
         arm_vlog_f32(input.data(), output.data(),
                      output.size());
-#else /* ARM_MATH_DSP */
+#else  /* __ARM_FEATURE_DSP */
         for (auto in = input.begin(), out = output.begin();
              in != input.end() && out != output.end(); ++in, ++out) {
             *out = logf(*in);
         }
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
     }
 
     float MathUtils::DotProductF32(float* srcPtrA, float* srcPtrB,
@@ -252,13 +252,13 @@
     {
         float output = 0.f;
 
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
         arm_dot_prod_f32(srcPtrA, srcPtrB, srcLen, &output);
-#else /* ARM_MATH_DSP */
+#else  /* __ARM_FEATURE_DSP */
         for (uint32_t i = 0; i < srcLen; ++i) {
             output += *srcPtrA++ * *srcPtrB++;
         }
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
 
         return output;
     }
@@ -273,15 +273,15 @@
             return false;
         }
 
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
         arm_cmplx_mag_squared_f32(ptrSrc, ptrDst, srcLen/2);
-#else /* ARM_MATH_DSP */
+#else  /* __ARM_FEATURE_DSP */
         for (uint32_t j = 0; j < srcLen/2; ++j) {
             const float real = *ptrSrc++;
             const float im = *ptrSrc++;
             *ptrDst++ = real*real + im*im;
         }
-#endif /* ARM_MATH_DSP */
+#endif /* __ARM_FEATURE_DSP */
         return true;
     }
 
diff --git a/source/math/include/PlatformMath.hpp b/source/math/include/PlatformMath.hpp
index 2bf7733..859716f 100644
--- a/source/math/include/PlatformMath.hpp
+++ b/source/math/include/PlatformMath.hpp
@@ -18,12 +18,12 @@
 #define PLATFORM_MATH_HPP
 
 /* See if ARM DSP functions can be used. */
-#if defined(ARM_MATH_DSP)
-    #include "arm_math.h"
-    #define M_PI    (PI)
-#else
-    #include <cmath>
-#endif
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
+#include "arm_math.h"
+#define M_PI (PI)
+#else /* (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) */
+#include <cmath>
+#endif /* (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) */
 
 #include <vector>
 #include <cstdint>
@@ -39,10 +39,10 @@
     };
 
     struct FftInstance {
-#if ARM_MATH_DSP
+#if (defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
         arm_rfft_fast_instance_f32  m_instanceReal;
         arm_cfft_instance_f32       m_instanceComplex;
-#endif
+#endif /* (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) */
         uint16_t                    m_fftLen{0};
         FftType                     m_type{FftType::real};
         bool                        m_optimisedOptionAvailable{false};
@@ -177,4 +177,4 @@
 } /* namespace app */
 } /* namespace arm */
 
-#endif /* PLATFORM_MATH_HPP */
\ No newline at end of file
+#endif /* PLATFORM_MATH_HPP */
diff --git a/source/profiler/CMakeLists.txt b/source/profiler/CMakeLists.txt
index 7e3db3e..0a9c338 100644
--- a/source/profiler/CMakeLists.txt
+++ b/source/profiler/CMakeLists.txt
@@ -39,5 +39,4 @@
 message(STATUS "*******************************************************")
 message(STATUS "Library                                : " profiler)
 message(STATUS "CMAKE_SYSTEM_PROCESSOR                 : " ${CMAKE_SYSTEM_PROCESSOR})
-message(STATUS "CMAKE_SYSTEM_ARCH                      : " ${CMAKE_SYSTEM_ARCH})
 message(STATUS "*******************************************************")