aboutsummaryrefslogtreecommitdiff
path: root/cmake/toolchain/arm-none-eabi-gcc.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/toolchain/arm-none-eabi-gcc.cmake')
-rw-r--r--cmake/toolchain/arm-none-eabi-gcc.cmake18
1 files changed, 13 insertions, 5 deletions
diff --git a/cmake/toolchain/arm-none-eabi-gcc.cmake b/cmake/toolchain/arm-none-eabi-gcc.cmake
index d37a3dc..ec10b2f 100644
--- a/cmake/toolchain/arm-none-eabi-gcc.cmake
+++ b/cmake/toolchain/arm-none-eabi-gcc.cmake
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020-2021 Arm Limited. All rights reserved.
+# Copyright (c) 2020-2022 Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -40,9 +40,16 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
+set(GCC_CPU "${TARGET_CPU}")
+if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "cortex-m85")
+ set(GCC_CPU "cortex-m55")
+ list(APPEND GCC_CPU ${TARGET_CPU_FEATURES})
+ list(JOIN GCC_CPU "+" GCC_CPU)
+endif()
+
# Compile options
add_compile_options(
- -mcpu=${TARGET_CPU}
+ -mcpu=${GCC_CPU}
-mthumb
"$<$<CONFIG:DEBUG>:-gdwarf-3>"
"$<$<COMPILE_LANGUAGE:CXX>:-fno-unwind-tables;-fno-rtti;-fno-exceptions>")
@@ -53,7 +60,7 @@ add_compile_definitions(
# Link options
add_link_options(
- -mcpu=${TARGET_CPU}
+ -mcpu=${GCC_CPU}
-mthumb
--specs=nosys.specs)
@@ -63,7 +70,8 @@ if("${TARGET_CPU}" MATCHES "\\+fp")
elseif("${TARGET_CPU}" MATCHES "\\+nofp")
set(FLOAT soft)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "cortex-m33" OR
- "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "cortex-m55")
+ "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "cortex-m55" OR
+ "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "cortex-m85")
set(FLOAT hard)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "cortex-m4" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "cortex-m7")
@@ -97,4 +105,4 @@ add_compile_options(
-Wunused
-Wno-redundant-decls
-) \ No newline at end of file
+)