mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-02 03:14:26 +02:00
Refactor platform build scripts // Resolve #528
This commit is contained in:
@@ -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"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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",
|
||||||
|
@@ -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(
|
||||||
|
@@ -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"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
@@ -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)
|
||||||
|
Reference in New Issue
Block a user