diff --git a/tools/cmake/cores/Cortex-M33-NS.cmake b/tools/cmake/cores/Cortex-M33-NS.cmake index 2bbc19c4a75..40a074b0c1d 100644 --- a/tools/cmake/cores/Cortex-M33-NS.cmake +++ b/tools/cmake/cores/Cortex-M33-NS.cmake @@ -12,6 +12,13 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") "-mcpu=cortex-m33+nodsp" "-mfpu=none" ) + list(APPEND link_options + # Necessary as the linker does not always detect + # the architecture from the objectfiles correctly. + # Also, the complete flag should be "--cpu=Cortex-M33.no_dsp.no_fp" + # but this currently conflicts with CMake's compiler test until fixed + "--cpu=Cortex-M33.no_fp" + ) endif() function(mbed_set_cpu_core_definitions target) diff --git a/tools/cmake/cores/Cortex-M33.cmake b/tools/cmake/cores/Cortex-M33.cmake index b9245eb09db..2a369276d82 100644 --- a/tools/cmake/cores/Cortex-M33.cmake +++ b/tools/cmake/cores/Cortex-M33.cmake @@ -12,6 +12,13 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") "-mcpu=cortex-m33+nodsp" "-mfpu=none" ) + list(APPEND link_options + # Necessary as the linker does not always detect + # the architecture from the objectfiles correctly. + # Also, the complete flag should be "--cpu=Cortex-M33.no_dsp.no_fp" + # but this currently conflicts with CMake's compiler test until fixed + "--cpu=Cortex-M33.no_fp" + ) endif() function(mbed_set_cpu_core_definitions target)