From 9cbea5cbff49b87e543881a192061a1981e3747f Mon Sep 17 00:00:00 2001 From: JidongMei Date: Mon, 9 Feb 2026 16:04:51 +0800 Subject: [PATCH] Optimize for STAR-MC3 Code Reviw: 1 Rename form STAR_MC3 to ARM_STAR_MC3 2 Modify kernel_checker.py to pass license check --- .github/scripts/kernel_checker.py | 2 + CMakeLists.txt | 16 +- portable/ARMv8M/ReadMe.txt | 10 +- portable/ARMv8M/copy_files.py | 168 +++++++++--------- portable/ARMv8M/non_secure/ReadMe.txt | 11 +- portable/ARMv8M/secure/ReadMe.txt | 11 +- portable/CMakeLists.txt | 106 ++++++----- .../non_secure/mpu_wrappers_v2_asm.c | 0 .../non_secure/port.c | 0 .../non_secure/portasm.c | 0 .../non_secure/portasm.h | 0 .../non_secure/portmacro.h | 0 .../non_secure/portmacrocommon.h | 0 .../secure/secure_context.c | 0 .../secure/secure_context.h | 0 .../secure/secure_context_port.c | 0 .../secure/secure_heap.c | 0 .../secure/secure_heap.h | 0 .../secure/secure_init.c | 0 .../secure/secure_init.h | 0 .../secure/secure_port_macros.h | 0 .../non_secure/mpu_wrappers_v2_asm.c | 0 .../non_secure/port.c | 0 .../non_secure/portasm.c | 0 .../non_secure/portasm.h | 0 .../non_secure/portmacro.h | 0 .../non_secure/portmacrocommon.h | 0 .../non_secure/mpu_wrappers_v2_asm.S | 0 .../non_secure/port.c | 0 .../non_secure/portasm.h | 0 .../non_secure/portasm.s | 0 .../non_secure/portmacro.h | 0 .../non_secure/portmacrocommon.h | 0 .../secure/secure_context.c | 0 .../secure/secure_context.h | 0 .../secure/secure_context_port_asm.s | 0 .../secure/secure_heap.c | 0 .../secure/secure_heap.h | 0 .../secure/secure_init.c | 0 .../secure/secure_init.h | 0 .../secure/secure_port_macros.h | 0 .../non_secure/mpu_wrappers_v2_asm.S | 0 .../non_secure/port.c | 0 .../non_secure/portasm.h | 0 .../non_secure/portasm.s | 0 .../non_secure/portmacro.h | 0 .../non_secure/portmacrocommon.h | 0 portable/ThirdParty/GCC/ARM_TFM/README.md | 7 +- 48 files changed, 159 insertions(+), 172 deletions(-) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/non_secure/mpu_wrappers_v2_asm.c (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/non_secure/port.c (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/non_secure/portasm.c (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/non_secure/portasm.h (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/non_secure/portmacro.h (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/non_secure/portmacrocommon.h (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_context.c (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_context.h (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_context_port.c (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_heap.c (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_heap.h (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_init.c (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_init.h (100%) rename portable/GCC/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_port_macros.h (100%) rename portable/GCC/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/mpu_wrappers_v2_asm.c (100%) rename portable/GCC/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/port.c (100%) rename portable/GCC/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/portasm.c (100%) rename portable/GCC/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/portasm.h (100%) rename portable/GCC/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/portmacro.h (100%) rename portable/GCC/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/portmacrocommon.h (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/non_secure/mpu_wrappers_v2_asm.S (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/non_secure/port.c (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/non_secure/portasm.h (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/non_secure/portasm.s (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/non_secure/portmacro.h (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/non_secure/portmacrocommon.h (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_context.c (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_context.h (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_context_port_asm.s (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_heap.c (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_heap.h (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_init.c (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_init.h (100%) rename portable/IAR/{STAR_MC3 => ARM_STAR_MC3}/secure/secure_port_macros.h (100%) rename portable/IAR/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/mpu_wrappers_v2_asm.S (100%) rename portable/IAR/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/port.c (100%) rename portable/IAR/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/portasm.h (100%) rename portable/IAR/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/portasm.s (100%) rename portable/IAR/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/portmacro.h (100%) rename portable/IAR/{STAR_MC3_NTZ => ARM_STAR_MC3_NTZ}/non_secure/portmacrocommon.h (100%) diff --git a/.github/scripts/kernel_checker.py b/.github/scripts/kernel_checker.py index be2d80ddd..ef23938d0 100755 --- a/.github/scripts/kernel_checker.py +++ b/.github/scripts/kernel_checker.py @@ -112,6 +112,7 @@ KERNEL_ARM_COLLAB_FILES_PATTERNS = [ r'.*portable/.*/ARM_CM23*', r'.*portable/.*/ARM_CM33*', r'.*portable/.*/ARM_CM35*', + r'.*portable/.*/ARM_CM52*', r'.*portable/.*/ARM_CM55*', r'.*portable/.*/ARM_CM85*', r'.*portable/.*/ARM_CM0*', @@ -119,6 +120,7 @@ KERNEL_ARM_COLLAB_FILES_PATTERNS = [ r'.*portable/.*/ARM_CM4_MPU*', r'.*portable/.*/ARM_CM4F_MPU*', r'.*portable/.*/ARM_CR82*', + r'.*portable/.*/ARM_STAR_MC3*', ] KERNEL_HEADER = [ diff --git a/CMakeLists.txt b/CMakeLists.txt index 8696c1dd6..914333746 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,10 +88,10 @@ if(NOT FREERTOS_PORT) " GCC_ARM_CM85_SECURE - Compiler: GCC Target: ARM Cortex-M85 secure\n" " GCC_ARM_CM85_NTZ_NONSECURE - Compiler: GCC Target: ARM Cortex-M85 non-trustzone non-secure\n" " GCC_ARM_CM85_TFM - Compiler: GCC Target: ARM Cortex-M85 non-secure for TF-M\n" - " GCC_STAR_MC3_NONSECURE - Compiler: GCC Target: Arm China STAR-MC3 non-secure\n" - " GCC_STAR_MC3_SECURE - Compiler: GCC Target: Arm China STAR-MC3 secure\n" - " GCC_STAR_MC3_NTZ_NONSECURE - Compiler: GCC Target: Arm China STAR-MC3 non-trustzone non-secure\n" - " GCC_STAR_MC3_TFM - Compiler: GCC Target: Arm China STAR-MC3 non-secure for TF-M\n" + " GCC_ARM_STAR_MC3_NONSECURE - Compiler: GCC Target: Arm China STAR-MC3 non-secure\n" + " GCC_ARM_STAR_MC3_SECURE - Compiler: GCC Target: Arm China STAR-MC3 secure\n" + " GCC_ARM_STAR_MC3_NTZ_NONSECURE - Compiler: GCC Target: Arm China STAR-MC3 non-trustzone non-secure\n" + " GCC_ARM_STAR_MC3_TFM - Compiler: GCC Target: Arm China STAR-MC3 non-secure for TF-M\n" " GCC_ARM_CR5 - Compiler: GCC Target: ARM Cortex-R5\n" " GCC_ARM_CRX_MPU - Compiler: GCC Target: ARM Cortex-Rx with MPU\n" " GCC_ARM_CRX_NOGIC - Compiler: GCC Target: ARM Cortex-Rx no GIC\n" @@ -163,10 +163,10 @@ if(NOT FREERTOS_PORT) " IAR_ARM_CM85_SECURE - Compiler: IAR Target: ARM Cortex-M85 secure\n" " IAR_ARM_CM85_NTZ_NONSECURE - Compiler: IAR Target: ARM Cortex-M85 non-trustzone non-secure\n" " IAR_ARM_CM85_TFM - Compiler: IAR Target: ARM Cortex-M85 non-secure for TF-M\n" - " IAR_STAR_MC3_NONSECURE - Compiler: IAR Target: Arm China STAR-MC3 non-secure\n" - " IAR_STAR_MC3_SECURE - Compiler: IAR Target: Arm China STAR-MC3 secure\n" - " IAR_STAR_MC3_NTZ_NONSECURE - Compiler: IAR Target: Arm China STAR-MC3 non-trustzone non-secure\n" - " IAR_STAR_MC3_TFM - Compiler: IAR Target: Arm China STAR-MC3 non-secure for TF-M\n" + " IAR_ARM_STAR_MC3_NONSECURE - Compiler: IAR Target: Arm China STAR-MC3 non-secure\n" + " IAR_ARM_STAR_MC3_SECURE - Compiler: IAR Target: Arm China STAR-MC3 secure\n" + " IAR_ARM_STAR_MC3_NTZ_NONSECURE - Compiler: IAR Target: Arm China STAR-MC3 non-trustzone non-secure\n" + " IAR_ARM_STAR_MC3_TFM - Compiler: IAR Target: Arm China STAR-MC3 non-secure for TF-M\n" " IAR_ARM_CRX_NOGIC - Compiler: IAR Target: ARM Cortex-Rx no GIC\n" " IAR_ATMEGA323 - Compiler: IAR Target: ATMega323\n" " IAR_ATMEL_SAM7S64 - Compiler: IAR Target: Atmel SAM7S64\n" diff --git a/portable/ARMv8M/ReadMe.txt b/portable/ARMv8M/ReadMe.txt index f8671f87d..66c70d463 100644 --- a/portable/ARMv8M/ReadMe.txt +++ b/portable/ARMv8M/ReadMe.txt @@ -1,13 +1,11 @@ This directory tree contains the master copy of the FreeRTOS Armv8-M and Armv8.1-M ports. Do not use the files located here! These file are copied into separate -FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|52|55|85]_NNN and -FreeRTOS/Source/portable/[compiler]/STAR_MC3_NNN directories prior to each FreeRTOS release. +FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3]_NNN directories +prior to each FreeRTOS release. If your Armv8-M and Armv8.1-M application uses TrustZone then use the files from the -FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|52|55|85] and -FreeRTOS/Source/portable/[compiler]/STAR_MC3 directories. +FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3] directories. If your Armv8-M and Armv8.1-M application does not use TrustZone then use the files from -the FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|52|55|85]_NTZ and -FreeRTOS/Source/portable/[compiler]/STAR_MC3_NTZ directories. +the FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3]_NTZ directories. diff --git a/portable/ARMv8M/copy_files.py b/portable/ARMv8M/copy_files.py index 3084d6fc7..ddeeb13ea 100644 --- a/portable/ARMv8M/copy_files.py +++ b/portable/ARMv8M/copy_files.py @@ -33,8 +33,8 @@ _THIS_FILE_DIRECTORY_ = os.path.dirname(os.path.realpath(__file__)) _FREERTOS_PORTABLE_DIRECTORY_ = os.path.dirname(_THIS_FILE_DIRECTORY_) _COMPILERS_ = ['GCC', 'IAR'] -_ARCH_NS_ = ['ARM_CM85', 'ARM_CM85_NTZ', 'ARM_CM55', 'ARM_CM55_NTZ', 'ARM_CM52', 'ARM_CM52_NTZ', 'ARM_CM35P', 'ARM_CM35P_NTZ', 'ARM_CM33', 'ARM_CM33_NTZ', 'ARM_CM23', 'ARM_CM23_NTZ', 'STAR_MC3', 'STAR_MC3_NTZ'] -_ARCH_S_ = ['ARM_CM85', 'ARM_CM55', 'ARM_CM52', 'ARM_CM35P', 'ARM_CM33', 'ARM_CM23', 'STAR_MC3'] +_ARCH_NS_ = ['ARM_CM85', 'ARM_CM85_NTZ', 'ARM_CM55', 'ARM_CM55_NTZ', 'ARM_CM52', 'ARM_CM52_NTZ', 'ARM_CM35P', 'ARM_CM35P_NTZ', 'ARM_CM33', 'ARM_CM33_NTZ', 'ARM_CM23', 'ARM_CM23_NTZ', 'ARM_STAR_MC3', 'ARM_STAR_MC3_NTZ'] +_ARCH_S_ = ['ARM_CM85', 'ARM_CM55', 'ARM_CM52', 'ARM_CM35P', 'ARM_CM33', 'ARM_CM23', 'ARM_STAR_MC3'] # Files to be compiled in the Secure Project _SECURE_COMMON_FILE_PATHS_ = [ @@ -46,22 +46,22 @@ _SECURE_COMMON_FILE_PATHS_ = [ _SECURE_PORTABLE_FILE_PATHS_ = { 'GCC':{ - 'ARM_CM23' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM23')], - 'ARM_CM33' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')], - 'ARM_CM35P':[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')], - 'ARM_CM52' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')], - 'ARM_CM55' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')], - 'ARM_CM85' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')], - 'STAR_MC3' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')] + 'ARM_CM23' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM23')], + 'ARM_CM33' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')], + 'ARM_CM35P' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')], + 'ARM_CM52' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')], + 'ARM_CM55' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')], + 'ARM_CM85' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')], + 'ARM_STAR_MC3' :[os.path.join('secure', 'context', 'portable', 'GCC', 'ARM_CM33')] }, 'IAR':{ - 'ARM_CM23' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM23')], - 'ARM_CM33' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')], - 'ARM_CM35P':[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')], - 'ARM_CM52' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')], - 'ARM_CM55' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')], - 'ARM_CM85' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')], - 'STAR_MC3' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')] + 'ARM_CM23' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM23')], + 'ARM_CM33' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')], + 'ARM_CM35P' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')], + 'ARM_CM52' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')], + 'ARM_CM55' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')], + 'ARM_CM85' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')], + 'ARM_STAR_MC3' :[os.path.join('secure', 'context', 'portable', 'IAR', 'ARM_CM33')] } } @@ -72,76 +72,76 @@ _NONSECURE_COMMON_FILE_PATHS_ = [ _NONSECURE_PORTABLE_FILE_PATHS_ = { 'GCC':{ - 'ARM_CM23' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM23')], - 'ARM_CM23_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM23_NTZ')], - 'ARM_CM33' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33')], - 'ARM_CM33_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ')], - 'ARM_CM35P' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'portasm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'mpu_wrappers_v2_asm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM35P', 'portmacro.h')], - 'ARM_CM35P_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'portasm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM35P', 'portmacro.h')], - 'ARM_CM52' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'portasm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'mpu_wrappers_v2_asm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM52', 'portmacro.h')], - 'ARM_CM52_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'portasm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM52', 'portmacro.h')], - 'ARM_CM55' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'portasm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'mpu_wrappers_v2_asm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM55', 'portmacro.h')], - 'ARM_CM55_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'portasm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM55', 'portmacro.h')], - 'ARM_CM85' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'portasm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'mpu_wrappers_v2_asm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM85', 'portmacro.h')], - 'ARM_CM85_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'portasm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM85', 'portmacro.h')], - 'STAR_MC3' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'portasm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'mpu_wrappers_v2_asm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'STAR_MC3', 'portmacro.h')], - 'STAR_MC3_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'portasm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.c'), - os.path.join('non_secure', 'portable', 'GCC', 'STAR_MC3', 'portmacro.h')] + 'ARM_CM23' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM23')], + 'ARM_CM23_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM23_NTZ')], + 'ARM_CM33' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33')], + 'ARM_CM33_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ')], + 'ARM_CM35P' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'portasm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'mpu_wrappers_v2_asm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM35P', 'portmacro.h')], + 'ARM_CM35P_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'portasm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM35P', 'portmacro.h')], + 'ARM_CM52' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'portasm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'mpu_wrappers_v2_asm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM52', 'portmacro.h')], + 'ARM_CM52_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'portasm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM52', 'portmacro.h')], + 'ARM_CM55' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'portasm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'mpu_wrappers_v2_asm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM55', 'portmacro.h')], + 'ARM_CM55_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'portasm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM55', 'portmacro.h')], + 'ARM_CM85' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'portasm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'mpu_wrappers_v2_asm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM85', 'portmacro.h')], + 'ARM_CM85_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'portasm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM85', 'portmacro.h')], + 'ARM_STAR_MC3' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'portasm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33', 'mpu_wrappers_v2_asm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_STAR_MC3', 'portmacro.h')], + 'ARM_STAR_MC3_NTZ' : [os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'portasm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.c'), + os.path.join('non_secure', 'portable', 'GCC', 'ARM_STAR_MC3', 'portmacro.h')] }, 'IAR':{ - 'ARM_CM23' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM23')], - 'ARM_CM23_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM23_NTZ')], - 'ARM_CM33' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33')], - 'ARM_CM33_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ')], - 'ARM_CM35P' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'portasm.s'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'mpu_wrappers_v2_asm.S'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM35P', 'portmacro.h')], - 'ARM_CM35P_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'portasm.s'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.S'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM35P', 'portmacro.h')], - 'ARM_CM52' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'portasm.s'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'mpu_wrappers_v2_asm.S'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM52', 'portmacro.h')], - 'ARM_CM52_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'portasm.s'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.S'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM52', 'portmacro.h')], - 'ARM_CM55' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'portasm.s'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'mpu_wrappers_v2_asm.S'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM55', 'portmacro.h')], - 'ARM_CM55_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'portasm.s'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.S'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM55', 'portmacro.h')], - 'ARM_CM85' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'portasm.s'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'mpu_wrappers_v2_asm.S'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM85', 'portmacro.h')], - 'ARM_CM85_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'portasm.s'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.S'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM85', 'portmacro.h')], - 'STAR_MC3' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'portasm.s'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'mpu_wrappers_v2_asm.S'), - os.path.join('non_secure', 'portable', 'IAR', 'STAR_MC3', 'portmacro.h')], - 'STAR_MC3_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'portasm.s'), - os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.S'), - os.path.join('non_secure', 'portable', 'IAR', 'STAR_MC3', 'portmacro.h')] + 'ARM_CM23' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM23')], + 'ARM_CM23_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM23_NTZ')], + 'ARM_CM33' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33')], + 'ARM_CM33_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ')], + 'ARM_CM35P' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'portasm.s'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'mpu_wrappers_v2_asm.S'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM35P', 'portmacro.h')], + 'ARM_CM35P_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'portasm.s'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.S'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM35P', 'portmacro.h')], + 'ARM_CM52' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'portasm.s'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'mpu_wrappers_v2_asm.S'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM52', 'portmacro.h')], + 'ARM_CM52_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'portasm.s'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.S'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM52', 'portmacro.h')], + 'ARM_CM55' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'portasm.s'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'mpu_wrappers_v2_asm.S'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM55', 'portmacro.h')], + 'ARM_CM55_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'portasm.s'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.S'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM55', 'portmacro.h')], + 'ARM_CM85' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'portasm.s'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'mpu_wrappers_v2_asm.S'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM85', 'portmacro.h')], + 'ARM_CM85_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'portasm.s'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.S'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM85', 'portmacro.h')], + 'ARM_STAR_MC3' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'portasm.s'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33', 'mpu_wrappers_v2_asm.S'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_STAR_MC3', 'portmacro.h')], + 'ARM_STAR_MC3_NTZ' : [os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'portasm.s'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_CM33_NTZ', 'mpu_wrappers_v2_asm.S'), + os.path.join('non_secure', 'portable', 'IAR', 'ARM_STAR_MC3', 'portmacro.h')] }, } diff --git a/portable/ARMv8M/non_secure/ReadMe.txt b/portable/ARMv8M/non_secure/ReadMe.txt index 061b944c9..5a8c28838 100644 --- a/portable/ARMv8M/non_secure/ReadMe.txt +++ b/portable/ARMv8M/non_secure/ReadMe.txt @@ -1,14 +1,11 @@ This directory tree contains the master copy of the FreeRTOS Armv8-M and Armv8.1-M ports. Do not use the files located here! These file are copied into separate -FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|52|55|85]_NNN and -FreeRTOS/Source/portable/[compiler]/STAR_MC3_NNN directories prior to -each FreeRTOS release. +FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3]_NNN directories +prior to each FreeRTOS release. If your Armv8-M/Armv8.1-M application uses TrustZone then use the files from the -FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|52|55|85] and -FreeRTOS/Source/portable/[compiler]/STAR_MC3 directories. +FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3] directories. If your Armv8-M/Armv8.1-M application does not use TrustZone then use the files from -the FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|52|55|85]_NTZ and -FreeRTOS/Source/portable/[compiler]/STAR_MC3_NTZ directories. +the FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3]_NTZ directories. diff --git a/portable/ARMv8M/secure/ReadMe.txt b/portable/ARMv8M/secure/ReadMe.txt index 061b944c9..5a8c28838 100644 --- a/portable/ARMv8M/secure/ReadMe.txt +++ b/portable/ARMv8M/secure/ReadMe.txt @@ -1,14 +1,11 @@ This directory tree contains the master copy of the FreeRTOS Armv8-M and Armv8.1-M ports. Do not use the files located here! These file are copied into separate -FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|52|55|85]_NNN and -FreeRTOS/Source/portable/[compiler]/STAR_MC3_NNN directories prior to -each FreeRTOS release. +FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3]_NNN directories +prior to each FreeRTOS release. If your Armv8-M/Armv8.1-M application uses TrustZone then use the files from the -FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|52|55|85] and -FreeRTOS/Source/portable/[compiler]/STAR_MC3 directories. +FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3] directories. If your Armv8-M/Armv8.1-M application does not use TrustZone then use the files from -the FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|52|55|85]_NTZ and -FreeRTOS/Source/portable/[compiler]/STAR_MC3_NTZ directories. +the FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3]_NTZ directories. diff --git a/portable/CMakeLists.txt b/portable/CMakeLists.txt index fb282db24..a589df286 100644 --- a/portable/CMakeLists.txt +++ b/portable/CMakeLists.txt @@ -226,26 +226,26 @@ add_library(freertos_kernel_port OBJECT GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c ThirdParty/GCC/ARM_TFM/os_wrapper_freertos.c> - $<$: - GCC/STAR_MC3/non_secure/port.c - GCC/STAR_MC3/non_secure/portasm.c - GCC/STAR_MC3/non_secure/mpu_wrappers_v2_asm.c> + $<$: + GCC/ARM_STAR_MC3/non_secure/port.c + GCC/ARM_STAR_MC3/non_secure/portasm.c + GCC/ARM_STAR_MC3/non_secure/mpu_wrappers_v2_asm.c> - $<$: - GCC/STAR_MC3/secure/secure_context_port.c - GCC/STAR_MC3/secure/secure_context.c - GCC/STAR_MC3/secure/secure_heap.c - GCC/STAR_MC3/secure/secure_init.c> + $<$: + GCC/ARM_STAR_MC3/secure/secure_context_port.c + GCC/ARM_STAR_MC3/secure/secure_context.c + GCC/ARM_STAR_MC3/secure/secure_heap.c + GCC/ARM_STAR_MC3/secure/secure_init.c> - $<$: - GCC/STAR_MC3_NTZ/non_secure/port.c - GCC/STAR_MC3_NTZ/non_secure/portasm.c - GCC/STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.c> + $<$: + GCC/ARM_STAR_MC3_NTZ/non_secure/port.c + GCC/ARM_STAR_MC3_NTZ/non_secure/portasm.c + GCC/ARM_STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.c> - $<$: - GCC/STAR_MC3_NTZ/non_secure/port.c - GCC/STAR_MC3_NTZ/non_secure/portasm.c - GCC/STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.c + $<$: + GCC/ARM_STAR_MC3_NTZ/non_secure/port.c + GCC/ARM_STAR_MC3_NTZ/non_secure/portasm.c + GCC/ARM_STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.c ThirdParty/GCC/ARM_TFM/os_wrapper_freertos.c> # ARMv7-R ports for GCC @@ -591,26 +591,26 @@ add_library(freertos_kernel_port OBJECT IAR/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.S ThirdParty/GCC/ARM_TFM/os_wrapper_freertos.c> - $<$: - IAR/STAR_MC3/non_secure/port.c - IAR/STAR_MC3/non_secure/portasm.s - IAR/STAR_MC3/non_secure/mpu_wrappers_v2_asm.S> + $<$: + IAR/ARM_STAR_MC3/non_secure/port.c + IAR/ARM_STAR_MC3/non_secure/portasm.s + IAR/ARM_STAR_MC3/non_secure/mpu_wrappers_v2_asm.S> - $<$: - IAR/STAR_MC3/secure/secure_context_port_asm.s - IAR/STAR_MC3/secure/secure_context.c - IAR/STAR_MC3/secure/secure_heap.c - IAR/STAR_MC3/secure/secure_init.c> + $<$: + IAR/ARM_STAR_MC3/secure/secure_context_port_asm.s + IAR/ARM_STAR_MC3/secure/secure_context.c + IAR/ARM_STAR_MC3/secure/secure_heap.c + IAR/ARM_STAR_MC3/secure/secure_init.c> - $<$: - IAR/STAR_MC3_NTZ/non_secure/port.c - IAR/STAR_MC3_NTZ/non_secure/portasm.s - IAR/STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.S> + $<$: + IAR/ARM_STAR_MC3_NTZ/non_secure/port.c + IAR/ARM_STAR_MC3_NTZ/non_secure/portasm.s + IAR/ARM_STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.S> - $<$: - IAR/STAR_MC3_NTZ/non_secure/port.c - IAR/STAR_MC3_NTZ/non_secure/portasm.s - IAR/STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.S + $<$: + IAR/ARM_STAR_MC3_NTZ/non_secure/port.c + IAR/ARM_STAR_MC3_NTZ/non_secure/portasm.s + IAR/ARM_STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.S ThirdParty/GCC/ARM_TFM/os_wrapper_freertos.c> # ARMv7-R Ports for IAR EWARM @@ -863,18 +863,12 @@ if( FREERTOS_PORT MATCHES "GCC_ARM_CM(3|4)_MPU" OR FREERTOS_PORT STREQUAL "IAR_ARM_CM4F_MPU" OR FREERTOS_PORT STREQUAL "RVDS_ARM_CM4_MPU" OR FREERTOS_PORT STREQUAL "GCC_ARM_CRX_MPU" OR - FREERTOS_PORT MATCHES "GCC_ARM_CM(23|33|52|55|85)_NTZ_NONSECURE" OR - FREERTOS_PORT MATCHES "GCC_ARM_CM(23|33|52|55|85)_NONSECURE" OR - FREERTOS_PORT MATCHES "GCC_ARM_CM(33|52|55|85)_TFM" OR - FREERTOS_PORT MATCHES "IAR_ARM_CM(23|33|52|55|85)_NTZ_NONSECURE" OR - FREERTOS_PORT MATCHES "IAR_ARM_CM(23|33|52|55|85)_NONSECURE" OR - FREERTOS_PORT MATCHES "IAR_ARM_CM(33|52|55|85)_TFM" OR - FREERTOS_PORT STREQUAL "GCC_STAR_MC3_NTZ_NONSECURE" OR - FREERTOS_PORT STREQUAL "GCC_STAR_MC3_NONSECURE" OR - FREERTOS_PORT STREQUAL "GCC_STAR_MC3_TFM" OR - FREERTOS_PORT STREQUAL "IAR_STAR_MC3_NTZ_NONSECURE" OR - FREERTOS_PORT STREQUAL "IAR_STAR_MC3_NONSECURE" OR - FREERTOS_PORT STREQUAL "IAR_STAR_MC3_TFM" + FREERTOS_PORT MATCHES "GCC_ARM_(CM23|CM33|CM52|CM55|CM85|STAR_MC3)_NTZ_NONSECURE" OR + FREERTOS_PORT MATCHES "GCC_ARM_(CM23|CM33|CM52|CM55|CM85|STAR_MC3)_NONSECURE" OR + FREERTOS_PORT MATCHES "GCC_ARM_(CM33|CM52|CM55|CM85|STAR_MC3)_TFM" OR + FREERTOS_PORT MATCHES "IAR_ARM_(CM23|CM33|CM52|CM55|CM85|STAR_MC3)_NTZ_NONSECURE" OR + FREERTOS_PORT MATCHES "IAR_ARM_(CM23|CM33|CM52|CM55|CM85|STAR_MC3)_NONSECURE" OR + FREERTOS_PORT MATCHES "IAR_ARM_(CM33|CM52|CM55|CM85|STAR_MC3)_TFM" ) target_sources(freertos_kernel_port PRIVATE Common/mpu_wrappers.c @@ -888,7 +882,7 @@ if (DEFINED FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG ) message(FATAL_ERROR "ARMv8.1-M PACBTI support in the kernel is not yet enabled for GNU toolchain due to known issues.") endif() - if(FREERTOS_PORT MATCHES ".*ARM_CM(52|85)|.*STAR_MC3") + if(FREERTOS_PORT MATCHES ".*ARM_(CM52|CM85|STAR_MC3)") if(FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG STREQUAL "ARM_V_8_1_M_PACBTI_CONFIG_STANDARD") target_compile_options(freertos_kernel_port PUBLIC $<$:-mbranch-protection=standard>) target_compile_options(freertos_kernel_port PUBLIC $<$:$<$:--branch_protection=bti+pac-ret>>) @@ -975,7 +969,7 @@ if (DEFINED FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG ) ) endif() else() - message(FATAL_ERROR "FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG option is currently only supported on ARM Cortex-M85|M52 and Arm China STAR_MC3 FreeRTOS port.") + message(FATAL_ERROR "FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG option is currently only supported on ARM Cortex-M85|M52 and Arm China STAR-MC3 FreeRTOS port.") endif() endif() @@ -1063,10 +1057,10 @@ target_include_directories(freertos_kernel_port_headers INTERFACE $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM85_NTZ/non_secure> $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM85_NTZ/non_secure> - $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/STAR_MC3/non_secure> - $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/STAR_MC3/secure> - $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/STAR_MC3_NTZ/non_secure> - $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/STAR_MC3_NTZ/non_secure> + $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_STAR_MC3/non_secure> + $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_STAR_MC3/secure> + $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_STAR_MC3_NTZ/non_secure> + $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_STAR_MC3_NTZ/non_secure> # ARMv7-R ports for GCC $<$:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CR5> @@ -1208,10 +1202,10 @@ target_include_directories(freertos_kernel_port_headers INTERFACE $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM85_NTZ/non_secure> $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM85_NTZ/non_secure> - $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/STAR_MC3/non_secure> - $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/STAR_MC3/secure> - $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/STAR_MC3_NTZ/non_secure> - $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/STAR_MC3_NTZ/non_secure> + $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_STAR_MC3/non_secure> + $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_STAR_MC3/secure> + $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_STAR_MC3_NTZ/non_secure> + $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_STAR_MC3_NTZ/non_secure> # ARMv7-R Ports for IAR EWARM $<$:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CRx_No_GIC> diff --git a/portable/GCC/STAR_MC3/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_STAR_MC3/non_secure/mpu_wrappers_v2_asm.c similarity index 100% rename from portable/GCC/STAR_MC3/non_secure/mpu_wrappers_v2_asm.c rename to portable/GCC/ARM_STAR_MC3/non_secure/mpu_wrappers_v2_asm.c diff --git a/portable/GCC/STAR_MC3/non_secure/port.c b/portable/GCC/ARM_STAR_MC3/non_secure/port.c similarity index 100% rename from portable/GCC/STAR_MC3/non_secure/port.c rename to portable/GCC/ARM_STAR_MC3/non_secure/port.c diff --git a/portable/GCC/STAR_MC3/non_secure/portasm.c b/portable/GCC/ARM_STAR_MC3/non_secure/portasm.c similarity index 100% rename from portable/GCC/STAR_MC3/non_secure/portasm.c rename to portable/GCC/ARM_STAR_MC3/non_secure/portasm.c diff --git a/portable/GCC/STAR_MC3/non_secure/portasm.h b/portable/GCC/ARM_STAR_MC3/non_secure/portasm.h similarity index 100% rename from portable/GCC/STAR_MC3/non_secure/portasm.h rename to portable/GCC/ARM_STAR_MC3/non_secure/portasm.h diff --git a/portable/GCC/STAR_MC3/non_secure/portmacro.h b/portable/GCC/ARM_STAR_MC3/non_secure/portmacro.h similarity index 100% rename from portable/GCC/STAR_MC3/non_secure/portmacro.h rename to portable/GCC/ARM_STAR_MC3/non_secure/portmacro.h diff --git a/portable/GCC/STAR_MC3/non_secure/portmacrocommon.h b/portable/GCC/ARM_STAR_MC3/non_secure/portmacrocommon.h similarity index 100% rename from portable/GCC/STAR_MC3/non_secure/portmacrocommon.h rename to portable/GCC/ARM_STAR_MC3/non_secure/portmacrocommon.h diff --git a/portable/GCC/STAR_MC3/secure/secure_context.c b/portable/GCC/ARM_STAR_MC3/secure/secure_context.c similarity index 100% rename from portable/GCC/STAR_MC3/secure/secure_context.c rename to portable/GCC/ARM_STAR_MC3/secure/secure_context.c diff --git a/portable/GCC/STAR_MC3/secure/secure_context.h b/portable/GCC/ARM_STAR_MC3/secure/secure_context.h similarity index 100% rename from portable/GCC/STAR_MC3/secure/secure_context.h rename to portable/GCC/ARM_STAR_MC3/secure/secure_context.h diff --git a/portable/GCC/STAR_MC3/secure/secure_context_port.c b/portable/GCC/ARM_STAR_MC3/secure/secure_context_port.c similarity index 100% rename from portable/GCC/STAR_MC3/secure/secure_context_port.c rename to portable/GCC/ARM_STAR_MC3/secure/secure_context_port.c diff --git a/portable/GCC/STAR_MC3/secure/secure_heap.c b/portable/GCC/ARM_STAR_MC3/secure/secure_heap.c similarity index 100% rename from portable/GCC/STAR_MC3/secure/secure_heap.c rename to portable/GCC/ARM_STAR_MC3/secure/secure_heap.c diff --git a/portable/GCC/STAR_MC3/secure/secure_heap.h b/portable/GCC/ARM_STAR_MC3/secure/secure_heap.h similarity index 100% rename from portable/GCC/STAR_MC3/secure/secure_heap.h rename to portable/GCC/ARM_STAR_MC3/secure/secure_heap.h diff --git a/portable/GCC/STAR_MC3/secure/secure_init.c b/portable/GCC/ARM_STAR_MC3/secure/secure_init.c similarity index 100% rename from portable/GCC/STAR_MC3/secure/secure_init.c rename to portable/GCC/ARM_STAR_MC3/secure/secure_init.c diff --git a/portable/GCC/STAR_MC3/secure/secure_init.h b/portable/GCC/ARM_STAR_MC3/secure/secure_init.h similarity index 100% rename from portable/GCC/STAR_MC3/secure/secure_init.h rename to portable/GCC/ARM_STAR_MC3/secure/secure_init.h diff --git a/portable/GCC/STAR_MC3/secure/secure_port_macros.h b/portable/GCC/ARM_STAR_MC3/secure/secure_port_macros.h similarity index 100% rename from portable/GCC/STAR_MC3/secure/secure_port_macros.h rename to portable/GCC/ARM_STAR_MC3/secure/secure_port_macros.h diff --git a/portable/GCC/STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.c similarity index 100% rename from portable/GCC/STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.c rename to portable/GCC/ARM_STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.c diff --git a/portable/GCC/STAR_MC3_NTZ/non_secure/port.c b/portable/GCC/ARM_STAR_MC3_NTZ/non_secure/port.c similarity index 100% rename from portable/GCC/STAR_MC3_NTZ/non_secure/port.c rename to portable/GCC/ARM_STAR_MC3_NTZ/non_secure/port.c diff --git a/portable/GCC/STAR_MC3_NTZ/non_secure/portasm.c b/portable/GCC/ARM_STAR_MC3_NTZ/non_secure/portasm.c similarity index 100% rename from portable/GCC/STAR_MC3_NTZ/non_secure/portasm.c rename to portable/GCC/ARM_STAR_MC3_NTZ/non_secure/portasm.c diff --git a/portable/GCC/STAR_MC3_NTZ/non_secure/portasm.h b/portable/GCC/ARM_STAR_MC3_NTZ/non_secure/portasm.h similarity index 100% rename from portable/GCC/STAR_MC3_NTZ/non_secure/portasm.h rename to portable/GCC/ARM_STAR_MC3_NTZ/non_secure/portasm.h diff --git a/portable/GCC/STAR_MC3_NTZ/non_secure/portmacro.h b/portable/GCC/ARM_STAR_MC3_NTZ/non_secure/portmacro.h similarity index 100% rename from portable/GCC/STAR_MC3_NTZ/non_secure/portmacro.h rename to portable/GCC/ARM_STAR_MC3_NTZ/non_secure/portmacro.h diff --git a/portable/GCC/STAR_MC3_NTZ/non_secure/portmacrocommon.h b/portable/GCC/ARM_STAR_MC3_NTZ/non_secure/portmacrocommon.h similarity index 100% rename from portable/GCC/STAR_MC3_NTZ/non_secure/portmacrocommon.h rename to portable/GCC/ARM_STAR_MC3_NTZ/non_secure/portmacrocommon.h diff --git a/portable/IAR/STAR_MC3/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_STAR_MC3/non_secure/mpu_wrappers_v2_asm.S similarity index 100% rename from portable/IAR/STAR_MC3/non_secure/mpu_wrappers_v2_asm.S rename to portable/IAR/ARM_STAR_MC3/non_secure/mpu_wrappers_v2_asm.S diff --git a/portable/IAR/STAR_MC3/non_secure/port.c b/portable/IAR/ARM_STAR_MC3/non_secure/port.c similarity index 100% rename from portable/IAR/STAR_MC3/non_secure/port.c rename to portable/IAR/ARM_STAR_MC3/non_secure/port.c diff --git a/portable/IAR/STAR_MC3/non_secure/portasm.h b/portable/IAR/ARM_STAR_MC3/non_secure/portasm.h similarity index 100% rename from portable/IAR/STAR_MC3/non_secure/portasm.h rename to portable/IAR/ARM_STAR_MC3/non_secure/portasm.h diff --git a/portable/IAR/STAR_MC3/non_secure/portasm.s b/portable/IAR/ARM_STAR_MC3/non_secure/portasm.s similarity index 100% rename from portable/IAR/STAR_MC3/non_secure/portasm.s rename to portable/IAR/ARM_STAR_MC3/non_secure/portasm.s diff --git a/portable/IAR/STAR_MC3/non_secure/portmacro.h b/portable/IAR/ARM_STAR_MC3/non_secure/portmacro.h similarity index 100% rename from portable/IAR/STAR_MC3/non_secure/portmacro.h rename to portable/IAR/ARM_STAR_MC3/non_secure/portmacro.h diff --git a/portable/IAR/STAR_MC3/non_secure/portmacrocommon.h b/portable/IAR/ARM_STAR_MC3/non_secure/portmacrocommon.h similarity index 100% rename from portable/IAR/STAR_MC3/non_secure/portmacrocommon.h rename to portable/IAR/ARM_STAR_MC3/non_secure/portmacrocommon.h diff --git a/portable/IAR/STAR_MC3/secure/secure_context.c b/portable/IAR/ARM_STAR_MC3/secure/secure_context.c similarity index 100% rename from portable/IAR/STAR_MC3/secure/secure_context.c rename to portable/IAR/ARM_STAR_MC3/secure/secure_context.c diff --git a/portable/IAR/STAR_MC3/secure/secure_context.h b/portable/IAR/ARM_STAR_MC3/secure/secure_context.h similarity index 100% rename from portable/IAR/STAR_MC3/secure/secure_context.h rename to portable/IAR/ARM_STAR_MC3/secure/secure_context.h diff --git a/portable/IAR/STAR_MC3/secure/secure_context_port_asm.s b/portable/IAR/ARM_STAR_MC3/secure/secure_context_port_asm.s similarity index 100% rename from portable/IAR/STAR_MC3/secure/secure_context_port_asm.s rename to portable/IAR/ARM_STAR_MC3/secure/secure_context_port_asm.s diff --git a/portable/IAR/STAR_MC3/secure/secure_heap.c b/portable/IAR/ARM_STAR_MC3/secure/secure_heap.c similarity index 100% rename from portable/IAR/STAR_MC3/secure/secure_heap.c rename to portable/IAR/ARM_STAR_MC3/secure/secure_heap.c diff --git a/portable/IAR/STAR_MC3/secure/secure_heap.h b/portable/IAR/ARM_STAR_MC3/secure/secure_heap.h similarity index 100% rename from portable/IAR/STAR_MC3/secure/secure_heap.h rename to portable/IAR/ARM_STAR_MC3/secure/secure_heap.h diff --git a/portable/IAR/STAR_MC3/secure/secure_init.c b/portable/IAR/ARM_STAR_MC3/secure/secure_init.c similarity index 100% rename from portable/IAR/STAR_MC3/secure/secure_init.c rename to portable/IAR/ARM_STAR_MC3/secure/secure_init.c diff --git a/portable/IAR/STAR_MC3/secure/secure_init.h b/portable/IAR/ARM_STAR_MC3/secure/secure_init.h similarity index 100% rename from portable/IAR/STAR_MC3/secure/secure_init.h rename to portable/IAR/ARM_STAR_MC3/secure/secure_init.h diff --git a/portable/IAR/STAR_MC3/secure/secure_port_macros.h b/portable/IAR/ARM_STAR_MC3/secure/secure_port_macros.h similarity index 100% rename from portable/IAR/STAR_MC3/secure/secure_port_macros.h rename to portable/IAR/ARM_STAR_MC3/secure/secure_port_macros.h diff --git a/portable/IAR/STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.S similarity index 100% rename from portable/IAR/STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.S rename to portable/IAR/ARM_STAR_MC3_NTZ/non_secure/mpu_wrappers_v2_asm.S diff --git a/portable/IAR/STAR_MC3_NTZ/non_secure/port.c b/portable/IAR/ARM_STAR_MC3_NTZ/non_secure/port.c similarity index 100% rename from portable/IAR/STAR_MC3_NTZ/non_secure/port.c rename to portable/IAR/ARM_STAR_MC3_NTZ/non_secure/port.c diff --git a/portable/IAR/STAR_MC3_NTZ/non_secure/portasm.h b/portable/IAR/ARM_STAR_MC3_NTZ/non_secure/portasm.h similarity index 100% rename from portable/IAR/STAR_MC3_NTZ/non_secure/portasm.h rename to portable/IAR/ARM_STAR_MC3_NTZ/non_secure/portasm.h diff --git a/portable/IAR/STAR_MC3_NTZ/non_secure/portasm.s b/portable/IAR/ARM_STAR_MC3_NTZ/non_secure/portasm.s similarity index 100% rename from portable/IAR/STAR_MC3_NTZ/non_secure/portasm.s rename to portable/IAR/ARM_STAR_MC3_NTZ/non_secure/portasm.s diff --git a/portable/IAR/STAR_MC3_NTZ/non_secure/portmacro.h b/portable/IAR/ARM_STAR_MC3_NTZ/non_secure/portmacro.h similarity index 100% rename from portable/IAR/STAR_MC3_NTZ/non_secure/portmacro.h rename to portable/IAR/ARM_STAR_MC3_NTZ/non_secure/portmacro.h diff --git a/portable/IAR/STAR_MC3_NTZ/non_secure/portmacrocommon.h b/portable/IAR/ARM_STAR_MC3_NTZ/non_secure/portmacrocommon.h similarity index 100% rename from portable/IAR/STAR_MC3_NTZ/non_secure/portmacrocommon.h rename to portable/IAR/ARM_STAR_MC3_NTZ/non_secure/portmacrocommon.h diff --git a/portable/ThirdParty/GCC/ARM_TFM/README.md b/portable/ThirdParty/GCC/ARM_TFM/README.md index 5c136a8cf..c419a0187 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-M52, Cortex-M55, -Cortex-M85 and STAR-MC3 platform. +(PSA) API based on the ARM Cortex-M23, Cortex-M33, Cortex-M52, Cortex-M55, +Cortex-M85 and Arm China STAR-MC3 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,8 +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|52|55|85]_NTZ` or all the files in -`freertos_kernel/portable/GCC/STAR_MC3_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_[CM23|CM33|CM52|CM55|CM85|STAR_MC3]_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.