2022-06-26 12:00:03 +00:00
|
|
|
Import("ENV")
|
|
|
|
|
|
|
|
|
|
|
|
ENV.AppendUnique(
|
|
|
|
CFLAGS=[
|
|
|
|
"-std=gnu17",
|
|
|
|
],
|
|
|
|
CXXFLAGS=[
|
|
|
|
"-std=c++17",
|
|
|
|
"-fno-rtti",
|
|
|
|
"-fno-use-cxa-atexit",
|
|
|
|
"-fno-exceptions",
|
|
|
|
"-fno-threadsafe-statics",
|
2022-09-14 16:11:38 +00:00
|
|
|
"-ftemplate-depth=4096",
|
2022-06-26 12:00:03 +00:00
|
|
|
],
|
|
|
|
CCFLAGS=[
|
|
|
|
"-mcpu=cortex-m4",
|
|
|
|
"-mfloat-abi=hard",
|
|
|
|
"-mfpu=fpv4-sp-d16",
|
|
|
|
"-mthumb",
|
|
|
|
# "-MMD",
|
|
|
|
# "-MP",
|
|
|
|
"-Wall",
|
|
|
|
"-Wextra",
|
|
|
|
"-Werror",
|
|
|
|
"-Wno-address-of-packed-member",
|
|
|
|
"-Wredundant-decls",
|
|
|
|
"-Wdouble-promotion",
|
|
|
|
"-fdata-sections",
|
|
|
|
"-ffunction-sections",
|
|
|
|
"-fsingle-precision-constant",
|
|
|
|
"-fno-math-errno",
|
2022-11-02 15:15:40 +00:00
|
|
|
# Generates .su files with stack usage information
|
|
|
|
# "-fstack-usage",
|
2022-06-26 12:00:03 +00:00
|
|
|
"-g",
|
|
|
|
],
|
|
|
|
CPPDEFINES=[
|
|
|
|
"_GNU_SOURCE",
|
|
|
|
],
|
|
|
|
LINKFLAGS=[
|
|
|
|
"-mcpu=cortex-m4",
|
|
|
|
"-mfloat-abi=hard",
|
|
|
|
"-mfpu=fpv4-sp-d16",
|
|
|
|
"-mlittle-endian",
|
|
|
|
"-mthumb",
|
|
|
|
],
|
|
|
|
)
|