From 4bcfeb6e331b8927810cbf212fcf688f3150551b Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 27 Oct 2022 19:26:22 +1300 Subject: [PATCH] Update rp2040 to latest framework release from GitHub (#3954) --- esphome/components/rp2040/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/esphome/components/rp2040/__init__.py b/esphome/components/rp2040/__init__.py index f858295974..c759576e4d 100644 --- a/esphome/components/rp2040/__init__.py +++ b/esphome/components/rp2040/__init__.py @@ -37,10 +37,14 @@ def set_core_data(config): def _format_framework_arduino_version(ver: cv.Version) -> str: + # The most recent releases have not been uploaded to platformio so grabbing them directly from + # the GitHub release is one path forward for now. + return f"https://github.com/earlephilhower/arduino-pico/releases/download/{ver}/rp2040-{ver}.zip" + # format the given arduino (https://github.com/earlephilhower/arduino-pico/releases) version to # a PIO earlephilhower/framework-arduinopico value # List of package versions: https://api.registry.platformio.org/v3/packages/earlephilhower/tool/framework-arduinopico - return f"~1.{ver.major}{ver.minor:02d}{ver.patch:02d}.0" + # return f"~1.{ver.major}{ver.minor:02d}{ver.patch:02d}.0" # NOTE: Keep this in mind when updating the recommended version: @@ -52,7 +56,7 @@ def _format_framework_arduino_version(ver: cv.Version) -> str: # The default/recommended arduino framework version # - https://github.com/earlephilhower/arduino-pico/releases # - https://api.registry.platformio.org/v3/packages/earlephilhower/tool/framework-arduinopico -RECOMMENDED_ARDUINO_FRAMEWORK_VERSION = cv.Version(2, 4, 0) +RECOMMENDED_ARDUINO_FRAMEWORK_VERSION = cv.Version(2, 6, 2) # The platformio/raspberrypi version to use for arduino frameworks # - https://github.com/platformio/platform-raspberrypi/releases @@ -63,8 +67,8 @@ ARDUINO_PLATFORM_VERSION = cv.Version(1, 7, 0) def _arduino_check_versions(value): value = value.copy() lookups = { - "dev": (cv.Version(2, 4, 0), "https://github.com/earlephilhower/arduino-pico"), - "latest": (cv.Version(2, 4, 0), None), + "dev": (cv.Version(2, 6, 2), "https://github.com/earlephilhower/arduino-pico"), + "latest": (cv.Version(2, 6, 2), None), "recommended": (RECOMMENDED_ARDUINO_FRAMEWORK_VERSION, None), }