mirror of https://github.com/ARMmbed/mbed-os.git
Add -mcmse flag for GCC and improved logic for cpu core
parent
9422c351e4
commit
ca1f24cc0e
|
@ -86,11 +86,14 @@ class GCC(mbedToolchain):
|
|||
self.cpu.append("-mfloat-abi=hard")
|
||||
self.cpu.append("-mno-unaligned-access")
|
||||
|
||||
if target.core == "Cortex-M23" or target.core == "Cortex-M23-NS":
|
||||
if target.core.startswith("Cortex-M23"):
|
||||
self.cpu.append("-march=armv8-m.base")
|
||||
elif target.core == "Cortex-M33" or target.core == "Cortex-M33-NS":
|
||||
elif target.core.startswith("Cortex-M33"):
|
||||
self.cpu.append("-march=armv8-m.main")
|
||||
|
||||
if target.core == "Cortex-M23" or target.core == "Cortex-M33":
|
||||
self.cpu.append("-mcmse")
|
||||
|
||||
self.flags["common"] += self.cpu
|
||||
|
||||
main_cc = join(tool_path, "arm-none-eabi-gcc")
|
||||
|
|
|
@ -45,9 +45,9 @@ class IAR(mbedToolchain):
|
|||
build_profile=build_profile)
|
||||
if target.core == "Cortex-M7F" or target.core == "Cortex-M7FD":
|
||||
cpuchoice = "Cortex-M7"
|
||||
elif target.core == "Cortex-M23-NS" or target.core == "Cortex-M23":
|
||||
elif target.core.startswith("Cortex-M23"):
|
||||
cpuchoice = "8-M.baseline"
|
||||
elif target.core == "Cortex-M33-NS" or target.core == "Cortex-M33":
|
||||
elif target.core.startswith("Cortex-M33"):
|
||||
cpuchoice = "8-M.mainline"
|
||||
else:
|
||||
cpuchoice = target.core
|
||||
|
|
Loading…
Reference in New Issue