Sync flags with platform.txt; Custom partitions per board (#875)

* Sync flags with platform.txt

* Add support for custom partitions per board

* Add "-fstack-protector" to CCFLAGS
This commit is contained in:
Ivan Kravets 2017-11-26 02:22:42 +02:00 committed by Me No Dev
parent a907113ba2
commit 8eecfd21b4

View File

@ -36,16 +36,19 @@ assert isdir(FRAMEWORK_DIR)
env.Prepend( env.Prepend(
CPPDEFINES=[ CPPDEFINES=[
("ARDUINO", 10610), ("ARDUINO", 10805),
"ARDUINO_ARCH_ESP32" "ARDUINO_ARCH_ESP32",
("ARDUINO_BOARD", '\\"%s\\"' % env.BoardConfig().get("name").replace('"', ""))
], ],
CFLAGS=["-Wno-old-style-declaration"], CFLAGS=["-Wno-old-style-declaration"],
CCFLAGS=[ CCFLAGS=[
"-Wno-error=deprecated-declarations", "-Wno-error=deprecated-declarations",
"-Wno-error=unused-function",
"-Wno-unused-parameter", "-Wno-unused-parameter",
"-Wno-sign-compare" "-Wno-sign-compare",
"-fstack-protector"
], ],
CPPPATH=[ CPPPATH=[
@ -174,11 +177,11 @@ env.Prepend(LIBS=libs)
# #
# Generate partition table # Generate partition table
# #
partition_table = env.Command( partition_table = env.Command(
join("$BUILD_DIR", "partitions.bin"), join("$BUILD_DIR", "partitions.bin"),
join(FRAMEWORK_DIR, "tools", "partitions", "default.csv"), join(FRAMEWORK_DIR, "tools", "partitions",
env.VerboseAction('"$PYTHONEXE" "%s" -q $SOURCE $TARGET' % "%s.csv" % env.BoardConfig().get("build.partitions", "default")),
join(FRAMEWORK_DIR, "tools", "gen_esp32part.py"), env.VerboseAction('"$PYTHONEXE" "%s" -q $SOURCE $TARGET' % join(
FRAMEWORK_DIR, "tools", "gen_esp32part.py"),
"Generating partitions $TARGET")) "Generating partitions $TARGET"))
env.Depends("$BUILD_DIR/$PROGNAME$PROGSUFFIX", partition_table) env.Depends("$BUILD_DIR/$PROGNAME$PROGSUFFIX", partition_table)