2017-06-17 21:19:42 +00:00
|
|
|
#dynaomic build flags for generic compile options
|
|
|
|
if __name__ == "__main__":
|
|
|
|
print " ".join([ "-std=gnu11",
|
|
|
|
"-std=gnu++11",
|
|
|
|
"-Os",
|
|
|
|
"-mcpu=cortex-m3",
|
|
|
|
"-mthumb",
|
|
|
|
|
|
|
|
"-ffreestanding",
|
|
|
|
"-fsigned-char",
|
|
|
|
"-fno-move-loop-invariants",
|
|
|
|
|
|
|
|
"-Wall",
|
|
|
|
"--specs=nano.specs",
|
|
|
|
"--specs=nosys.specs",
|
|
|
|
|
2017-08-01 16:19:23 +00:00
|
|
|
"-IMarlin/frameworks/CMSIS/LPC1768/include",
|
|
|
|
"-IMarlin/frameworks/CMSIS/LPC1768/lib",
|
|
|
|
"-IMarlin/src/HAL",
|
2017-06-17 21:19:42 +00:00
|
|
|
|
|
|
|
"-MMD",
|
|
|
|
"-MP",
|
|
|
|
"-DTARGET_LPC1768",
|
|
|
|
"-DIS_REARM"
|
|
|
|
])
|
|
|
|
|
|
|
|
# extra script for linker options
|
|
|
|
else:
|
|
|
|
from SCons.Script import DefaultEnvironment
|
|
|
|
env = DefaultEnvironment()
|
|
|
|
env.Append(
|
|
|
|
ARFLAGS=["rcs"],
|
|
|
|
|
|
|
|
ASFLAGS=["-x", "assembler-with-cpp"],
|
|
|
|
|
|
|
|
CXXFLAGS=[
|
|
|
|
"-fabi-version=0",
|
|
|
|
"-fno-use-cxa-atexit",
|
|
|
|
"-fno-threadsafe-statics"
|
|
|
|
],
|
|
|
|
LINKFLAGS=[
|
|
|
|
"-Os",
|
|
|
|
"-mcpu=cortex-m3",
|
|
|
|
"-ffreestanding",
|
|
|
|
"-mthumb",
|
|
|
|
"--specs=nano.specs",
|
|
|
|
"--specs=nosys.specs",
|
|
|
|
"-u_printf_float",
|
2017-08-01 16:19:23 +00:00
|
|
|
"-Wl,-TMarlin/frameworks/CMSIS/LPC1768/Re-ARM/LPC1768.ld,--gc-sections"
|
2017-06-17 21:19:42 +00:00
|
|
|
],
|
|
|
|
)
|