Merge branch 'platformio-develop' into develop

This commit is contained in:
unknown 2022-04-12 19:41:03 +02:00
commit 2b15f395c7
9 changed files with 34 additions and 27 deletions

View File

@ -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 }}

View File

@ -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).

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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",

View File

@ -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]
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_executable:
debug_options["server"]["arguments"].extend(
elif "jlink" in server_options.get("executable", "").lower():
server_arguments.extend(
["-speed", adapter_speed]
)
return debug_options