Skip to content

Add cortex-m55 to CMake support #14213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmsis/CMSIS_5/CMSIS/RTOS2/RTX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function(_mbed_get_cortex_m_exception_handlers toolchain_dir)
set(STARTUP_RTX_FILE TARGET_M3/irq_cm3.S)
elseif(${key} STREQUAL M33)
set(STARTUP_RTX_FILE TARGET_M33/irq_armv8mml.S)
elseif(${key} STREQUAL M55)
set(STARTUP_RTX_FILE TARGET_M33/irq_armv8mml.S)
elseif(${key} STREQUAL RTOS_M4_M7)
set(STARTUP_RTX_FILE TARGET_RTOS_M4_M7/irq_cm4f.S)
endif()
Expand Down
28 changes: 28 additions & 0 deletions tools/cmake/cores/Cortex-M55.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Sets cpu core options
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
list(APPEND common_options
"-mthumb"
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=softfp"
"-mcpu=cortex-m55"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=hard"
"-mcpu=cortex-m55"
)
endif()

function(mbed_set_cpu_core_definitions target)
target_compile_definitions(${target}
INTERFACE
__CORTEX_M55
__FPU_PRESENT=1
__CMSIS_RTOS
__MBED_CMSIS_RTOS_CM
)
endfunction()
2 changes: 2 additions & 0 deletions tools/cmake/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ elseif (MBED_CPU_CORE STREQUAL Cortex-M4)
set(CMAKE_SYSTEM_PROCESSOR cortex-m4)
elseif (MBED_CPU_CORE STREQUAL Cortex-M4F)
set(CMAKE_SYSTEM_PROCESSOR cortex-m4)
elseif (MBED_CPU_CORE STREQUAL Cortex-M55)
set(CMAKE_SYSTEM_PROCESSOR cortex-m55)
elseif (MBED_CPU_CORE STREQUAL Cortex-M7)
set(CMAKE_SYSTEM_PROCESSOR cortex-m7)
elseif (MBED_CPU_CORE STREQUAL Cortex-M7F)
Expand Down