Merge pull request #9614 from kfnta/tools_gcc_fix

Fix cortex-m33-S gcc compilation error
pull/9636/head
Martin Kojtal 2019-02-07 09:24:00 +01:00 committed by GitHub
commit 9bda4494ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -54,6 +54,7 @@ class GCC(mbedToolchain):
self.flags["ld"].append("--specs=nano.specs")
core = target.core
self.cpu = []
if CORE_ARCH[target.core] == 8:
# Add linking time preprocessor macro DOMAIN_NS
if target.core.endswith("-NS"):
@ -75,9 +76,9 @@ class GCC(mbedToolchain):
"Cortex-M33FE": "cortex-m33"}.get(core, core)
if core == "Cortex-M33":
self.cpu = ["-march=armv8-m.main"]
self.cpu.append("-march=armv8-m.main")
else:
self.cpu = ["-mcpu={}".format(cpu.lower())]
self.cpu.append("-mcpu={}".format(cpu.lower()))
if target.core.startswith("Cortex-M"):
self.cpu.append("-mthumb")