Skip to content

Commit

Permalink
CMake: Add Cortex-M55 and Cortex-M85 ports
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbartell committed Sep 15, 2022
1 parent 37f5068 commit 3af0bec
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 4 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ if(NOT FREERTOS_PORT)
" GCC_ARM_CM33_NONSECURE - Compiller: GCC Target: ARM Cortex-M33 non-secure\n"
" GCC_ARM_CM33_SECURE - Compiller: GCC Target: ARM Cortex-M33 secure\n"
" GCC_ARM_CM33_NTZ_NONSECURE - Compiller: GCC Target: ARM Cortex-M33 non-trustzone non-secure\n"
" GCC_ARM_CM33_TFM - Compiller: GCC Target: ARM Cortex-M33 non-secure for TF-M\n"
" GCC_ARM_CM55_NONSECURE - Compiller: GCC Target: ARM Cortex-M55 non-secure\n"
" GCC_ARM_CM55_SECURE - Compiller: GCC Target: ARM Cortex-M55 secure\n"
" GCC_ARM_CM55_NTZ_NONSECURE - Compiller: GCC Target: ARM Cortex-M55 non-trustzone non-secure\n"
" GCC_ARM_CM55_TFM - Compiller: GCC Target: ARM Cortex-M55 non-secure for TF-M\n"
" GCC_ARM_CM85_NONSECURE - Compiller: GCC Target: ARM Cortex-M85 non-secure\n"
" GCC_ARM_CM85_SECURE - Compiller: GCC Target: ARM Cortex-M85 secure\n"
" GCC_ARM_CM85_NTZ_NONSECURE - Compiller: GCC Target: ARM Cortex-M85 non-trustzone non-secure\n"
" GCC_ARM_CM85_TFM - Compiller: GCC Target: ARM Cortex-M85 non-secure for TF-M\n"
" GCC_ARM_CR5 - Compiller: GCC Target: ARM Cortex-R5\n"
" GCC_ARM_CRX_NOGIC - Compiller: GCC Target: ARM Cortex-Rx no GIC\n"
" GCC_ARM7_AT91FR40008 - Compiller: GCC Target: ARM7 Atmel AT91R40008\n"
Expand Down Expand Up @@ -115,6 +124,12 @@ if(NOT FREERTOS_PORT)
" IAR_ARM_CM33_NONSECURE - Compiller: IAR Target: ARM Cortex-M33 non-secure\n"
" IAR_ARM_CM33_SECURE - Compiller: IAR Target: ARM Cortex-M33 secure\n"
" IAR_ARM_CM33_NTZ_NONSECURE - Compiller: IAR Target: ARM Cortex-M33 non-trustzone non-secure\n"
" IAR_ARM_CM55_NONSECURE - Compiller: IAR Target: ARM Cortex-M55 non-secure\n"
" IAR_ARM_CM55_SECURE - Compiller: IAR Target: ARM Cortex-M55 secure\n"
" IAR_ARM_CM55_NTZ_NONSECURE - Compiller: IAR Target: ARM Cortex-M55 non-trustzone non-secure\n"
" IAR_ARM_CM85_NONSECURE - Compiller: IAR Target: ARM Cortex-M85 non-secure\n"
" IAR_ARM_CM85_SECURE - Compiller: IAR Target: ARM Cortex-M85 secure\n"
" IAR_ARM_CM85_NTZ_NONSECURE - Compiller: IAR Target: ARM Cortex-M85 non-trustzone non-secure\n"
" IAR_ARM_CRX_NOGIC - Compiller: IAR Target: ARM Cortex-Rx no GIC\n"
" IAR_ATMEGA323 - Compiller: IAR Target: ATMega323\n"
" IAR_ATMEL_SAM7S64 - Compiller: IAR Target: Atmel SAM7S64\n"
Expand Down
109 changes: 105 additions & 4 deletions portable/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ add_library(freertos_kernel_port STATIC
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM0>:
GCC/ARM_CM0/port.c>

# ARMv6-M / Cortex-M0 Raspberry PI RP2040 port for GCC
$<$<STREQUAL:${FREERTOS_PORT},GCC_RP2040>:
ThirdParty/GCC/RP2040/idle_task_static_memory.c
ThirdParty/GCC/RP2040/port.c>
Expand Down Expand Up @@ -110,9 +111,49 @@ add_library(freertos_kernel_port STATIC
GCC/ARM_CM33_NTZ/non_secure/port.c
GCC/ARM_CM33_NTZ/non_secure/portasm.c>

# ARM Cortex-M33 TFM helper functions
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM33_TFM>:
ThirdParty/GCC/ARM_CM33_TFM/os_wrapper_freertos.c>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_TFM>:
GCC/ARM_CM33_NTZ/non_secure/port.c
GCC/ARM_CM33_NTZ/non_secure/portasm.c
ThirdParty/GCC/ARM_TFM/os_wrapper_freertos.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>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM55_SECURE>:
GCC/ARM_CM55/secure/secure_context_port.c
GCC/ARM_CM55/secure/secure_context.c
GCC/ARM_CM55/secure/secure_heap.c
GCC/ARM_CM55/secure/secure_init.c>

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

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM55_TFM>:
GCC/ARM_CM55_NTZ/non_secure/port.c
GCC/ARM_CM55_NTZ/non_secure/portasm.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>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM85_SECURE>:
GCC/ARM_CM85/secure/secure_context_port.c
GCC/ARM_CM85/secure/secure_context.c
GCC/ARM_CM85/secure/secure_heap.c
GCC/ARM_CM85/secure/secure_init.c>

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

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

# ARMv7-R ports for GCC
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CR5>:
Expand Down Expand Up @@ -349,6 +390,35 @@ add_library(freertos_kernel_port STATIC
IAR/ARM_CM33_NTZ/non_secure/port.c
IAR/ARM_CM33_NTZ/non_secure/portasm.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>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM55_SECURE>:
IAR/ARM_CM55/secure/secure_context_port_asm.s
IAR/ARM_CM55/secure/secure_context.c
IAR/ARM_CM55/secure/secure_heap.c
IAR/ARM_CM55/secure/secure_init.c>

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

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

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM85_SECURE>:
IAR/ARM_CM85/secure/secure_context_port_asm.s
IAR/ARM_CM85/secure/secure_context.c
IAR/ARM_CM85/secure/secure_heap.c
IAR/ARM_CM85/secure/secure_init.c>

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

# ARMv7-R Ports for IAR EWARM
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CRX_NOGIC>:
IAR/ARM_CRx_No_GIC/port.c
Expand Down Expand Up @@ -483,7 +553,6 @@ add_library(freertos_kernel_port STATIC
oWatcom/16BitDOS/common/portcomn.c
oWatcom/16BitDOS/PC/port.c>


$<$<STREQUAL:${FREERTOS_PORT},PARADIGM_TERN_EE_LARGE>:
Paradigm/Tern_EE/large_untested/port.c>

Expand Down Expand Up @@ -597,13 +666,24 @@ if(
FREERTOS_PORT STREQUAL "GCC_ARM_CM23_NTZ_NONSECURE" OR
FREERTOS_PORT STREQUAL "GCC_ARM_CM23_NONSECURE" OR
FREERTOS_PORT STREQUAL "GCC_ARM_CM33_NTZ_NONSECURE" OR
FREERTOS_PORT STREQUAL "GCC_ARM_TFM" OR
FREERTOS_PORT STREQUAL "GCC_ARM_CM33_NONSECURE" OR
FREERTOS_PORT STREQUAL "GCC_ARM_CM55_NTZ_NONSECURE" OR
FREERTOS_PORT STREQUAL "GCC_ARM_CM55_TFM" OR
FREERTOS_PORT STREQUAL "GCC_ARM_CM55_NONSECURE" OR
FREERTOS_PORT STREQUAL "GCC_ARM_CM85_NTZ_NONSECURE" OR
FREERTOS_PORT STREQUAL "GCC_ARM_CM85_TFM" OR
FREERTOS_PORT STREQUAL "GCC_ARM_CM85_NONSECURE" OR
FREERTOS_PORT STREQUAL "IAR_ARM_CM4F_MPU" OR
FREERTOS_PORT STREQUAL "RVDS_ARM_CM4_MPU" OR
FREERTOS_PORT STREQUAL "IAR_ARM_CM23_NTZ_NONSECURE" OR
FREERTOS_PORT STREQUAL "IAR_ARM_CM23_NONSECURE" OR
FREERTOS_PORT STREQUAL "IAR_ARM_CM33_NTZ_NONSECURE" OR
FREERTOS_PORT STREQUAL "IAR_ARM_CM33_NONSECURE"
FREERTOS_PORT STREQUAL "IAR_ARM_CM55_NTZ_NONSECURE" OR
FREERTOS_PORT STREQUAL "IAR_ARM_CM55_NONSECURE" OR
FREERTOS_PORT STREQUAL "IAR_ARM_CM85_NTZ_NONSECURE" OR
FREERTOS_PORT STREQUAL "IAR_ARM_CM85_NONSECURE"
)
target_sources(freertos_kernel_port PRIVATE Common/mpu_wrappers.c)
endif()
Expand Down Expand Up @@ -665,6 +745,18 @@ target_include_directories(freertos_kernel_port PUBLIC
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM33_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM33/non_secure>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM33_SECURE>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM33/secure>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM33_NTZ_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM33_NTZ/non_secure>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_TFM>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM33_NTZ/non_secure>

# ARMv8.1-M ports for GCC
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM55_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM55/non_secure>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM55_SECURE>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM55/secure>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM55_NTZ_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM55_NTZ/non_secure>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM55_TFM>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM85_NTZ/non_secure>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM85_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM85/non_secure>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM85_SECURE>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM85/secure>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM85_NTZ_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM85_NTZ/non_secure>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CM85_TFM>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CM85_NTZ/non_secure>

# ARMv7-R ports for GCC
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CR5>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CR5>
Expand Down Expand Up @@ -777,6 +869,15 @@ target_include_directories(freertos_kernel_port PUBLIC
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM33_SECURE>:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM33/secure>
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM33_NTZ_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM33_NTZ/non_secure>

# ARMv8.1-M ports for IAR EWARM
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM55_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM55/non_secure>
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM55_SECURE>:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM55/secure>
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM55_NTZ_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM55_NTZ/non_secure>

$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM85_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM85/non_secure>
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM85_SECURE>:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM85/secure>
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CM85_NTZ_NONSECURE>:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CM85_NTZ/non_secure>

# ARMv7-R Ports for IAR EWARM
$<$<STREQUAL:${FREERTOS_PORT},IAR_ARM_CRX_NOGIC>:${CMAKE_CURRENT_LIST_DIR}/IAR/ARM_CRx_No_GIC>

Expand Down

0 comments on commit 3af0bec

Please sign in to comment.