mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Merge pull request #14185 from hugueskamba/hk_cmake_fix_arm_mcu_core_flags
CMake: Correct ARM toolchain MCU core flagspull/14188/head
						commit
						e7cd244d11
					
				| 
						 | 
				
			
			@ -11,15 +11,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mno-unaligned-access"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-a9"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-A9"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-A9"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,15 +8,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mcpu=cortex-m0plus"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m0plus"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M0plus"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M0plus"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,15 +8,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mcpu=cortex-m0"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m0"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M0"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M0"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,15 +7,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mthumb"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m1"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M1"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M1"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,15 +7,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mthumb"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m23"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M23"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M23"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,15 +7,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mthumb"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m23"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M23"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M23"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,15 +8,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mcpu=cortex-m3"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m3"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M3"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M3"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,17 +10,11 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-march=armv8-m.main"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m33+nodsp"
 | 
			
		||||
        "-mfpu=fpv5-sp-d16"
 | 
			
		||||
        "-mfloat-abi=hard"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M33.no_dsp"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M33.no_dsp"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,17 +10,11 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-march=armv8-m.main"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m33+nodsp"
 | 
			
		||||
        "-mfpu=fpv5-sp-d16"
 | 
			
		||||
        "-mfloat-abi=hard"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M33.no_dsp"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M33.no_dsp"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,15 +10,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-march=armv8-m.main+dsp"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m33"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M33"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M33"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,15 +10,9 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-march=armv8-m.main+dsp"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m33"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M33"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M33"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,16 +8,10 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mcpu=cortex-m4"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m4"
 | 
			
		||||
        "-mfpu=none"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M4.no_fp"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M4.no_fp"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,17 +10,11 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mfloat-abi=softfp"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m4"
 | 
			
		||||
        "-mfpu=fpv4-sp-d16"
 | 
			
		||||
        "-mfloat-abi=hard"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M4"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M4"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,16 +8,10 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mcpu=cortex-m7"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m7"
 | 
			
		||||
        "-mfpu=none"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M7.no_fp"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M7.no_fp"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,17 +10,11 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		|||
        "-mcpu=cortex-m7"
 | 
			
		||||
    )
 | 
			
		||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
    list(APPEND c_cxx_compile_options
 | 
			
		||||
    list(APPEND common_options
 | 
			
		||||
        "-mcpu=cortex-m7"
 | 
			
		||||
        "-mfpu=fpv5-d16"
 | 
			
		||||
        "-mfloat-abi=hard"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND asm_compile_options
 | 
			
		||||
        "-mcpu=Cortex-M7"
 | 
			
		||||
    )
 | 
			
		||||
    list(APPEND link_options
 | 
			
		||||
        "--cpu=Cortex-M7"
 | 
			
		||||
    )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
function(mbed_set_cpu_core_definitions target)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue