From 624e0e20a2803323052d124348170b6313fc5e17 Mon Sep 17 00:00:00 2001 From: JidongMei Date: Tue, 18 Nov 2025 10:18:15 +0800 Subject: [PATCH] Follow review suggestion to update code changes --- examples/template_configuration/FreeRTOSConfig.h | 8 ++++---- portable/CMakeLists.txt | 5 +++++ portable/ThirdParty/GCC/ARM_TFM/README.md | 8 ++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/examples/template_configuration/FreeRTOSConfig.h b/examples/template_configuration/FreeRTOSConfig.h index da1ad8a28..486635684 100644 --- a/examples/template_configuration/FreeRTOSConfig.h +++ b/examples/template_configuration/FreeRTOSConfig.h @@ -602,10 +602,10 @@ /* Set configENABLE_MVE to 1 to enable the M-Profile Vector Extension (MVE) * support, or 0 to leave the MVE support disabled. This option is only - * applicable to Cortex-M55 and Cortex-M85 ports as M-Profile Vector Extension - * (MVE) is available only on these architectures. configENABLE_MVE must be left - * undefined, or defined to 0 for the Cortex-M23,Cortex-M33 and Cortex-M35P - * ports. */ + * applicable to Cortex-M52, Cortex-M55 and Cortex-M85 ports as M-Profile + * Vector Extension (MVE) is available only on these architectures. + * configENABLE_MVE must be left undefined, or defined to 0 for the + * Cortex-M23,Cortex-M33 and Cortex-M35P ports. */ #define configENABLE_MVE 1 /******************************************************************************/ diff --git a/portable/CMakeLists.txt b/portable/CMakeLists.txt index 4df18ad5e..870d399fe 100644 --- a/portable/CMakeLists.txt +++ b/portable/CMakeLists.txt @@ -186,15 +186,18 @@ add_library(freertos_kernel_port OBJECT GCC/ARM_CM52/non_secure/port.c GCC/ARM_CM52/non_secure/portasm.c GCC/ARM_CM52/non_secure/mpu_wrappers_v2_asm.c> + $<$: GCC/ARM_CM52/secure/secure_context_port.c GCC/ARM_CM52/secure/secure_context.c GCC/ARM_CM52/secure/secure_heap.c GCC/ARM_CM52/secure/secure_init.c> + $<$: GCC/ARM_CM52_NTZ/non_secure/port.c GCC/ARM_CM52_NTZ/non_secure/portasm.c GCC/ARM_CM52_NTZ/non_secure/mpu_wrappers_v2_asm.c> + $<$: GCC/ARM_CM52_NTZ/non_secure/port.c GCC/ARM_CM52_NTZ/non_secure/portasm.c @@ -1004,6 +1007,7 @@ target_include_directories(freertos_kernel_port_headers INTERFACE $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM52/secure> $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM52_NTZ/non_secure> $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM52_NTZ/non_secure> + $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM85/non_secure> $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM85/secure> $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM85_NTZ/non_secure> @@ -1143,6 +1147,7 @@ target_include_directories(freertos_kernel_port_headers INTERFACE $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM52/secure> $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM52_NTZ/non_secure> $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM52_NTZ/non_secure> + $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM85/non_secure> $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM85/secure> $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM85_NTZ/non_secure> diff --git a/portable/ThirdParty/GCC/ARM_TFM/README.md b/portable/ThirdParty/GCC/ARM_TFM/README.md index bc594b156..544fb814f 100644 --- a/portable/ThirdParty/GCC/ARM_TFM/README.md +++ b/portable/ThirdParty/GCC/ARM_TFM/README.md @@ -2,8 +2,8 @@ This port adds the support that FreeRTOS applications can call the secure services in Trusted Firmware M(TF-M) through Platform Security Architecture -(PSA) API based on the ARM Cortex-M23, Cortex-M33, Cortex-M55 and Cortex-M85 -platform. +(PSA) API based on the ARM Cortex-M23, Cortex-M33, Cortex-M52, Cortex-M55 +and Cortex-M85 platform. The Platform Security Architecture (PSA) makes it quicker, easier and cheaper to design security into a device from the ground up. PSA is made up of four key @@ -38,7 +38,7 @@ _**Note:** `TFM_NS_MANAGE_NSID` must be configured as "OFF" when building TF-M_. ## Build the Non-Secure Side -Please copy all the files in `freertos_kernel/portable/GCC/ARM_CM[23|33|55|85]_NTZ` into the `freertos_kernel/portable/ThirdParty/GCC/ARM_TFM` folder before using this port. Note that TrustZone is enabled in this port. The TF-M runs in the Secure Side. +Please copy all the files in `freertos_kernel/portable/GCC/ARM_CM[23|33|52|55|85]_NTZ` into the `freertos_kernel/portable/ThirdParty/GCC/ARM_TFM` folder before using this port. Note that TrustZone is enabled in this port. The TF-M runs in the Secure Side. Please call the API `tfm_ns_interface_init()` which is defined in `/interface/src/os_wrapper/tfm_ns_interface_rtos.c` by trusted-firmware-m (tag: TF-Mv2.0.0) at the very beginning of your application. Otherwise, it will always fail when calling a TF-M service in the Nonsecure Side. @@ -57,7 +57,7 @@ Please refer to [TF-M documentation](https://trustedfirmware-m.readthedocs.io/en * `configENABLE_MVE` The setting of this macro is decided by the setting in Secure Side which is platform-specific. If the Secure Side enables Non-Secure access to MVE, then this macro can be configured as 0 or 1. Otherwise, this macro can only be configured as 0. -Please note that only Cortex-M55 and Cortex-M85 support MVE. +Please note that only Cortex-M52, Cortex-M55 and Cortex-M85 support MVE. Please refer to [TF-M documentation](https://trustedfirmware-m.readthedocs.io/en/latest/integration_guide/tfm_fpu_support.html) for MVE usage on the Non-Secure side. * `configENABLE_TRUSTZONE`