Update build flags form atmelsam // Resolve #601

This commit is contained in:
Valeriy Koval
2016-03-30 11:49:41 +03:00
parent bc3d8d26d0
commit da7ee2c86f
2 changed files with 14 additions and 19 deletions

View File

@ -95,13 +95,26 @@ else:
)
env.Append(
CFLAGS=[
"-std=gnu11",
"--param", "max-inline-insns-single=500"
],
CXXFLAGS=[
"-std=gnu++11",
"-fno-threadsafe-statics"
],
CPPDEFINES=[
"USBCON",
'USB_MANUFACTURER="PlatformIO"'
],
LINKFLAGS=[
"-Wl,--check-sections",
"-Wl,--unresolved-symbols=report-all",
"-Wl,--warn-common",
"-Wl,--warn-section-align"
]
)
@ -124,10 +137,6 @@ if "sam3x8e" in env.get("BOARD_OPTIONS", {}).get("build", {}).get("mcu", None):
)
elif "zero" in env.subst("$BOARD"):
env.Append(
CCFLAGS=[
"--param", "max-inline-insns-single=500"
],
LINKFLAGS=[
"--specs=nosys.specs",
"--specs=nano.specs"

View File

@ -256,16 +256,6 @@ if BOARD_BUILDOPTS.get("core", None) == "teensy3":
"M4" if BOARD_BUILDOPTS.get("cpu") == "cortex-m4" else "M0")
)
if "zero" in env.subst("$BOARD"):
envsafe.Append(
CFLAGS=[
"-std=gnu11"
],
CXXFLAGS=[
"-std=gnu++11",
]
)
libs.append(envsafe.BuildLibrary(
join("$BUILD_DIR", "FrameworkArduino"),
@ -279,11 +269,7 @@ if "sam3x8e" in BOARD_BUILDOPTS.get("mcu", None):
"${BOARD_OPTIONS['build']['variant']}")
]
)
envsafe.Append(
CFLAGS=[
"-std=gnu99"
]
)
libs.append("sam_sam3x8e_gcc_rel")
env.Prepend(LIBS=libs)