Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cortex-m33-S gcc compilation error #9614

Merged
merged 1 commit into from Feb 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions tools/toolchains/gcc.py
Expand Up @@ -54,6 +54,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
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"):
Expand All @@ -75,9 +76,9 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
"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")
Expand Down