forked from espressif/arduino-esp32
Properly handle ARDUINO_PARTITION define in PlatformIO (#6681)
This fixes possible issues when developers specify arbitrary partition files using relative or absolute paths. Additionally, hyphens in filenames are replaced with underscores to avoid compilation warnings "ISO C++11 requires whitespace after the macro name" Resolves platformio/platform-espressif32#787
This commit is contained in:
@ -24,7 +24,7 @@ http://arduino.cc/en/Reference/HomePage
|
||||
|
||||
# Extends: https://github.com/platformio/platform-espressif32/blob/develop/builder/main.py
|
||||
|
||||
from os.path import abspath, isdir, isfile, join
|
||||
from os.path import abspath, basename, isdir, isfile, join
|
||||
|
||||
from SCons.Script import DefaultEnvironment
|
||||
|
||||
@ -314,7 +314,8 @@ env.Append(
|
||||
("ARDUINO", 10812),
|
||||
("ARDUINO_VARIANT", '\\"%s\\"' % env.BoardConfig().get("build.variant").replace('"', "")),
|
||||
("ARDUINO_BOARD", '\\"%s\\"' % env.BoardConfig().get("name").replace('"', "")),
|
||||
"ARDUINO_PARTITION_%s" % env.BoardConfig().get("build.partitions", "default.csv").replace(".csv", "")
|
||||
"ARDUINO_PARTITION_%s" % basename(env.BoardConfig().get(
|
||||
"build.partitions", "default.csv")).replace(".csv", "").replace("-", "_")
|
||||
],
|
||||
|
||||
LIBSOURCE_DIRS=[
|
||||
|
Reference in New Issue
Block a user