forked from platformio/platformio-core
Update build flags form atmelsam // Resolve #601
This commit is contained in:
@ -95,13 +95,26 @@ else:
|
|||||||
)
|
)
|
||||||
|
|
||||||
env.Append(
|
env.Append(
|
||||||
|
CFLAGS=[
|
||||||
|
"-std=gnu11",
|
||||||
|
"--param", "max-inline-insns-single=500"
|
||||||
|
],
|
||||||
|
|
||||||
CXXFLAGS=[
|
CXXFLAGS=[
|
||||||
|
"-std=gnu++11",
|
||||||
"-fno-threadsafe-statics"
|
"-fno-threadsafe-statics"
|
||||||
],
|
],
|
||||||
|
|
||||||
CPPDEFINES=[
|
CPPDEFINES=[
|
||||||
"USBCON",
|
"USBCON",
|
||||||
'USB_MANUFACTURER="PlatformIO"'
|
'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"):
|
elif "zero" in env.subst("$BOARD"):
|
||||||
env.Append(
|
env.Append(
|
||||||
CCFLAGS=[
|
|
||||||
"--param", "max-inline-insns-single=500"
|
|
||||||
],
|
|
||||||
|
|
||||||
LINKFLAGS=[
|
LINKFLAGS=[
|
||||||
"--specs=nosys.specs",
|
"--specs=nosys.specs",
|
||||||
"--specs=nano.specs"
|
"--specs=nano.specs"
|
||||||
|
@ -256,16 +256,6 @@ if BOARD_BUILDOPTS.get("core", None) == "teensy3":
|
|||||||
"M4" if BOARD_BUILDOPTS.get("cpu") == "cortex-m4" else "M0")
|
"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(
|
libs.append(envsafe.BuildLibrary(
|
||||||
join("$BUILD_DIR", "FrameworkArduino"),
|
join("$BUILD_DIR", "FrameworkArduino"),
|
||||||
@ -279,11 +269,7 @@ if "sam3x8e" in BOARD_BUILDOPTS.get("mcu", None):
|
|||||||
"${BOARD_OPTIONS['build']['variant']}")
|
"${BOARD_OPTIONS['build']['variant']}")
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
envsafe.Append(
|
|
||||||
CFLAGS=[
|
|
||||||
"-std=gnu99"
|
|
||||||
]
|
|
||||||
)
|
|
||||||
libs.append("sam_sam3x8e_gcc_rel")
|
libs.append("sam_sam3x8e_gcc_rel")
|
||||||
|
|
||||||
env.Prepend(LIBS=libs)
|
env.Prepend(LIBS=libs)
|
||||||
|
Reference in New Issue
Block a user