diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 9d03bd2..ccda6ef 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" @@ -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 }} 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/builder/main.py b/builder/main.py index c3550af..56203ed 100644 --- a/builder/main.py +++ b/builder/main.py @@ -378,6 +378,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 diff --git a/examples/arduino-blink/README.md b/examples/arduino-blink/README.md index 1e354e0..1d46eff 100644 --- a/examples/arduino-blink/README.md +++ b/examples/arduino-blink/README.md @@ -1,7 +1,11 @@ How to build PlatformIO based project ===================================== +<<<<<<< HEAD 1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html) +======= +1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html) +>>>>>>> e08da697f0a750d5ebdd17d299d262b729e67c42 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..e04de76 100644 --- a/examples/arduino-external-libs/README.md +++ b/examples/arduino-external-libs/README.md @@ -1,7 +1,11 @@ How to build PlatformIO based project ===================================== +<<<<<<< HEAD 1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html) +======= +1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html) +>>>>>>> e08da697f0a750d5ebdd17d299d262b729e67c42 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 diff --git a/platform.json b/platform.json index baf9865..6284ca3 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": [ @@ -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", @@ -41,7 +41,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~2.6.0" + "version": "~3.0.1" }, "framework-arduinopico": { "type": "framework", diff --git a/platform.py b/platform.py index fa8dd81..2fe8087 100644 --- a/platform.py +++ b/platform.py @@ -129,19 +129,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] + )