Skip to content

Commit cd6cb71

Browse files
committed
CMake: Fix Cortex-M33 GCC build
The GCC flag to specify the floating-point hardware (`mfpu`) does not accept the value `none`. The default value is `auto` which causes the compiler to select the floating-point and Advanced SIMD instructions based on the settings of -mcpu and -march. The extension option `+nofp` has been added to disable floating point instructions.
1 parent 2660621 commit cd6cb71

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tools/cmake/cores/Cortex-M33-NS.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
66
list(APPEND common_options
77
"-mthumb"
8-
"-mcpu=cortex-m33+nodsp"
9-
"-mfpu=none"
8+
"-mcpu=cortex-m33+nodsp+nofp"
109
)
1110
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1211
list(APPEND common_options

tools/cmake/cores/Cortex-M33.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
66
list(APPEND common_options
77
"-mthumb"
8-
"-mcpu=cortex-m33+nodsp"
9-
"-mfpu=none"
8+
"-mcpu=cortex-m33+nodsp+nofp"
109
)
1110
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1211
list(APPEND common_options

0 commit comments

Comments
 (0)