From 5fd0124b33f8a49dfde2adcd3135e335feb32fa1 Mon Sep 17 00:00:00 2001 From: valeros Date: Thu, 19 Aug 2021 12:03:16 +0300 Subject: [PATCH 01/18] Use full path to upload tools // Issue #16 --- builder/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/main.py b/builder/main.py index 6ac6086..d34c935 100644 --- a/builder/main.py +++ b/builder/main.py @@ -154,9 +154,9 @@ if upload_protocol == "mbed": ] elif upload_protocol == "picotool": env.Replace( - UPLOADER="rp2040load", + UPLOADER=join(platform.get_package_dir("tool-rp2040tools") or "", "rp2040load"), UPLOADERFLAGS=["-v", "-D"], - UPLOADCMD="$UPLOADER $UPLOADERFLAGS $SOURCES" + UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES' ) upload_actions = [ From 8e0001450d5c20a622ede6139184a59dab04da5f Mon Sep 17 00:00:00 2001 From: valeros Date: Tue, 31 Aug 2021 16:07:05 +0300 Subject: [PATCH 02/18] Bump version to 1.3.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 79fd86f..d41d11c 100644 --- a/platform.json +++ b/platform.json @@ -18,7 +18,7 @@ "type": "git", "url": "https://github.com/platformio/platform-raspberrypi.git" }, - "version": "1.2.0", + "version": "1.3.0", "frameworks": { "arduino": { "package": "framework-arduino-mbed", From 7186039f683f0acc5048b989482acdf9931257b2 Mon Sep 17 00:00:00 2001 From: valeros Date: Thu, 14 Oct 2021 14:42:34 +0300 Subject: [PATCH 03/18] Sync Arduino-mbed build script // Resolve #20 --- builder/frameworks/arduino/mbed-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/frameworks/arduino/mbed-core b/builder/frameworks/arduino/mbed-core index ceb4f60..d0bc621 160000 --- a/builder/frameworks/arduino/mbed-core +++ b/builder/frameworks/arduino/mbed-core @@ -1 +1 @@ -Subproject commit ceb4f608f9b4834ac4fa5472e1db2a2c2f9d216e +Subproject commit d0bc6219b90140f560b456f1632a90795e4cee1e From b97219d294fef83b41fa3a73c30d0d762613eae4 Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Thu, 14 Oct 2021 14:43:34 +0300 Subject: [PATCH 04/18] Update examples.yml --- .github/workflows/examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 94e8130..9d03bd2 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-16.04, windows-latest, macos-latest] + os: [ubuntu-18.04, windows-latest, macos-latest] python-version: [3.7] example: - "examples/arduino-blink" From f2c1d02d2bc5406474df0ef58e9a306bccce64d5 Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 25 Oct 2021 14:45:01 +0300 Subject: [PATCH 05/18] Update Arduino-mbed core to v2.5.2 --- builder/frameworks/arduino/mbed-core | 2 +- platform.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/frameworks/arduino/mbed-core b/builder/frameworks/arduino/mbed-core index d0bc621..36ee4ff 160000 --- a/builder/frameworks/arduino/mbed-core +++ b/builder/frameworks/arduino/mbed-core @@ -1 +1 @@ -Subproject commit d0bc6219b90140f560b456f1632a90795e4cee1e +Subproject commit 36ee4ff8adb0d80d6ff15e03b34e7b10a147b4d0 diff --git a/platform.json b/platform.json index d41d11c..4e1a939 100644 --- a/platform.json +++ b/platform.json @@ -35,7 +35,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~2.4.0" + "version": "~2.5.0" }, "tool-rp2040tools": { "type": "uploader", From 829d328321464aae89ebfd72b33053e9cca504ad Mon Sep 17 00:00:00 2001 From: valeros Date: Sun, 31 Oct 2021 22:35:44 +0200 Subject: [PATCH 06/18] Bump version to 1.4.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 4e1a939..8e07673 100644 --- a/platform.json +++ b/platform.json @@ -18,7 +18,7 @@ "type": "git", "url": "https://github.com/platformio/platform-raspberrypi.git" }, - "version": "1.3.0", + "version": "1.4.0", "frameworks": { "arduino": { "package": "framework-arduino-mbed", From 2f3fcce5e4637f085fa746be5c1174012b6719d5 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 22 Nov 2021 18:33:28 +0200 Subject: [PATCH 07/18] Convert README to markdown --- examples/arduino-blink/README.md | 21 +++++++++++++ examples/arduino-blink/README.rst | 32 ------------------- examples/arduino-external-libs/README.md | 27 ++++++++++++++++ examples/arduino-external-libs/README.rst | 38 ----------------------- 4 files changed, 48 insertions(+), 70 deletions(-) create mode 100644 examples/arduino-blink/README.md delete mode 100644 examples/arduino-blink/README.rst create mode 100644 examples/arduino-external-libs/README.md delete mode 100644 examples/arduino-external-libs/README.rst diff --git a/examples/arduino-blink/README.md b/examples/arduino-blink/README.md new file mode 100644 index 0000000..1e354e0 --- /dev/null +++ b/examples/arduino-blink/README.md @@ -0,0 +1,21 @@ +How to build PlatformIO based project +===================================== + +1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html) +2. Download [development platform with examples](https://github.com/platformio/platform-raspberrypi/archive/develop.zip) +3. Extract ZIP archive +4. Run these commands: + +```shell +# Change directory to example +$ cd platform-raspberrypi/examples/arduino-blink + +# Build project +$ pio run + +# Upload firmware +$ pio run --target upload + +# Clean build files +$ pio run --target clean +``` diff --git a/examples/arduino-blink/README.rst b/examples/arduino-blink/README.rst deleted file mode 100644 index e84aaaf..0000000 --- a/examples/arduino-blink/README.rst +++ /dev/null @@ -1,32 +0,0 @@ -.. Copyright 2014-present PlatformIO - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -How to build PlatformIO based project -===================================== - -1. `Install PlatformIO Core `_ -2. Download `development platform with examples `_ -3. Extract ZIP archive -4. Run these commands: - -.. code-block:: bash - - # Change directory to example - > cd platform-raspberrypi/examples/arduino-blink - - # Build project - > platformio run - - # Upload firmware - > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/arduino-external-libs/README.md b/examples/arduino-external-libs/README.md new file mode 100644 index 0000000..8aa6a5f --- /dev/null +++ b/examples/arduino-external-libs/README.md @@ -0,0 +1,27 @@ +How to build PlatformIO based project +===================================== + +1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html) +2. Download [development platform with examples](https://github.com/platformio/platform-raspberrypi/archive/develop.zip) +3. Extract ZIP archive +4. Run these commands: + +```shell +# Change directory to example +$ cd platform-raspberrypi/examples/arduino-external-libs + +# Build project +$ pio run + +# Upload firmware +$ pio run --target upload + +# Build specific environment +$ pio run -e pico + +# Upload firmware for the specific environment +$ pio run -e pico --target upload + +# Clean build files +$ pio run --target clean +``` diff --git a/examples/arduino-external-libs/README.rst b/examples/arduino-external-libs/README.rst deleted file mode 100644 index 0207a56..0000000 --- a/examples/arduino-external-libs/README.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. Copyright 2014-present PlatformIO - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -How to build PlatformIO based project -===================================== - -1. `Install PlatformIO Core `_ -2. Download `development platform with examples `_ -3. Extract ZIP archive -4. Run these commands: - -.. code-block:: bash - - # Change directory to example - > cd platform-raspberrypi/examples/arduino-external-libs - - # Build project - > platformio run - - # Upload firmware - > platformio run --target upload - - # Build specific environment - > platformio run -e pico - - # Upload firmware for the specific environment - > platformio run -e pico --target upload - - # Clean build files - > platformio run --target clean From 1d9dac6e829334d7d3b5ed0910ccf34e3e588d14 Mon Sep 17 00:00:00 2001 From: valeros Date: Wed, 24 Nov 2021 16:42:14 +0200 Subject: [PATCH 08/18] Update Arduino-mbed core to v2.6.1 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 8e07673..d029ebb 100644 --- a/platform.json +++ b/platform.json @@ -35,7 +35,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~2.5.0" + "version": "~2.6.0" }, "tool-rp2040tools": { "type": "uploader", From c7d1a0854ce22e65b7631d7278748e8080749fc9 Mon Sep 17 00:00:00 2001 From: valeros Date: Tue, 30 Nov 2021 12:33:48 +0200 Subject: [PATCH 09/18] Bump version to 1.5.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index d029ebb..5f41c09 100644 --- a/platform.json +++ b/platform.json @@ -18,7 +18,7 @@ "type": "git", "url": "https://github.com/platformio/platform-raspberrypi.git" }, - "version": "1.4.0", + "version": "1.5.0", "frameworks": { "arduino": { "package": "framework-arduino-mbed", From bda63536970c0f7279e79440e730ca2e0f5205f2 Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Thu, 20 Jan 2022 20:52:19 +0200 Subject: [PATCH 10/18] Typo fix in platform description Fixes platformio/platformio-docs#229 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 5f41c09..043c0f6 100644 --- a/platform.json +++ b/platform.json @@ -1,7 +1,7 @@ { "name": "raspberrypi", "title": "Raspberry Pi RP2040", - "description": "RP2040 is a low-cost, high-performance microcontroller device with with a large on-chip memory, symmetric dual-core processor complex, and rich peripheral.", + "description": "RP2040 is a low-cost, high-performance microcontroller device with a large on-chip memory, symmetric dual-core processor complex, and rich peripheral.", "homepage": "https://www.raspberrypi.org/documentation/rp2040/getting-started/", "license": "Apache-2.0", "keywords": [ From eca3b40879aace058e2b30fd49a1b7c61aad29c9 Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Mon, 21 Feb 2022 16:50:14 +0200 Subject: [PATCH 11/18] Update Arduino-mbed core to v2.7.2 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 043c0f6..4dad7ea 100644 --- a/platform.json +++ b/platform.json @@ -35,7 +35,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~2.6.0" + "version": "~2.7.0" }, "tool-rp2040tools": { "type": "uploader", From d825c1e5313c0fb990ab970b337e743b56ead24c Mon Sep 17 00:00:00 2001 From: Philipp Serr Date: Sat, 26 Feb 2022 22:19:25 +0100 Subject: [PATCH 12/18] Use *.elf instead of *.bin if no offset given --- builder/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builder/main.py b/builder/main.py index d34c935..0854f09 100644 --- a/builder/main.py +++ b/builder/main.py @@ -222,6 +222,8 @@ elif upload_protocol in debug_tools: UPLOADER="openocd", UPLOADERFLAGS=openocd_args, UPLOADCMD="$UPLOADER $UPLOADERFLAGS") + if not board.get("upload").get("offset_address"): + upload_source = target_elf upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")] # custom upload tool From 01a0447aa7e467e59c2e24c16004e3e381565418 Mon Sep 17 00:00:00 2001 From: Philipp Serr Date: Fri, 11 Mar 2022 08:55:44 +0100 Subject: [PATCH 13/18] Configure debug session as required for pio 5.2+ See also https://github.com/platformio/platformio-core/issues/4020 Additionally, this commit replaces deprecated openocd option `adapter_khz` with `adapter speed` --- platform.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/platform.py b/platform.py index c4e29da..bd68da0 100644 --- a/platform.py +++ b/platform.py @@ -100,19 +100,16 @@ class RaspberrypiPlatform(PlatformBase): board.manifest["debug"] = debug return board - def configure_debug_options(self, initial_debug_options, ide_data): - debug_options = copy.deepcopy(initial_debug_options) - adapter_speed = initial_debug_options.get("speed", "5000") - if adapter_speed: - server_options = debug_options.get("server") or {} - server_executable = server_options.get("executable", "").lower() - if "target/cmsis-dap.cfg" in server_options.get("arguments", []): - debug_options["server"]["arguments"].extend( - ["-c", "adapter_khz %s" % adapter_speed] - ) - elif "jlink" in server_executable: - debug_options["server"]["arguments"].extend( - ["-speed", adapter_speed] - ) - - return debug_options + def configure_debug_session(self, debug_config): + adapter_speed = debug_config.speed or "5000" + + server_options = debug_config.server or {} + server_arguments = server_options.get("arguments", []) + if "interface/cmsis-dap.cfg" in server_arguments: + server_arguments.extend( + ["-c", "adapter speed %s" % adapter_speed] + ) + elif "jlink" in server_options.get("executable", "").lower(): + server_arguments.extend( + ["-speed", adapter_speed] + ) From 458dfacd2ffa6cac19895feb92e279774c1d362e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 31 Mar 2022 14:23:40 +0300 Subject: [PATCH 14/18] Switch docs to HTTP --- README.md | 8 ++++---- examples/arduino-blink/README.md | 2 +- examples/arduino-blink/platformio.ini | 2 +- examples/arduino-external-libs/README.md | 2 +- examples/arduino-external-libs/platformio.ini | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c1137a0..47b4217 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ RP2040 is a low-cost, high-performance microcontroller device with a large on-chip memory, symmetric dual-core processor complex, deterministic bus fabric, and rich peripheral set augmented with a unique Programmable I/O (PIO) subsystem, it provides professional users with unrivalled power and flexibility. -* [Home](http://platformio.org/platforms/raspberrypi) (home page in PlatformIO Platform Registry) -* [Documentation](http://docs.platformio.org/page/platforms/raspberrypi.html) (advanced usage, packages, boards, frameworks, etc.) +* [Home](https://registry.platformio.org/platforms/platformio/raspberrypi) (home page in the PlatformIO Registry) +* [Documentation](https://docs.platformio.org/page/platforms/raspberrypi.html) (advanced usage, packages, boards, frameworks, etc.) # Usage 1. [Install PlatformIO](http://platformio.org) -2. Create PlatformIO project and configure a platform option in [platformio.ini](http://docs.platformio.org/page/projectconf.html) file: +2. Create PlatformIO project and configure a platform option in [platformio.ini](https://docs.platformio.org/page/projectconf.html) file: ## Stable version @@ -32,4 +32,4 @@ board = ... # Configuration -Please navigate to [documentation](http://docs.platformio.org/page/platforms/raspberrypi.html). +Please navigate to [documentation](https://docs.platformio.org/page/platforms/raspberrypi.html). diff --git a/examples/arduino-blink/README.md b/examples/arduino-blink/README.md index 1e354e0..6eb4be3 100644 --- a/examples/arduino-blink/README.md +++ b/examples/arduino-blink/README.md @@ -1,7 +1,7 @@ How to build PlatformIO based project ===================================== -1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html) +1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html) 2. Download [development platform with examples](https://github.com/platformio/platform-raspberrypi/archive/develop.zip) 3. Extract ZIP archive 4. Run these commands: diff --git a/examples/arduino-blink/platformio.ini b/examples/arduino-blink/platformio.ini index 4eb1a0f..9a51012 100644 --- a/examples/arduino-blink/platformio.ini +++ b/examples/arduino-blink/platformio.ini @@ -5,7 +5,7 @@ ; Library options: dependencies, extra library storages ; ; Please visit documentation for the other options and examples -; http://docs.platformio.org/page/projectconf.html +; https://docs.platformio.org/page/projectconf.html [env] platform = raspberrypi diff --git a/examples/arduino-external-libs/README.md b/examples/arduino-external-libs/README.md index 8aa6a5f..e03a9e4 100644 --- a/examples/arduino-external-libs/README.md +++ b/examples/arduino-external-libs/README.md @@ -1,7 +1,7 @@ How to build PlatformIO based project ===================================== -1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html) +1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html) 2. Download [development platform with examples](https://github.com/platformio/platform-raspberrypi/archive/develop.zip) 3. Extract ZIP archive 4. Run these commands: diff --git a/examples/arduino-external-libs/platformio.ini b/examples/arduino-external-libs/platformio.ini index d85852f..a2964b8 100644 --- a/examples/arduino-external-libs/platformio.ini +++ b/examples/arduino-external-libs/platformio.ini @@ -5,7 +5,7 @@ ; Library options: dependencies, extra library storages ; ; Please visit documentation for the other options and examples -; http://docs.platformio.org/page/projectconf.html +; https://docs.platformio.org/page/projectconf.html [env] platform = raspberrypi From a05a0c65e32b95291be630ee8d4d6523c615a671 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 31 Mar 2022 17:29:36 +0300 Subject: [PATCH 15/18] Update Arduino-mbed core to v3.0.1 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 4dad7ea..f4282c1 100644 --- a/platform.json +++ b/platform.json @@ -35,7 +35,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~2.7.0" + "version": "~3.0.1" }, "tool-rp2040tools": { "type": "uploader", From 5806c57b9c0832b4c16de1276f8a271d0192f2c7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 1 Apr 2022 12:46:01 +0300 Subject: [PATCH 16/18] Bump version to 1.6.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index f4282c1..4ab2f54 100644 --- a/platform.json +++ b/platform.json @@ -18,7 +18,7 @@ "type": "git", "url": "https://github.com/platformio/platform-raspberrypi.git" }, - "version": "1.5.0", + "version": "1.6.0", "frameworks": { "arduino": { "package": "framework-arduino-mbed", From e49272f13b88c7eac47df9b3c87ddbca62059e9e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 4 Apr 2022 12:06:00 +0300 Subject: [PATCH 17/18] Use the latest Github OS images --- .github/workflows/examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 9d03bd2..d17fe7a 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-18.04, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest, macos-latest] python-version: [3.7] example: - "examples/arduino-blink" From e08da697f0a750d5ebdd17d299d262b729e67c42 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 8 Apr 2022 12:17:12 +0300 Subject: [PATCH 18/18] Symlink dev-platform --- .github/workflows/examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index d17fe7a..ccda6ef 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -25,7 +25,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -U https://github.com/platformio/platformio/archive/develop.zip - platformio platform install file://. + pio pkg install --global --platform symlink://. - name: Build examples run: | platformio run -d ${{ matrix.example }}