Skip to content

Commit

Permalink
Add mpu_wrappers_v2_asm.c to MPU ports (FreeRTOS#951)
Browse files Browse the repository at this point in the history
Co-authored-by: Soren Ptak <[email protected]>
  • Loading branch information
IsaacDynamo and Skptak authored Jan 17, 2024
1 parent c053ffe commit c083af9
Showing 1 changed file with 55 additions and 25 deletions.
80 changes: 55 additions & 25 deletions portable/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ add_library(freertos_kernel_port STATIC
GCC/ARM_CM3/port.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM3_MPU>:
GCC/ARM_CM3_MPU/port.c>
GCC/ARM_CM3_MPU/port.c
GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c>

# ARMv7E-M ports for GCC
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM4_MPU>:
GCC/ARM_CM4_MPU/port.c>
GCC/ARM_CM4_MPU/port.c
GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM4F>:
GCC/ARM_CM4F/port.c>
Expand All @@ -103,7 +105,8 @@ add_library(freertos_kernel_port STATIC
# ARMv8-M ports for GCC
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM23_NONSECURE>:
GCC/ARM_CM23/non_secure/port.c
GCC/ARM_CM23/non_secure/portasm.c>
GCC/ARM_CM23/non_secure/portasm.c
GCC/ARM_CM23/non_secure/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM23_SECURE>:
GCC/ARM_CM23/secure/secure_context_port.c
Expand All @@ -113,11 +116,13 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM23_NTZ_NONSECURE>:
GCC/ARM_CM23_NTZ/non_secure/port.c
GCC/ARM_CM23_NTZ/non_secure/portasm.c>
GCC/ARM_CM23_NTZ/non_secure/portasm.c
GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM33_NONSECURE>:
GCC/ARM_CM33/non_secure/port.c
GCC/ARM_CM33/non_secure/portasm.c>
GCC/ARM_CM33/non_secure/portasm.c
GCC/ARM_CM33/non_secure/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM33_SECURE>:
GCC/ARM_CM33/secure/secure_context_port.c
Expand All @@ -127,16 +132,19 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM33_NTZ_NONSECURE>:
GCC/ARM_CM33_NTZ/non_secure/port.c
GCC/ARM_CM33_NTZ/non_secure/portasm.c>
GCC/ARM_CM33_NTZ/non_secure/portasm.c
GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM33_TFM>:
GCC/ARM_CM33_NTZ/non_secure/port.c
GCC/ARM_CM33_NTZ/non_secure/portasm.c
GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c
ThirdParty/GCC/ARM_TFM/os_wrapper_freertos.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM35P_NONSECURE>:
GCC/ARM_CM35P/non_secure/port.c
GCC/ARM_CM35P/non_secure/portasm.c>
GCC/ARM_CM35P/non_secure/portasm.c
GCC/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM35P_SECURE>:
GCC/ARM_CM35P/secure/secure_context_port.c
Expand All @@ -146,12 +154,14 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM35P_NTZ_NONSECURE>:
GCC/ARM_CM35P_NTZ/non_secure/port.c
GCC/ARM_CM35P_NTZ/non_secure/portasm.c>
GCC/ARM_CM35P_NTZ/non_secure/portasm.c
GCC/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.c>

# ARMv8.1-M ports for GCC
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM55_NONSECURE>:
GCC/ARM_CM55/non_secure/port.c
GCC/ARM_CM55/non_secure/portasm.c>
GCC/ARM_CM55/non_secure/portasm.c
GCC/ARM_CM55/non_secure/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM55_SECURE>:
GCC/ARM_CM55/secure/secure_context_port.c
Expand All @@ -161,16 +171,19 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM55_NTZ_NONSECURE>:
GCC/ARM_CM55_NTZ/non_secure/port.c
GCC/ARM_CM55_NTZ/non_secure/portasm.c>
GCC/ARM_CM55_NTZ/non_secure/portasm.c
GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM55_TFM>:
GCC/ARM_CM55_NTZ/non_secure/port.c
GCC/ARM_CM55_NTZ/non_secure/portasm.c
GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c
ThirdParty/GCC/ARM_TFM/os_wrapper_freertos.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM85_NONSECURE>:
GCC/ARM_CM85/non_secure/port.c
GCC/ARM_CM85/non_secure/portasm.c>
GCC/ARM_CM85/non_secure/portasm.c
GCC/ARM_CM85/non_secure/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM85_SECURE>:
GCC/ARM_CM85/secure/secure_context_port.c
Expand All @@ -180,11 +193,13 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM85_NTZ_NONSECURE>:
GCC/ARM_CM85_NTZ/non_secure/port.c
GCC/ARM_CM85_NTZ/non_secure/portasm.c>
GCC/ARM_CM85_NTZ/non_secure/portasm.c
GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM85_TFM>:
GCC/ARM_CM85_NTZ/non_secure/port.c
GCC/ARM_CM85_NTZ/non_secure/portasm.c
GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c
ThirdParty/GCC/ARM_TFM/os_wrapper_freertos.c>

# ARMv7-R ports for GCC
Expand Down Expand Up @@ -391,7 +406,8 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM4F_MPU>:
IAR/ARM_CM4F_MPU/port.c
IAR/ARM_CM4F_MPU/portasm.s>
IAR/ARM_CM4F_MPU/portasm.s
IAR/ARM_CM4F_MPU/mpu_wrappers_v2_asm.S>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM7>:
IAR/ARM_CM7/r0p1/port.c
Expand All @@ -400,7 +416,8 @@ add_library(freertos_kernel_port STATIC
# ARMv8-M Ports for IAR EWARM
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM23_NONSECURE>:
IAR/ARM_CM23/non_secure/port.c
IAR/ARM_CM23/non_secure/portasm.s>
IAR/ARM_CM23/non_secure/portasm.s
IAR/ARM_CM23/non_secure/mpu_wrappers_v2_asm.S>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM23_SECURE>:
IAR/ARM_CM23/secure/secure_context_port_asm.s
Expand All @@ -410,11 +427,13 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM23_NTZ_NONSECURE>:
IAR/ARM_CM23_NTZ/non_secure/port.c
IAR/ARM_CM23_NTZ/non_secure/portasm.s>
IAR/ARM_CM23_NTZ/non_secure/portasm.s
IAR/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.S>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM33_NONSECURE>:
IAR/ARM_CM33/non_secure/port.c
IAR/ARM_CM33/non_secure/portasm.s>
IAR/ARM_CM33/non_secure/portasm.s
IAR/ARM_CM33/non_secure/mpu_wrappers_v2_asm.S>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM33_SECURE>:
IAR/ARM_CM33/secure/secure_context_port_asm.s
Expand All @@ -424,11 +443,13 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM33_NTZ_NONSECURE>:
IAR/ARM_CM33_NTZ/non_secure/port.c
IAR/ARM_CM33_NTZ/non_secure/portasm.s>
IAR/ARM_CM33_NTZ/non_secure/portasm.s
IAR/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.S>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM35P_NONSECURE>:
IAR/ARM_CM35P/non_secure/port.c
IAR/ARM_CM35P/non_secure/portasm.s>
IAR/ARM_CM35P/non_secure/portasm.s
IAR/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.S>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM35P_SECURE>:
IAR/ARM_CM35P/secure/secure_context_port_asm.s
Expand All @@ -438,12 +459,14 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM35P_NTZ_NONSECURE>:
IAR/ARM_CM35P_NTZ/non_secure/port.c
IAR/ARM_CM35P_NTZ/non_secure/portasm.s>
IAR/ARM_CM35P_NTZ/non_secure/portasm.s
IAR/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.S>

# ARMv8.1-M ports for IAR EWARM
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM55_NONSECURE>:
IAR/ARM_CM55/non_secure/port.c
IAR/ARM_CM55/non_secure/portasm.s>
IAR/ARM_CM55/non_secure/portasm.s
IAR/ARM_CM55/non_secure/mpu_wrappers_v2_asm.S>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM55_SECURE>:
IAR/ARM_CM55/secure/secure_context_port_asm.s
Expand All @@ -453,11 +476,13 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM55_NTZ_NONSECURE>:
IAR/ARM_CM55_NTZ/non_secure/port.c
IAR/ARM_CM55_NTZ/non_secure/portasm.s>
IAR/ARM_CM55_NTZ/non_secure/portasm.s
IAR/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.S>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM85_NONSECURE>:
IAR/ARM_CM85/non_secure/port.c
IAR/ARM_CM85/non_secure/portasm.s>
IAR/ARM_CM85/non_secure/portasm.s
IAR/ARM_CM85/non_secure/mpu_wrappers_v2_asm.S>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM85_SECURE>:
IAR/ARM_CM85/secure/secure_context_port_asm.s
Expand All @@ -467,7 +492,8 @@ add_library(freertos_kernel_port STATIC

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM85_NTZ_NONSECURE>:
IAR/ARM_CM85_NTZ/non_secure/port.c
IAR/ARM_CM85_NTZ/non_secure/portasm.s>
IAR/ARM_CM85_NTZ/non_secure/portasm.s
IAR/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.S>

# ARMv7-R Ports for IAR EWARM
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CRX_NOGIC>:
Expand Down Expand Up @@ -659,7 +685,8 @@ add_library(freertos_kernel_port STATIC

# ARMv7E-M ports for ARM RVDS / armcc
$<$<STREQUAL:${FREERTOS_PORT},RVDS_ARM_CM4_MPU>:
RVDS/ARM_CM4_MPU/port.c>
RVDS/ARM_CM4_MPU/port.c
RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c>

$<$<STREQUAL:${FREERTOS_PORT},RVDS_ARM_CM4F>:
RVDS/ARM_CM4F/port.c>
Expand Down Expand Up @@ -723,7 +750,10 @@ if( FREERTOS_PORT MATCHES "GCC_ARM_CM(3|4)_MPU" OR
FREERTOS_PORT MATCHES "IAR_ARM_CM(23|33|55|85)_NTZ_NONSECURE" OR
FREERTOS_PORT MATCHES "IAR_ARM_CM(23|33|55|85)_NONSECURE"
)
target_sources(freertos_kernel_port PRIVATE Common/mpu_wrappers.c)
target_sources(freertos_kernel_port PRIVATE
Common/mpu_wrappers.c
Common/mpu_wrappers_v2.c
)
endif()

target_include_directories(freertos_kernel_port PUBLIC
Expand Down

0 comments on commit c083af9

Please sign in to comment.