Refactor CPPDEFINES to tuple style

This commit is contained in:
Ivan Kravets
2016-11-30 15:53:58 +02:00
parent 52c3b5b6a0
commit ecb47153c7
3 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ assert isdir(FRAMEWORK_DIR)
env.Prepend( env.Prepend(
CPPDEFINES=[ CPPDEFINES=[
"ARDUINO=10600", ("ARDUINO", 10610),
"ARDUINO_ARCH_ESP32" "ARDUINO_ARCH_ESP32"
], ],
+2 -4
View File
@@ -20,13 +20,11 @@ Espressif IoT Development Framework for ESP32 MCU
https://github.com/espressif/esp-idf https://github.com/espressif/esp-idf
""" """
import sys from os import listdir
from os import listdir, makedirs
from os.path import isdir, join from os.path import isdir, join
from SCons.Script import DefaultEnvironment from SCons.Script import DefaultEnvironment
from platformio.util import exec_command
env = DefaultEnvironment() env = DefaultEnvironment()
platform = env.PioPlatform() platform = env.PioPlatform()
@@ -41,7 +39,7 @@ def build_espidf_bootloader():
envsafe = env.Clone() envsafe = env.Clone()
framework_dir = env.subst("$ESPIDF_DIR") framework_dir = env.subst("$ESPIDF_DIR")
envsafe.Replace( envsafe.Replace(
CPPDEFINES=["ESP_PLATFORM", "BOOTLOADER_BUILD=1"], CPPDEFINES=["ESP_PLATFORM", ("BOOTLOADER_BUILD", 1)],
LIBPATH=[ LIBPATH=[
join(framework_dir, "components", "esp32", "ld"), join(framework_dir, "components", "esp32", "ld"),
+2 -2
View File
@@ -67,9 +67,9 @@ env.Replace(
CPPDEFINES=[ CPPDEFINES=[
"ESP32", "ESP32",
"ESP_PLATFORM", "ESP_PLATFORM",
"F_CPU=$BOARD_F_CPU", ("F_CPU", "$BOARD_F_CPU"),
"HAVE_CONFIG_H", "HAVE_CONFIG_H",
"MBEDTLS_CONFIG_FILE=\\\"mbedtls/esp_config.h\\\"" ("MBEDTLS_CONFIG_FILE", '\\"mbedtls/esp_config.h\\"')
], ],
LINKFLAGS=[ LINKFLAGS=[