From 096f514e832518c4dd3bead2de48635ac59c1882 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 9 Jun 2022 19:53:54 +0200 Subject: [PATCH] Adapt to work with registry packages --- builder/main.py | 2 +- .../platformio.ini | 3 --- platform.json | 20 +++++++++---------- platform.py | 8 ++++---- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/builder/main.py b/builder/main.py index 4f70e4e..ece37d9 100644 --- a/builder/main.py +++ b/builder/main.py @@ -168,7 +168,7 @@ def fetch_fs_size(env): "Available sketch size with current " "config would be %d bytes.\n" % maximum_size) sys.stderr.flush() - env.Exit(-1) + env.Exit(1) env["PICO_FLASH_LENGTH"] = flash_length env["PICO_EEPROM_START"] = eeprom_start diff --git a/examples/arduino-blink-earlephilhower/platformio.ini b/examples/arduino-blink-earlephilhower/platformio.ini index e0dd4da..bfdfbef 100644 --- a/examples/arduino-blink-earlephilhower/platformio.ini +++ b/examples/arduino-blink-earlephilhower/platformio.ini @@ -11,9 +11,6 @@ platform = raspberrypi framework = arduino board_build.core = earlephilhower -platform_packages = - maxgerhardt/framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git - maxgerhardt/toolchain-pico@https://github.com/earlephilhower/pico-quick-toolchain/releases/download/1.3.3-a/x86_64-linux-gnu.arm-none-eabi-ed6d983.220212.tar.gz [env:pico] board = pico diff --git a/platform.json b/platform.json index 6284ca3..d75fb40 100644 --- a/platform.json +++ b/platform.json @@ -31,10 +31,10 @@ "owner": "platformio", "version": "~1.90201.0" }, - "toolchain-pico": { + "toolchain-rp2040-earlephilhower": { "type": "toolchain", "optional": true, - "owner": "maxgerhardt", + "owner": "earlephilhower", "version": "~5.100300.0" }, "framework-arduino-mbed": { @@ -46,19 +46,19 @@ "framework-arduinopico": { "type": "framework", "optional": true, - "owner": "maxgerhardt", - "version": "~1.10902.0" + "owner": "earlephilhower", + "version": "https://github.com/earlephilhower/arduino-pico.git" }, "tool-rp2040tools": { "type": "uploader", "owner": "platformio", "version": "~1.0.2" }, - "tool-openocd-raspberrypi": { + "tool-openocd-rp2040-earlephilhower": { "type": "uploader", "optional": true, - "owner": "platformio", - "version": "~2.1100.0" + "owner": "earlephilhower", + "version": "~5.100300.0" }, "tool-jlink": { "type": "uploader", @@ -66,11 +66,11 @@ "owner": "platformio", "version": "~1.72000.0" }, - "tool-mklittlefs": { + "tool-mklittlefs-rp2040-earlephilhower": { "type": "uploader", "optional": true, - "owner": "platformio", - "version": "~1.203.0" + "owner": "earlephilhower", + "version": "~5.100300.0" } } } diff --git a/platform.py b/platform.py index 2fe8087..c419ab2 100644 --- a/platform.py +++ b/platform.py @@ -37,13 +37,13 @@ class RaspberrypiPlatform(PlatformBase): if build_core == "arduino": self.frameworks["arduino"]["package"] = "framework-arduino-mbed" self.packages["framework-arduinopico"]["optional"] = True - self.packages["toolchain-pico"]["optional"] = True - self.packages.pop("toolchain-pico", None) + self.packages["toolchain-rp2040-earlephilhower"]["optional"] = True + self.packages.pop("toolchain-rp2040-earlephilhower", None) elif build_core == "earlephilhower": self.frameworks["arduino"]["package"] = "framework-arduinopico" self.packages["framework-arduino-mbed"]["optional"] = True self.packages.pop("toolchain-gccarmnoneeabi", None) - self.packages["toolchain-pico"]["optional"] = False + self.packages["toolchain-rp2040-earlephilhower"]["optional"] = False else: sys.stderr.write( "Error! Unknown build.core value '%s'. Don't know which Arduino core package to use." % build_core) @@ -117,7 +117,7 @@ class RaspberrypiPlatform(PlatformBase): debug["tools"][link] = { "server": { "executable": "bin/openocd", - "package": "tool-openocd-raspberrypi", + "package": "tool-openocd-rp2040-earlephilhower", "arguments": [ "-s", "$PACKAGE_DIR/share/openocd/scripts", "-f", "interface/%s.cfg" % link,