Skip to content

Commit 8790e6f

Browse files
authored
idf-release/v5.4 when existing
1 parent 2b04e34 commit 8790e6f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

platform.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,15 @@ def install_tool(TOOL, retry_count=0):
120120
if "arduino" in frameworks:
121121
self.packages["framework-arduinoespressif32"]["optional"] = False
122122
self.packages["framework-arduinoespressif32-libs"]["optional"] = False
123-
# use matching espressif Arduino libs
124-
#URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json"
125-
#packjdata = requests.get(URL).json()
126-
#dyn_lib_url = packjdata['packages'][0]['tools'][0]['systems'][0]['url']
127-
# use newer libs as linked in package_esp32_index.template.json is too old
128-
dyn_lib_url = "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.4/esp32-arduino-libs-idf-release_v5.4-3ad36321-v1.zip"
123+
try:
124+
# use newer branch idf-release/v5.4 when existing
125+
self.packages["framework-arduinoespressif32"]["version"] = "https://github.com/espressif/arduino-esp32/archive/refs/heads/idf-release/v5.4.zip"
126+
URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/idf-release/v5.4/package/package_esp32_index.template.json"
127+
except:
128+
# use branch master
129+
URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json"
130+
packjdata = requests.get(URL).json()
131+
dyn_lib_url = packjdata['packages'][0]['tools'][0]['systems'][0]['url']
129132
self.packages["framework-arduinoespressif32-libs"]["version"] = dyn_lib_url
130133

131134
if variables.get("custom_sdkconfig") is not None or len(str(board_sdkconfig)) > 3:

0 commit comments

Comments
 (0)