Skip to content

Commit 9bda449

Browse files
authored
Merge pull request #9614 from kfnta/tools_gcc_fix
Fix cortex-m33-S gcc compilation error
2 parents 57d8915 + 0e7d172 commit 9bda449

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/toolchains/gcc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
5454
self.flags["ld"].append("--specs=nano.specs")
5555

5656
core = target.core
57+
self.cpu = []
5758
if CORE_ARCH[target.core] == 8:
5859
# Add linking time preprocessor macro DOMAIN_NS
5960
if target.core.endswith("-NS"):
@@ -75,9 +76,9 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
7576
"Cortex-M33FE": "cortex-m33"}.get(core, core)
7677

7778
if core == "Cortex-M33":
78-
self.cpu = ["-march=armv8-m.main"]
79+
self.cpu.append("-march=armv8-m.main")
7980
else:
80-
self.cpu = ["-mcpu={}".format(cpu.lower())]
81+
self.cpu.append("-mcpu={}".format(cpu.lower()))
8182

8283
if target.core.startswith("Cortex-M"):
8384
self.cpu.append("-mthumb")

0 commit comments

Comments
 (0)