This repository has been archived on 2022-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
Marlin-Artillery-M600/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py

56 lines
1.3 KiB
Python
Raw Normal View History

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