Skip to content

Commit 2e96400

Browse files
authored
Merge pull request #14196 from 0xc0170/fix-cores-gcc
CMake cores: fix cpu/fpu flags
2 parents 276e835 + 0a990e7 commit 2e96400

12 files changed

+22
-13
lines changed

tools/cmake/cores/Cortex-A9.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
55
list(APPEND common_options
66
"-mthumb-interwork"
77
"-marm"
8-
"-march=armv7-a"
98
"-mfpu=vfpv3"
109
"-mfloat-abi=hard"
1110
"-mno-unaligned-access"
11+
"-mcpu=cortex-a9"
1212
)
1313
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1414
list(APPEND common_options
15+
"-mfpu=vfpv3"
16+
"-mfloat-abi=hard"
1517
"-mcpu=cortex-a9"
1618
)
1719
endif()

tools/cmake/cores/Cortex-M1.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
66
list(APPEND common_options
77
"-mthumb"
8+
"-mcpu=cortex-m1"
89
)
910
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1011
list(APPEND common_options

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
66
list(APPEND common_options
77
"-mthumb"
8+
"-mcpu=cortex-m23"
89
)
910
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1011
list(APPEND common_options

tools/cmake/cores/Cortex-M23.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
66
list(APPEND common_options
77
"-mthumb"
8+
"-mcpu=cortex-m23"
89
)
910
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1011
list(APPEND common_options

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
66
list(APPEND common_options
77
"-mthumb"
88
"-mcpu=cortex-m33+nodsp"
9-
"-march=armv8-m.main"
9+
"-mfpu=none"
1010
)
1111
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1212
list(APPEND common_options

tools/cmake/cores/Cortex-M33.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
66
list(APPEND common_options
77
"-mthumb"
88
"-mcpu=cortex-m33+nodsp"
9-
"-march=armv8-m.main"
9+
"-mfpu=none"
1010
)
1111
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1212
list(APPEND common_options

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
77
"-mthumb"
88
"-mfpu=fpv5-sp-d16"
99
"-mfloat-abi=softfp"
10-
"-march=armv8-m.main"
10+
"-mcpu=cortex-m33+nodsp"
1111
)
1212
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1313
list(APPEND common_options
14-
"-mcpu=cortex-m33+nodsp"
1514
"-mfpu=fpv5-sp-d16"
1615
"-mfloat-abi=hard"
16+
"-mcpu=cortex-m33+nodsp"
1717
)
1818
endif()
1919

tools/cmake/cores/Cortex-M33F.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
77
"-mthumb"
88
"-mfpu=fpv5-sp-d16"
99
"-mfloat-abi=softfp"
10-
"-march=armv8-m.main"
10+
"-mcpu=cortex-m33+nodsp"
1111
)
1212
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1313
list(APPEND common_options
14-
"-mcpu=cortex-m33+nodsp"
1514
"-mfpu=fpv5-sp-d16"
1615
"-mfloat-abi=hard"
16+
"-mcpu=cortex-m33+nodsp"
1717
)
1818
endif()
1919

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
77
"-mthumb"
88
"-mfpu=fpv5-sp-d16"
99
"-mfloat-abi=softfp"
10-
"-march=armv8-m.main+dsp"
10+
"-mcpu=cortex-m33"
1111
)
1212
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1313
list(APPEND common_options
14-
"-mcpu=cortex-m33"
14+
"-mfpu=fpv5-sp-d16"
15+
"-mfloat-abi=hard"
16+
"-mcpu=cortex-m33+dsp"
1517
)
1618
endif()
1719

tools/cmake/cores/Cortex-M33FE.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
77
"-mthumb"
88
"-mfpu=fpv5-sp-d16"
99
"-mfloat-abi=softfp"
10-
"-march=armv8-m.main+dsp"
10+
"-mcpu=cortex-m33"
1111
)
1212
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1313
list(APPEND common_options
14-
"-mcpu=cortex-m33"
14+
"-mfpu=fpv5-sp-d16"
15+
"-mfloat-abi=hard"
16+
"-mcpu=cortex-m33+dsp"
1517
)
1618
endif()
1719

tools/cmake/cores/Cortex-M7F.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
1111
)
1212
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1313
list(APPEND common_options
14-
"-mcpu=cortex-m7"
1514
"-mfpu=fpv5-sp-d16"
1615
"-mfloat-abi=hard"
16+
"-mcpu=cortex-m7"
1717
)
1818
endif()
1919

tools/cmake/cores/Cortex-M7FD.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
1111
)
1212
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
1313
list(APPEND common_options
14-
"-mcpu=cortex-m7"
1514
"-mfpu=fpv5-d16"
1615
"-mfloat-abi=hard"
16+
"-mcpu=cortex-m7"
1717
)
1818
endif()
1919

0 commit comments

Comments
 (0)