1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-12-14 14:31:33 +00:00
MarlinFirmware/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py

57 lines
1.4 KiB
Python
Raw Normal View History

from __future__ import print_function
import sys
2017-09-06 11:28:32 +00:00
#dynamic build flags for generic compile options
2017-06-17 21:19:42 +00:00
if __name__ == "__main__":
args = " ".join([ "-std=gnu11",
2017-06-17 21:19:42 +00:00
"-std=gnu++11",
"-Os",
"-mcpu=cortex-m3",
"-mthumb",
"-ffreestanding",
"-fsigned-char",
"-fno-move-loop-invariants",
"-fno-strict-aliasing",
2017-06-17 21:19:42 +00:00
"--specs=nano.specs",
"--specs=nosys.specs",
"-IMarlin/src/HAL",
"-IMarlin/src/HAL/HAL_LPC1768/include",
2017-06-17 21:19:42 +00:00
"-MMD",
"-MP",
"-DTARGET_LPC1768"
2017-06-17 21:19:42 +00:00
])
for i in range(1, len(sys.argv)):
args += " " + sys.argv[i]
print(args)
2017-06-17 21:19:42 +00:00
# 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",
],
)