Switch to the latest toolchain for ESP-IDF
This commit is contained in:
@@ -110,7 +110,7 @@ def find_valid_config_file():
|
|||||||
env.Exit(1)
|
env.Exit(1)
|
||||||
|
|
||||||
return files[0]
|
return files[0]
|
||||||
|
|
||||||
|
|
||||||
def build_espidf_bootloader():
|
def build_espidf_bootloader():
|
||||||
envsafe = env.Clone()
|
envsafe = env.Clone()
|
||||||
@@ -303,7 +303,7 @@ env.Append(
|
|||||||
"-T", "esp32.rom.spiram_incompatible_fns.ld"
|
"-T", "esp32.rom.spiram_incompatible_fns.ld"
|
||||||
],
|
],
|
||||||
|
|
||||||
UPLOADERFLAGS=[
|
EXTRA_ESPTOOL_UPLOADFLAGS=[
|
||||||
"0x1000", join("$BUILD_DIR", "bootloader.bin"),
|
"0x1000", join("$BUILD_DIR", "bootloader.bin"),
|
||||||
"0x8000", join("$BUILD_DIR", "partitions_table.bin"),
|
"0x8000", join("$BUILD_DIR", "partitions_table.bin"),
|
||||||
"0x10000"
|
"0x10000"
|
||||||
@@ -324,13 +324,13 @@ else:
|
|||||||
with open(join(env.subst("$PROJECTSRC_DIR"), "sdkconfig.h")) as fp:
|
with open(join(env.subst("$PROJECTSRC_DIR"), "sdkconfig.h")) as fp:
|
||||||
for l in fp.readlines():
|
for l in fp.readlines():
|
||||||
if "CONFIG_ADC_CAL_LUT_ENABLE" in l:
|
if "CONFIG_ADC_CAL_LUT_ENABLE" in l:
|
||||||
is_new = True
|
is_new = True
|
||||||
break
|
break
|
||||||
|
|
||||||
if not is_new:
|
if not is_new:
|
||||||
print("Warning! Detected an outdated \"sdkconfig.h\" file. "
|
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()
|
new_config = find_valid_config_file()
|
||||||
copy(
|
copy(
|
||||||
join(env.subst("$PROJECTSRC_DIR"), "sdkconfig.h"),
|
join(env.subst("$PROJECTSRC_DIR"), "sdkconfig.h"),
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@
|
|||||||
"packages": {
|
"packages": {
|
||||||
"toolchain-xtensa32": {
|
"toolchain-xtensa32": {
|
||||||
"type": "toolchain",
|
"type": "toolchain",
|
||||||
"version": "~1.50200.2"
|
"version": "~2.50200.0"
|
||||||
},
|
},
|
||||||
"framework-arduinoespressif32": {
|
"framework-arduinoespressif32": {
|
||||||
"type": "framework",
|
"type": "framework",
|
||||||
|
|||||||
+4
-2
@@ -18,8 +18,10 @@ from platformio.managers.platform import PlatformBase
|
|||||||
class Espressif32Platform(PlatformBase):
|
class Espressif32Platform(PlatformBase):
|
||||||
|
|
||||||
def configure_default_packages(self, variables, targets):
|
def configure_default_packages(self, variables, targets):
|
||||||
if "arduino" in variables.get("pioframework"):
|
if "buildfs" in targets:
|
||||||
self.packages['toolchain-xtensa32']['version'] = "~2.50200.0"
|
self.packages['tool-mkspiffs']['optional'] = False
|
||||||
|
if variables.get("upload_protocol"):
|
||||||
|
self.packages['tool-openocd-esp32']['optional'] = False
|
||||||
return PlatformBase.configure_default_packages(
|
return PlatformBase.configure_default_packages(
|
||||||
self, variables, targets)
|
self, variables, targets)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user