Skip to content

Commit d1e5c34

Browse files
RobinKastberghenrikbrixandersen
authored andcommitted
iar: toolchain: Cortex-M85 support
Add support in IAR build system for Cortex-M85. Signed-off-by: Robin Kastberg <[email protected]>
1 parent 945133e commit d1e5c34

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

cmake/compiler/iar/iccarm-cpu.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ if("${ARCH}" STREQUAL "arm")
3636
else()
3737
set(ICCARM_CPU Cortex-M55.no_dsp)
3838
endif()
39+
elseif(CONFIG_CPU_CORTEX_M85)
40+
if(CONFIG_ARMV8_1_M_MVEF)
41+
set(ICCARM_CPU Cortex-M85)
42+
elseif(CONFIG_ARMV8_1_M_MVEI)
43+
set(ICCARM_CPU Cortex-M85.no_mve)
44+
elseif(CONFIG_ARMV8_M_DSP)
45+
set(ICCARM_CPU Cortex-M85.no_mve)
46+
else()
47+
set(ICCARM_CPU Cortex-M85.no_dsp)
48+
endif()
3949
elseif(CONFIG_CPU_CORTEX_R4)
4050
if(CONFIG_FPU AND CONFIG_CPU_HAS_VFP)
4151
set(ICCARM_CPU Cortex-R4F)

cmake/compiler/iar/target.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,18 @@ if("${IAR_TOOLCHAIN_VARIANT}" STREQUAL "iccarm")
122122
if(CONFIG_FPU)
123123
list(APPEND IAR_COMMON_FLAGS --fpu=${ICCARM_FPU})
124124
list(APPEND IAR_ASM_FLAGS -mfpu=${GCC_M_FPU})
125+
if(CONFIG_DCLS AND NOT CONFIG_FP_HARDABI)
126+
# If the processor is equipped with VFP and configured in DCLS topology,
127+
# the FP "hard" ABI must be used in order to facilitate the FP register
128+
# initialisation and synchronisation.
129+
set(FORCE_FP_HARDABI TRUE)
130+
endif()
131+
132+
if(CONFIG_FP_HARDABI OR FORCE_FP_HARDABI)
133+
list(APPEND IAR_ASM_FLAGS -mfloat-abi=hard)
134+
elseif(CONFIG_FP_SOFTABI)
135+
list(APPEND ARM_ASM_FLAGS -mfloat-abi=softfp)
136+
endif()
125137
endif()
126138
endif()
127139

0 commit comments

Comments
 (0)