Add -mcmse flag for GCC and improved logic for cpu core

pull/4875/head
Deepika 2017-09-11 11:49:28 -05:00
parent 9422c351e4
commit ca1f24cc0e
2 changed files with 7 additions and 4 deletions

View File

@ -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")

View File

@ -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