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