Skip to content

Commit a132586

Browse files
committed
CMake: Fix Cortex-M33-NS and Cortex-M33 ASM flags
The ASM flags were not supported by armclang, use the armclang alternatives. Removed armlink --cpu flag as they generate a CMake configuration time error. Furthermore, it is not necessary to specify the processor or architecture as the linker auto-detects it from the input object files. See: https://developer.arm.com/documentation/101754/0615/armlink-Reference/armlink-Command-line-Options/--cpu-name--armlink-
1 parent c51b78f commit a132586

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1414
"-mfpu=none"
1515
)
1616
list(APPEND asm_compile_options
17-
"-mcpu=Cortex-M33.no_dsp.no_fp"
18-
)
19-
list(APPEND link_options
20-
"--cpu=Cortex-M33.no_dsp.no_fp"
17+
"-mcpu=cortex-m33+nodsp"
18+
"-mfpu=none"
2119
)
2220
endif()
2321

tools/cmake/cores/Cortex-M33.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1414
"-mfpu=none"
1515
)
1616
list(APPEND asm_compile_options
17-
"-mcpu=Cortex-M33.no_dsp.no_fp"
18-
)
19-
list(APPEND link_options
20-
"--cpu=Cortex-M33.no_dsp.no_fp"
17+
"-mcpu=cortex-m33+nodsp"
18+
"-mfpu=none"
2119
)
2220
endif()
2321

0 commit comments

Comments
 (0)