Improve support for hand-written asm source files

This commit is contained in:
Ivan Kravets 2022-05-28 15:54:59 +03:00
parent 6de524e45d
commit 6caac4d451
2 changed files with 10 additions and 5 deletions

View File

@ -21,7 +21,12 @@ from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
env.Append(
ASFLAGS=["-x", "assembler-with-cpp"],
ASFLAGS=[
"-mthumb",
],
ASPPFLAGS=[
"-x", "assembler-with-cpp",
],
CCFLAGS=[
"-Os", # optimize for size
@ -54,6 +59,9 @@ env.Append(
if "BOARD" in env:
env.Append(
ASFLAGS=[
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
],
CCFLAGS=[
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
],
@ -61,6 +69,3 @@ if "BOARD" in env:
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
]
)
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])

@ -1 +1 @@
Subproject commit 36ee4ff8adb0d80d6ff15e03b34e7b10a147b4d0
Subproject commit ed9a3458e336660fdf2b1d4a4c828a2ddfd214ad