Refactor platform build scripts // Resolve #528

This commit is contained in:
Valeriy Koval
2016-02-22 21:52:44 +02:00
parent 66713021de
commit 17796de60d
7 changed files with 22 additions and 10 deletions

View File

@@ -120,7 +120,7 @@ if "due" in env.subst("$BOARD"):
) )
elif "zero" in env.subst("$BOARD"): elif "zero" in env.subst("$BOARD"):
env.Append( env.Append(
CPPFLAGS=[ CCFLAGS=[
"--param", "max-inline-insns-single=500" "--param", "max-inline-insns-single=500"
], ],

View File

@@ -31,9 +31,12 @@ env.Replace(
ARFLAGS=["rcs"], ARFLAGS=["rcs"],
ASPPFLAGS=["-x", "assembler-with-cpp"], ASFLAGS=[
"-x", "assembler-with-cpp",
"$CCFLAGS"
],
CPPFLAGS=[ CCFLAGS=[
"-g", # include debugging info (so errors include line numbers) "-g", # include debugging info (so errors include line numbers)
"-Os", # optimize for size "-Os", # optimize for size
"-ffunction-sections", # place each function in its own section "-ffunction-sections", # place each function in its own section

View File

@@ -31,9 +31,12 @@ env.Replace(
ARFLAGS=["rcs"], ARFLAGS=["rcs"],
ASPPFLAGS=["-x", "assembler-with-cpp"], ASFLAGS=[
"-x", "assembler-with-cpp",
"$CCFLAGS"
],
CPPFLAGS=[ CCFLAGS=[
"-g", # include debugging info (so errors include line numbers) "-g", # include debugging info (so errors include line numbers)
"-Os", # optimize for size "-Os", # optimize for size
"-Wall", # show warnings "-Wall", # show warnings

View File

@@ -64,7 +64,10 @@ env.Replace(
ARFLAGS=["rcs"], ARFLAGS=["rcs"],
ASPPFLAGS=["-x", "assembler-with-cpp"], ASFLAGS=[
"-x", "assembler-with-cpp",
"$CCFLAGS"
],
CFLAGS=[ CFLAGS=[
"-std=gnu99", "-std=gnu99",
@@ -75,7 +78,7 @@ env.Replace(
"-nostdlib" "-nostdlib"
], ],
CPPFLAGS=[ CCFLAGS=[
"-Os", # optimize for size "-Os", # optimize for size
"-mlongcalls", "-mlongcalls",
"-mtext-section-literals", "-mtext-section-literals",

View File

@@ -27,7 +27,7 @@ SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
if env.subst("$BOARD") == "rfduino": if env.subst("$BOARD") == "rfduino":
env.Append( env.Append(
CPPFLAGS=["-fno-builtin"], CCFLAGS=["-fno-builtin"],
LINKFLAGS=["--specs=nano.specs"] LINKFLAGS=["--specs=nano.specs"]
) )
env.Replace( env.Replace(

View File

@@ -31,7 +31,7 @@ elif env.get("BOARD_OPTIONS", {}).get("build", {}).get("core") == "teensy3":
LINKFLAGS=[ LINKFLAGS=[
"-Wl,--defsym=__rtc_localtime=$UNIX_TIME" "-Wl,--defsym=__rtc_localtime=$UNIX_TIME"
], ],
CPPFLAGS=[ CCFLAGS=[
"-fsingle-precision-constant" "-fsingle-precision-constant"
] ]
) )

View File

@@ -36,7 +36,10 @@ env.Replace(
ARFLAGS=["rcs"], ARFLAGS=["rcs"],
ASPPFLAGS=["-x", "assembler-with-cpp"], ASFLAGS=[
"-x", "assembler-with-cpp",
"$CCFLAGS"
],
CCFLAGS=[ CCFLAGS=[
"-g", # include debugging info (so errors include line numbers) "-g", # include debugging info (so errors include line numbers)