Skip to content

Commit

Permalink
Merge pull request ARMmbed#14196 from 0xc0170/fix-cores-gcc
Browse files Browse the repository at this point in the history
CMake cores: fix cpu/fpu flags
  • Loading branch information
0xc0170 authored Feb 2, 2021
2 parents 276e835 + 0a990e7 commit 2e96400
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 13 deletions.
4 changes: 3 additions & 1 deletion tools/cmake/cores/Cortex-A9.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
list(APPEND common_options
"-mthumb-interwork"
"-marm"
"-march=armv7-a"
"-mfpu=vfpv3"
"-mfloat-abi=hard"
"-mno-unaligned-access"
"-mcpu=cortex-a9"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
"-mfpu=vfpv3"
"-mfloat-abi=hard"
"-mcpu=cortex-a9"
)
endif()
Expand Down
1 change: 1 addition & 0 deletions tools/cmake/cores/Cortex-M1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
list(APPEND common_options
"-mthumb"
"-mcpu=cortex-m1"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
Expand Down
1 change: 1 addition & 0 deletions tools/cmake/cores/Cortex-M23-NS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
list(APPEND common_options
"-mthumb"
"-mcpu=cortex-m23"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
Expand Down
1 change: 1 addition & 0 deletions tools/cmake/cores/Cortex-M23.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
list(APPEND common_options
"-mthumb"
"-mcpu=cortex-m23"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
Expand Down
2 changes: 1 addition & 1 deletion tools/cmake/cores/Cortex-M33-NS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
list(APPEND common_options
"-mthumb"
"-mcpu=cortex-m33+nodsp"
"-march=armv8-m.main"
"-mfpu=none"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
Expand Down
2 changes: 1 addition & 1 deletion tools/cmake/cores/Cortex-M33.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
list(APPEND common_options
"-mthumb"
"-mcpu=cortex-m33+nodsp"
"-march=armv8-m.main"
"-mfpu=none"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
Expand Down
4 changes: 2 additions & 2 deletions tools/cmake/cores/Cortex-M33F-NS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
"-mthumb"
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=softfp"
"-march=armv8-m.main"
"-mcpu=cortex-m33+nodsp"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
"-mcpu=cortex-m33+nodsp"
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=hard"
"-mcpu=cortex-m33+nodsp"
)
endif()

Expand Down
4 changes: 2 additions & 2 deletions tools/cmake/cores/Cortex-M33F.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
"-mthumb"
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=softfp"
"-march=armv8-m.main"
"-mcpu=cortex-m33+nodsp"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
"-mcpu=cortex-m33+nodsp"
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=hard"
"-mcpu=cortex-m33+nodsp"
)
endif()

Expand Down
6 changes: 4 additions & 2 deletions tools/cmake/cores/Cortex-M33FE-NS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
"-mthumb"
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=softfp"
"-march=armv8-m.main+dsp"
"-mcpu=cortex-m33"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
"-mcpu=cortex-m33"
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=hard"
"-mcpu=cortex-m33+dsp"
)
endif()

Expand Down
6 changes: 4 additions & 2 deletions tools/cmake/cores/Cortex-M33FE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
"-mthumb"
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=softfp"
"-march=armv8-m.main+dsp"
"-mcpu=cortex-m33"
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
"-mcpu=cortex-m33"
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=hard"
"-mcpu=cortex-m33+dsp"
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion tools/cmake/cores/Cortex-M7F.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
"-mcpu=cortex-m7"
"-mfpu=fpv5-sp-d16"
"-mfloat-abi=hard"
"-mcpu=cortex-m7"
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion tools/cmake/cores/Cortex-M7FD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
list(APPEND common_options
"-mcpu=cortex-m7"
"-mfpu=fpv5-d16"
"-mfloat-abi=hard"
"-mcpu=cortex-m7"
)
endif()

Expand Down

0 comments on commit 2e96400

Please sign in to comment.