Skip to content

Commit 9ef89be

Browse files
committed
Improve support for hand-written asm source files
1 parent b5761ab commit 9ef89be

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

builder/frameworks/_bare.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
env = DefaultEnvironment()
2222

2323
env.Append(
24-
ASFLAGS=["-x", "assembler-with-cpp"],
24+
ASFLAGS=[
25+
"-mthumb",
26+
],
27+
ASPPFLAGS=[
28+
"-x", "assembler-with-cpp",
29+
],
2530

2631
CCFLAGS=[
2732
"-Os", # optimize for size
@@ -54,13 +59,13 @@
5459

5560
if "BOARD" in env:
5661
env.Append(
62+
ASFLAGS=[
63+
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
64+
],
5765
CCFLAGS=[
5866
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
5967
],
6068
LINKFLAGS=[
6169
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
6270
]
6371
)
64-
65-
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
66-
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])

0 commit comments

Comments
 (0)