Install latest stable Arduino core version (#59)
* Update platform.json * Fetch stable release from GH API / Arduino package json * use get * Update platform.py * use matching Arduino libs to release * silence debug prints
This commit is contained in:
+3
-3
@@ -18,7 +18,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pioarduino/platform-espressif32.git"
|
"url": "https://github.com/pioarduino/platform-espressif32.git"
|
||||||
},
|
},
|
||||||
"version": "51.03.07",
|
"version": "51.03.0x-stable",
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"arduino": {
|
"arduino": {
|
||||||
"script": "builder/frameworks/arduino.py"
|
"script": "builder/frameworks/arduino.py"
|
||||||
@@ -33,13 +33,13 @@
|
|||||||
"type": "framework",
|
"type": "framework",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"owner": "espressif",
|
"owner": "espressif",
|
||||||
"version": "https://github.com/espressif/arduino-esp32/releases/download/3.0.7/esp32-3.0.7.zip"
|
"version": ""
|
||||||
},
|
},
|
||||||
"framework-arduinoespressif32-libs": {
|
"framework-arduinoespressif32-libs": {
|
||||||
"type": "framework",
|
"type": "framework",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"owner": "espressif",
|
"owner": "espressif",
|
||||||
"version": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.1/esp32-arduino-libs-idf-release_v5.1-632e0c2a.zip"
|
"version": ""
|
||||||
},
|
},
|
||||||
"framework-espidf": {
|
"framework-espidf": {
|
||||||
"type": "framework",
|
"type": "framework",
|
||||||
|
|||||||
+12
@@ -45,6 +45,18 @@ class Espressif32Platform(PlatformBase):
|
|||||||
if "arduino" in frameworks:
|
if "arduino" in frameworks:
|
||||||
self.packages["framework-arduinoespressif32"]["optional"] = False
|
self.packages["framework-arduinoespressif32"]["optional"] = False
|
||||||
self.packages["framework-arduinoespressif32-libs"]["optional"] = False
|
self.packages["framework-arduinoespressif32-libs"]["optional"] = False
|
||||||
|
# use latest stable release Arduino core
|
||||||
|
ARDUINO_CORE_API_URL = "https://api.github.com/repos/espressif/Arduino-esp32/releases/latest"
|
||||||
|
api_data = requests.get(ARDUINO_CORE_API_URL, timeout=10).json()
|
||||||
|
zipball = api_data.get("zipball_url")
|
||||||
|
tag = api_data.get("tag_name")
|
||||||
|
# print("Latest release Arduino core URL:", zipball)
|
||||||
|
self.packages["framework-arduinoespressif32"]["version"] = zipball
|
||||||
|
# use corresponding espressif Arduino libs to release
|
||||||
|
URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/" + tag + "/package/package_esp32_index.template.json"
|
||||||
|
packjdata = requests.get(URL, timeout=10).json()
|
||||||
|
dyn_lib_url = packjdata['packages'][0]['tools'][0]['systems'][0]['url']
|
||||||
|
self.packages["framework-arduinoespressif32-libs"]["version"] = dyn_lib_url
|
||||||
|
|
||||||
if "buildfs" in targets:
|
if "buildfs" in targets:
|
||||||
filesystem = variables.get("board_build.filesystem", "littlefs")
|
filesystem = variables.get("board_build.filesystem", "littlefs")
|
||||||
|
|||||||
Reference in New Issue
Block a user