From 124a5cbd3ebb36e779b67ce00e76ad5803ffb9b1 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 10 May 2018 23:08:50 +0300 Subject: [PATCH] Switch to the latest toolchain for ESP-IDF --- builder/frameworks/espidf.py | 12 ++++++------ platform.json | 2 +- platform.py | 6 ++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index b0f2e1b..b7369d4 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -110,7 +110,7 @@ def find_valid_config_file(): env.Exit(1) return files[0] - + def build_espidf_bootloader(): envsafe = env.Clone() @@ -303,7 +303,7 @@ env.Append( "-T", "esp32.rom.spiram_incompatible_fns.ld" ], - UPLOADERFLAGS=[ + EXTRA_ESPTOOL_UPLOADFLAGS=[ "0x1000", join("$BUILD_DIR", "bootloader.bin"), "0x8000", join("$BUILD_DIR", "partitions_table.bin"), "0x10000" @@ -324,13 +324,13 @@ else: with open(join(env.subst("$PROJECTSRC_DIR"), "sdkconfig.h")) as fp: for l in fp.readlines(): if "CONFIG_ADC_CAL_LUT_ENABLE" in l: - is_new = True + is_new = True break - + if not is_new: print("Warning! Detected an outdated \"sdkconfig.h\" file. " - "The old \"sdkconfig.h\" will be replaced by the new one.") - + "The old \"sdkconfig.h\" will be replaced by the new one.") + new_config = find_valid_config_file() copy( join(env.subst("$PROJECTSRC_DIR"), "sdkconfig.h"), diff --git a/platform.json b/platform.json index 46b6e7d..d1be4bf 100644 --- a/platform.json +++ b/platform.json @@ -40,7 +40,7 @@ "packages": { "toolchain-xtensa32": { "type": "toolchain", - "version": "~1.50200.2" + "version": "~2.50200.0" }, "framework-arduinoespressif32": { "type": "framework", diff --git a/platform.py b/platform.py index 41cc4e2..87eaa8c 100644 --- a/platform.py +++ b/platform.py @@ -18,8 +18,10 @@ from platformio.managers.platform import PlatformBase class Espressif32Platform(PlatformBase): def configure_default_packages(self, variables, targets): - if "arduino" in variables.get("pioframework"): - self.packages['toolchain-xtensa32']['version'] = "~2.50200.0" + if "buildfs" in targets: + self.packages['tool-mkspiffs']['optional'] = False + if variables.get("upload_protocol"): + self.packages['tool-openocd-esp32']['optional'] = False return PlatformBase.configure_default_packages( self, variables, targets)