113 Commits

Author SHA1 Message Date
unknown
9177e55c7c Inline delay function 2022-06-17 16:16:33 +02:00
unknown
97b862c887 Add newline at end of platformio.ini 2022-06-17 16:14:16 +02:00
unknown
dc38120b89 Move filesystem funcs higher, use env.Replace 2022-06-17 16:13:38 +02:00
unknown
1e709a2f45 Push arduino attribute higher 2022-06-17 16:12:59 +02:00
unknown
1b43288ac0 Shift arduino attribute higher in JSON files 2022-06-17 16:08:12 +02:00
Maximilian Gerhardt
750f07c05f Merge pull request #8 from maxgerhardt/patchup
Patchup
2022-06-17 03:59:56 +02:00
unknown
15497ac540 Temporarily change package to test CI 2022-06-17 03:03:11 +02:00
unknown
40aea9c914 Make usage of double quotes consistent 2022-06-17 01:23:51 +02:00
unknown
6f7bbd86c8 Revert to using ^ in tool-jlink version 2022-06-17 01:22:41 +02:00
unknown
41da472b81 Quote uploader executable 2022-06-17 01:17:29 +02:00
unknown
52bb6e5d7f Rename fetch_fs_size in env, simplify mbed upload, remove PIO 3.6 legacy code 2022-06-17 01:10:42 +02:00
unknown
ab1e380b64 Use variable name for EEPROM length 2022-06-17 01:02:36 +02:00
unknown
47ad4e9090 Reformat and restructure board files 2022-06-17 00:59:59 +02:00
unknown
4d9eca0c71 Unify examples, add notes 2022-06-17 00:54:31 +02:00
unknown
8d7a063c99 Correct debug logic, exit on unknown core 2022-06-12 18:29:42 +02:00
unknown
1b8624b35a Revert back to currently user mbed-builder 2022-06-09 22:28:38 +02:00
unknown
e568d578ab Make OpenOCD uploading more robust, respect speed for picoprobe config 2022-06-09 22:05:42 +02:00
unknown
4eedf9eac0 Use correct openocd package 2022-06-09 21:37:28 +02:00
unknown
ab26ecbf3b ACTUALLY use only earlephilhower core in examples 2022-06-09 21:25:37 +02:00
unknown
bbb2b17614 ACtually use referenced board 2022-06-09 21:17:59 +02:00
unknown
4d1e3817d7 Fix UF2 mbed uploading again 2022-06-09 21:04:40 +02:00
unknown
a587ecab51 Merge latest upstream 2022-06-09 20:58:27 +02:00
unknown
c2441e4210 Slight example platformioini refactor 2022-06-09 20:36:24 +02:00
unknown
41e26ccd44 Add a new board to CI 2022-06-09 20:04:04 +02:00
unknown
936b8d35df Sync all Arduino-Pico boards 2022-06-09 20:03:13 +02:00
unknown
5ab36c45d8 Filesystem code cleanup 2022-06-09 20:02:33 +02:00
unknown
096f514e83 Adapt to work with registry packages 2022-06-09 19:53:54 +02:00
Valerii Koval
509633a366 Merge tag 'v1.7.0' into develop
Bump version to 1.7.0
2022-05-30 18:51:14 +03:00
Valerii Koval
228b3d28de Merge branch 'release/v1.7.0' 2022-05-30 18:51:14 +03:00
Valerii Koval
c4349b1634 Bump version to 1.7.0 2022-05-30 18:51:00 +03:00
Ivan Kravets
c97b377c3e Add compatibility with PIO Core 6.0 2022-05-28 15:55:17 +03:00
Ivan Kravets
6caac4d451 Improve support for hand-written asm source files 2022-05-28 15:54:59 +03:00
Valerii Koval
6de524e45d Update Arduino-mbed core to v3.1.1 2022-05-27 19:48:58 +03:00
Valerii Koval
7d82e08324 Tidy up platform script 2022-05-27 19:48:26 +03:00
Maximilian Gerhardt
e1204e62e0 Fix double dot 2022-05-16 14:23:30 +02:00
Maximilian Gerhardt
ddcb4a395d Remove argument 2022-05-15 18:34:31 +02:00
Maximilian Gerhardt
3ddcc3aa9a Save function in environment 2022-05-15 16:46:23 +02:00
Maximilian Gerhardt
74a6e8a2cc Merge pull request #4 from dlbogdan/patch-2
Update main.py
2022-05-06 21:17:08 +02:00
dlbogdan
9870c4cec4 Update main.py
because of the logic selecting elf or firm (bin), we need to default to no offset on normal firmware upload because we already defaulted to elf a few lines below if upload.offset_address is not user set so when no offset is needed. 
programming fails otherwise
Unfortunately, my way of modifying the code probably sucks because I've never written anything in python but I assumed the second arg is the default n case the first is missing. Haven't had time to dig too much into it.
2022-04-22 09:13:03 +03:00
Maximilian Gerhardt
d20e2ed967 Update README.md 2022-04-13 15:08:30 +02:00
Maximilian Gerhardt
75dffaabf8 Update README.md 2022-04-13 15:08:12 +02:00
Maximilian Gerhardt
8bff1812d8 Update README.md 2022-04-13 15:07:48 +02:00
unknown
f48a9b921f Actually use right core in earlephilhower example 2022-04-12 19:54:37 +02:00
unknown
a65832bc6b Actually add earlephilhower example to CI 2022-04-12 19:49:59 +02:00
unknown
27cbf99620 Fix UF2 + mbed upload 2022-04-12 19:48:58 +02:00
unknown
b5359ff956 Only CI on Linux 2022-04-12 19:45:04 +02:00
unknown
2b0c071198 Add Arduino-Pico example 2022-04-12 19:44:46 +02:00
unknown
2b15f395c7 Merge branch 'platformio-develop' into develop 2022-04-12 19:41:03 +02:00
unknown
091af0ecd9 Fix merge conflict 2022-04-12 19:40:50 +02:00
Ivan Kravets
e08da697f0 Symlink dev-platform 2022-04-08 12:17:12 +03:00
Ivan Kravets
e49272f13b Use the latest Github OS images 2022-04-04 12:06:00 +03:00
Ivan Kravets
fbb7cc8183 Merge branch 'release/v1.6.0' 2022-04-01 12:46:07 +03:00
Ivan Kravets
b75e8ddfbe Merge tag 'v1.6.0' into develop
Bump version to 1.6.0
2022-04-01 12:46:07 +03:00
Ivan Kravets
5806c57b9c Bump version to 1.6.0 2022-04-01 12:46:01 +03:00
Ivan Kravets
1a9864187a Merge pull request #29 from episource/feature/no-offset-use-elf
Use *.elf instead of *.bin if no offset given
2022-04-01 12:41:46 +03:00
Ivan Kravets
a05a0c65e3 Update Arduino-mbed core to v3.0.1 2022-03-31 17:29:36 +03:00
Ivan Kravets
458dfacd2f Switch docs to HTTP 2022-03-31 14:23:40 +03:00
Ivan Kravets
7331a756e7 Merge pull request #31 from episource/feature/configure-debug-session-pio-5.2+
Configure debug session as required for pio 5.2+
2022-03-11 12:02:43 +02:00
Philipp Serr
01a0447aa7 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`
2022-03-11 08:55:44 +01:00
Philipp Serr
d825c1e531 Use *.elf instead of *.bin if no offset given 2022-02-26 22:19:25 +01:00
Valerii Koval
eca3b40879 Update Arduino-mbed core to v2.7.2 2022-02-21 16:50:14 +02:00
unknown
e920ef32c3 Add all Arduino-Pico board definitions 2022-01-28 09:12:01 +01:00
Valerii Koval
bda6353697 Typo fix in platform description
Fixes platformio/platformio-docs#229
2022-01-20 20:52:19 +02:00
unknown
9811f13f66 Merge upstream 2021-12-29 16:02:30 +01:00
valeros
e5579ce8b7 Merge branch 'release/v1.5.0' 2021-11-30 12:34:09 +02:00
valeros
7c03bd4909 Merge tag 'v1.5.0' into develop
Bump version to 1.5.0
2021-11-30 12:34:09 +02:00
valeros
c7d1a0854c Bump version to 1.5.0 2021-11-30 12:33:48 +02:00
valeros
1d9dac6e82 Update Arduino-mbed core to v2.6.1 2021-11-24 16:42:14 +02:00
Ivan Kravets
2f3fcce5e4 Convert README to markdown 2021-11-22 18:33:28 +02:00
valeros
17d12fa5db Merge branch 'release/v1.4.0' 2021-10-31 22:35:54 +02:00
valeros
b025de9dfe Merge branch 'release/v1.4.0' into develop 2021-10-31 22:35:54 +02:00
valeros
829d328321 Bump version to 1.4.0 2021-10-31 22:35:44 +02:00
valeros
f2c1d02d2b Update Arduino-mbed core to v2.5.2 2021-10-25 14:45:01 +03:00
Valerii Koval
b97219d294 Update examples.yml 2021-10-14 14:43:34 +03:00
valeros
7186039f68 Sync Arduino-mbed build script // Resolve #20 2021-10-14 14:42:34 +03:00
valeros
76011726a9 Merge branch 'release/v1.3.0' into develop 2021-08-31 16:07:15 +03:00
valeros
ff7f704a42 Merge branch 'release/v1.3.0' 2021-08-31 16:07:14 +03:00
valeros
8e0001450d Bump version to 1.3.0 2021-08-31 16:07:05 +03:00
valeros
5fd0124b33 Use full path to upload tools // Issue #16 2021-08-19 12:03:16 +03:00
unknown
673d327f62 Hotfix uploading 2021-08-18 19:46:24 +02:00
unknown
1a37e2dc73 Merge branch 'platformio-develop' into develop 2021-08-18 19:00:59 +02:00
unknown
bb18b728ad Merge 2021-08-18 18:59:38 +02:00
valeros
39b2ae9785 Update Arduino-mbed package to v2.4.1
Resolve #17
2021-08-17 13:45:38 +03:00
unknown
620fe89831 Make sure toolchain-pico is removed from build for normal core 2021-08-08 14:55:24 +02:00
unknown
c0653a3d76 Start adding picoprobe as debug tool 2021-08-08 13:38:31 +02:00
valeros
7b48a72f89 Simplify paths to platform tools to handle whitespaces
Resolve #16
2021-08-06 21:07:53 +03:00
valeros
08233cd7a7 Merge branch 'release/v1.2.0' 2021-07-26 19:38:29 +03:00
valeros
2489c767f4 Merge branch 'release/v1.2.0' into develop 2021-07-26 19:38:29 +03:00
valeros
0dbcaf78bf Bump version to 1.2.0 2021-07-26 19:38:17 +03:00
valeros
9916b5ef16 Update J-Link package to the latest v7.51 2021-07-22 15:36:05 +03:00
unknown
77e0d3a29d Upload filesystem via Picotool working 2021-07-14 23:25:38 +02:00
unknown
87f647de63 Minor cleanup 2021-07-14 22:55:11 +02:00
unknown
630c935d5d Add LittleFS build support, move filesystem size parser code here 2021-07-14 22:51:58 +02:00
valeros
128a0826e1 Update Arduino-mbed package to v2.3.1 // Resove #15 2021-07-14 23:15:25 +03:00
unknown
3560177601 Update board info 2021-07-14 19:41:40 +02:00
unknown
e3828b361d Use toolchain-pico 2021-07-14 04:29:18 +02:00
unknown
4cdb352484 Formatting 2021-07-14 01:30:23 +02:00
unknown
a94fd6258a Clean build selector script 2021-07-14 01:29:23 +02:00
unknown
580b352086 Add build script selector 2021-07-14 01:28:14 +02:00
unknown
ef26f67e95 Rename package 2021-07-14 01:05:15 +02:00
unknown
9920da0915 Add pacakge definitions, skeletons for builder script 2021-07-14 01:00:43 +02:00
Valerii Koval
3c6cc84610 Merge pull request #11 from maxgerhardt/patch-1
Fix wrong board defines
2021-06-07 11:46:45 +03:00
Maximilian Gerhardt
d0ca5176e1 Fix wrong board define for RP2040 Pico board 2021-06-03 21:11:22 +02:00
Maximilian Gerhardt
856d081313 Fix wrong define for Nano RP2040 Connect board 2021-06-03 21:08:33 +02:00
valeros
095da74655 Merge branch 'release/v1.1.0' into develop 2021-05-28 14:18:52 +03:00
valeros
64c93ed89c Merge branch 'release/v1.1.0' 2021-05-28 14:18:51 +03:00
valeros
dc4615d43b Bump version to 1.1.0 2021-05-28 14:18:27 +03:00
valeros
5cb4a7f9cb Install rp2040tools by default // Resolve #8 2021-05-26 17:45:12 +03:00
valeros
4f92149c1c Update Arduino core for mbed-enabled devices to v2.1.0
Resolve #7
2021-05-19 22:07:54 +03:00
valeros
079d5f4e17 Use hex file for uploading via J-Link // Issue #5 2021-05-10 11:20:30 +03:00
valeros
5271d828a7 Add JLink to the list of supported protocols // Issue #5 2021-05-07 12:16:53 +03:00
valeros
69160582c6 Typo fix 2021-05-04 14:42:01 +03:00
valeros
daed439f07 Merge branch 'release/v1.0.0' into develop 2021-04-30 23:55:47 +03:00
46 changed files with 7849 additions and 492 deletions

View File

@@ -7,25 +7,23 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, windows-latest, macos-latest]
python-version: [3.7]
os: [ubuntu-latest, windows-latest, macos-latest]
example:
- "examples/arduino-blink"
- "examples/arduino-external-libs"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
python-version: "3.9"
- name: Install dependencies
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 }}
pio run -d ${{ matrix.example }}

View File

@@ -2,15 +2,15 @@
[![Build Status](https://github.com/platformio/platform-raspberrypi/workflows/Examples/badge.svg)](https://github.com/platformio/platform-raspberrypi/actions)
RP2040 is a low-cost, high-performance microcontroller device with 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.
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:
1. [Install PlatformIO](https://platformio.org)
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

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25x10cl_4_padded_checksum.S",
"usb_vid": "0x239a",
"usb_pid": "0x80f1"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_ADAFRUIT_FEATHER_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "adafruit_feather"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Feather RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Adafruit"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x239a",
"usb_pid": "0x80fd"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_ADAFRUIT_ITSYBITSY_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "adafruit_itsybitsy"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "ItsyBitsy RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Adafruit"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x239a",
"usb_pid": "0x8105"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_ADAFRUIT_KB2040_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "adafruit_kb2040"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "KB2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Adafruit"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x239a",
"usb_pid": "0x8107"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_ADAFRUIT_MACROPAD_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "adafruit_macropad2040"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "MacroPad RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Adafruit"
}

50
boards/adafruit_qtpy.json Normal file
View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x239a",
"usb_pid": "0x80f7"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_ADAFRUIT_QTPY_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "adafruit_qtpy"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "QT Py RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Adafruit"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x239a",
"usb_pid": "0x80e3"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_ADAFRUIT_STEMMAFRIEND_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "adafruit_stemmafriend"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "STEMMA Friend RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Adafruit"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x239a",
"usb_pid": "0x8109"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_ADAFRUIT_TRINKEYQT_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "adafruit_trinkeyrp2040qt"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Trinkey RP2040 QT",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Adafruit"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2341",
"usb_pid": "0x0058"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "arduino_nano_connect"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Nano RP2040 Connect",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 16777216,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Arduino"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x1023"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_CHALLENGER_2040_LORA_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "challenger_2040_lora"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Challenger 2040 LoRa",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "iLabs"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x100b"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_CHALLENGER_2040_LTE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "challenger_2040_lte"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Challenger 2040 LTE",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "iLabs"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x1006"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_CHALLENGER_2040_WIFI_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "challenger_2040_wifi"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Challenger 2040 WiFi",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "iLabs"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x102C"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_CHALLENGER_2040_WIFI_BLE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "challenger_2040_wifi_ble"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Challenger 2040 WiFi/BLE",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "iLabs"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x100b"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_CHALLENGER_NB_2040_WIFI_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "challenger_nb_2040_wifi"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Challenger NB 2040 WiFi",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "iLabs"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x100f"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_CYTRON_MAKER_NANO_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "cytron_maker_nano_rp2040"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Maker Nano RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Cytron"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x1000"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_CYTRON_MAKER_PI_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "cytron_maker_pi_rp2040"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Maker Pi RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Cytron"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x3343",
"usb_pid": "0x4253"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_DFROBOT_BEETLE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "dfrobot_beetle_rp2040"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Beetle RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "DFRobot"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_generic_03h_4_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x008a"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_FLYBOARD2040_CORE -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "flyboard2040_core"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "FlyBoard2040Core",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 4194304,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "DeRuiLab"
}

50
boards/generic.json Normal file
View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_generic_03h_4_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0xf00a"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_GENERIC_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "generic"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 16777216,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Generic"
}

50
boards/ilabs_rpico32.json Normal file
View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x1010"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_ILABS_2040_RPICO32_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "ilabs_rpico32"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "RPICO32",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "iLabs"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x1005"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_MELOPERO_SHAKE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "melopero_shake_rp2040"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Shake RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 16777216,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Melopero"
}

View File

@@ -1,8 +1,18 @@
{
"build": {
"arduino": {
"earlephilhower": {
"variant": "arduino_nano_connect",
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_pid": "0x0058",
"usb_vid": "0x2341",
"usb_manufacturer": "Arduino",
"usb_product" : "Arduino Nano RP2040 Connect"
}
},
"core": "arduino",
"cpu": "cortex-m0plus",
"extra_flags": "-D NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040",
"extra_flags": "-D ARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040",
"f_cpu": "133000000L",
"hwids": [
[
@@ -36,8 +46,10 @@
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool"
"picotool",
"picoprobe"
]
},
"url": "https://blog.arduino.cc/2021/01/20/welcome-raspberry-pi-to-the-world-of-microcontrollers/",

View File

@@ -1,8 +1,18 @@
{
"build": {
"arduino": {
"earlephilhower": {
"variant": "rpipico",
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x000a",
"usb_manufacturer": "Raspberry Pi",
"usb_product": "Pico"
}
},
"core": "arduino",
"cpu": "cortex-m0plus",
"extra_flags": "-D RASPBERRY_PI_PICO -DARDUINO_ARCH_RP2040",
"extra_flags": "-D ARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500",
"f_cpu": "133000000L",
"hwids": [
[
@@ -32,8 +42,10 @@
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool"
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

50
boards/rpipico.json Normal file
View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x000a"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "rpipico"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Pico",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Raspberry Pi"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x000a"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_SEEED_XAIO_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "seeed_xiao_rp2040"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "XAIO RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Seeed"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_generic_03h_4_padded_checksum.S",
"usb_vid": "0x1209",
"usb_pid": "0xa182"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_SOLDERPARTY_RP2040_STAMP -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "solderparty_rp2040_stamp"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "RP2040 Stamp",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Solder Party"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_generic_03h_4_padded_checksum.S",
"usb_vid": "0x1b4f",
"usb_pid": "0x0026"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_SPARKFUN_PROMICRO_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "sparkfun_promicrorp2040"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "ProMicro RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 16777216,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "SparkFun"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x1b4f",
"usb_pid": "0x0026"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_SPARKFUN_THINGPLUS_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "sparkfun_thingplusrp2040"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Thing Plus RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 16777216,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "SparkFun"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x1007"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_UPESY_RP2040_DEVKIT -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "upesy_rp2040_devkit"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "RP2040 DevKit",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "uPesy"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x1027"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_WIZNET_5100S_EVB_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "wiznet_5100s_evb_pico"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "W5100S-EVB-Pico",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "WIZnet"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x1029"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_WIZNET_5500_EVB_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "wiznet_5500_evb_pico"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "W5500-EVB-Pico",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "WIZnet"
}

View File

@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0x1028"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_WIZNET_WIZFI360_EVB_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "wiznet_wizfi360_evb_pico"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "WizFi360-EVB-Pico",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "WIZnet"
}

View File

@@ -21,7 +21,12 @@ from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
env.Append(
ASFLAGS=["-x", "assembler-with-cpp"],
ASFLAGS=[
"-mthumb",
],
ASPPFLAGS=[
"-x", "assembler-with-cpp",
],
CCFLAGS=[
"-Os", # optimize for size
@@ -54,6 +59,9 @@ env.Append(
if "BOARD" in env:
env.Append(
ASFLAGS=[
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
],
CCFLAGS=[
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
],
@@ -61,6 +69,3 @@ if "BOARD" in env:
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
]
)
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])

View File

@@ -0,0 +1,39 @@
# Copyright 2021-present Maximilian Gerhardt <maximilian.gerhardt@rub.de>
#
# 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.
import sys
from os.path import join, isfile
from SCons.Script import DefaultEnvironment, SConscript
env = DefaultEnvironment()
core = env.BoardConfig().get("build.core", "arduino")
build_script = ""
# select build script as either from the Earle Philhower core or
# from the builder script contained in this platform.
if core == "earlephilhower":
build_script = join(
env.PioPlatform().get_package_dir("framework-arduinopico"), "tools", "platformio-build.py")
else:
build_script = join(env.PioPlatform().get_dir(), "builder",
"frameworks", "arduino", "mbed-core", "arduino-core-mbed.py")
if not isfile(build_script):
sys.stderr.write(
"Error: Missing PlatformIO build script %s!\n" % build_script)
env.Exit(1)
SConscript(build_script)

View File

@@ -15,13 +15,90 @@
import sys
from platform import system
from os import makedirs
from os.path import isdir, join
from os.path import isdir, join, isfile
import re
import time
from shutil import copyfile
from platformio.util import get_serial_ports
from platformio.public import list_serial_ports
from SCons.Script import (ARGUMENTS, COMMAND_LINE_TARGETS, AlwaysBuild,
Builder, Default, DefaultEnvironment)
def convert_size_expression_to_int(expression):
conversion_factors = {
"M": 1024*1024,
"MB": 1024*1024,
"K": 1024,
"KB": 1024,
"B": 1,
"": 1 # giving no conversion factor is factor 1.
}
# match <floating pointer number><conversion factor>.
extract_regex = r'^((?:[0-9]*[.])?[0-9]+)([mkbMKB]*)$'
res = re.findall(extract_regex, expression)
# unparsable expression? Warning.
if len(res) == 0:
sys.stderr.write(
"Error: Could not parse filesystem size expression '%s'."
" Will treat as size = 0.\n" % str(expression))
return 0
# access first result
number, factor = res[0]
number = float(number)
number *= conversion_factors[factor.upper()]
return int(number)
def fetch_fs_size(env):
# follow generation formulas from makeboards.py for Earle Philhower core
# given the total flash size, a user can specify
# the amount for the filesystem (0MB, 2MB, 4MB, 8MB, 16MB)
# via board_build.filesystem_size,
# and we will calculate the flash size and eeprom size from that.
flash_size = board.get("upload.maximum_size")
filesystem_size = board.get("build.filesystem_size", "0MB")
filesystem_size_int = convert_size_expression_to_int(filesystem_size)
# last 4K are allocated for EEPROM emulation in flash.
# see https://github.com/earlephilhower/arduino-pico/blob/3414b73172d307e9dc901f7fee83b41112f73457/libraries/EEPROM/EEPROM.cpp#L43-L46
eeprom_size = 4096
maximum_sketch_size = flash_size - eeprom_size - filesystem_size_int
print("Flash size: %.2fMB" % (flash_size / 1024.0 / 1024.0))
print("Sketch size: %.2fMB" % (maximum_sketch_size / 1024.0 / 1024.0))
print("Filesystem size: %.2fMB" % (filesystem_size_int / 1024.0 / 1024.0))
eeprom_start = 0x10000000 + flash_size - eeprom_size
fs_start = 0x10000000 + flash_size - eeprom_size - filesystem_size_int
fs_end = 0x10000000 + flash_size - eeprom_size
if maximum_sketch_size <= 0:
sys.stderr.write(
"Error: Filesystem too large for given flash. "
"Can at max be flash size - 4096 bytes. "
"Available sketch size with current "
"config would be %d bytes.\n" % maximum_sketch_size)
sys.stderr.flush()
env.Exit(1)
env["PICO_FLASH_LENGTH"] = maximum_sketch_size
env["PICO_EEPROM_START"] = eeprom_start
env["FS_START"] = fs_start
env["FS_END"] = fs_end
# LittleFS configuration parameters taken from
# https://github.com/earlephilhower/arduino-pico-littlefs-plugin/blob/master/src/PicoLittleFS.java
env["FS_PAGE"] = 256
env["FS_BLOCK"] = 4096
print("Maximium Sketch size: %d "
"EEPROM start: %s Filesystem start: %s "
"Filesystem end: %s" %
(maximum_sketch_size, hex(eeprom_start), hex(fs_start), hex(fs_end)))
def __fetch_fs_size(target, source, env):
fetch_fs_size(env)
return (target, source)
def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
upload_options = {}
@@ -29,7 +106,7 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
upload_options = env.BoardConfig().get("upload", {})
env.AutodetectUploadPort()
before_ports = get_serial_ports()
before_ports = list_serial_ports()
if upload_options.get("use_1200bps_touch", False):
env.TouchSerialPort("$UPLOAD_PORT", 1200)
@@ -43,7 +120,7 @@ def generate_uf2(target, source, env):
env.Execute(
" ".join(
[
join(platform.get_package_dir("tool-rp2040tools") or "", "elf2uf2"),
"elf2uf2",
'"%s"' % elf_file,
'"%s"' % elf_file.replace(".elf", ".uf2"),
]
@@ -56,6 +133,8 @@ platform = env.PioPlatform()
board = env.BoardConfig()
env.Replace(
__fetch_fs_size=fetch_fs_size,
AR="arm-none-eabi-ar",
AS="arm-none-eabi-as",
CC="arm-none-eabi-gcc",
@@ -67,6 +146,9 @@ env.Replace(
ARFLAGS=["rc"],
MKFSTOOL="mklittlefs",
PICO_FS_IMAGE_NAME=env.get("PICO_FS_IMAGE_NAME", "littlefs"),
SIZEPROGREGEXP=r"^(?:\.text|\.data|\.rodata|\.text.align|\.ARM.exidx)\s+(\d+).*",
SIZEDATAREGEXP=r"^(?:\.data|\.bss|\.noinit)\s+(\d+).*",
SIZECHECKCMD="$SIZETOOL -A -d $SOURCES",
@@ -109,6 +191,24 @@ env.Append(
if not env.get("PIOFRAMEWORK"):
env.SConscript("frameworks/_bare.py")
env.Append(
BUILDERS=dict(
DataToBin=Builder(
action=env.VerboseAction(" ".join([
'"$MKFSTOOL"',
"-c", "$SOURCES",
"-p", "$FS_PAGE",
"-b", "$FS_BLOCK",
"-s", "${FS_END - FS_START}",
"$TARGET"
]), "Building file system image from '$SOURCES' directory to $TARGET"),
emitter=__fetch_fs_size,
source_factory=env.Dir,
suffix=".bin"
)
)
)
#
# Target: Build executable and linkable firmware
#
@@ -119,9 +219,15 @@ if "nobuild" in COMMAND_LINE_TARGETS:
target_firm = join("$BUILD_DIR", "${PROGNAME}.bin")
else:
target_elf = env.BuildProgram()
target_firm = env.ElfToBin(join("$BUILD_DIR", "${PROGNAME}"), target_elf)
env.Depends(target_firm, "checkprogsize")
if set(["buildfs", "uploadfs"]) & set(COMMAND_LINE_TARGETS):
target_firm = env.DataToBin(
join("$BUILD_DIR", "${PICO_FS_IMAGE_NAME}"), "$PROJECTDATA_DIR")
AlwaysBuild(target_firm)
else:
target_firm = env.ElfToBin(join("$BUILD_DIR", "${PROGNAME}"), target_elf)
env.Depends(target_firm, "checkprogsize")
env.AddPlatformTarget("buildfs", target_firm, target_firm, "Build Filesystem Image")
AlwaysBuild(env.Alias("nobuild", target_firm))
target_buildprog = env.Alias("buildprog", target_firm, target_firm)
@@ -129,6 +235,18 @@ env.AddPostAction(
target_elf, env.VerboseAction(generate_uf2, "Generating UF2 image")
)
def _update_max_upload_size(env):
fetch_fs_size(env)
env.BoardConfig().update("upload.maximum_size", env["PICO_FLASH_LENGTH"])
# update max upload size based on set sketch size (or raw maximum size)
if env.get("PIOMAINPROG"):
env.AddPreAction(
"checkprogsize",
env.VerboseAction(
lambda source, target, env: _update_max_upload_size(env),
"Retrieving maximum program size $SOURCE"))
#
# Target: Print binary size
#
@@ -138,6 +256,12 @@ target_size = env.Alias(
env.VerboseAction("$SIZEPRINTCMD", "Calculating size $SOURCE"))
AlwaysBuild(target_size)
def RebootPico(target, source, env):
time.sleep(0.5)
env.Execute(
'"%s" reboot' %
join(platform.get_package_dir("tool-rp2040tools") or "", "picotool")
)
#
# Target: Upload by default .bin file
#
@@ -147,23 +271,56 @@ upload_protocol = env.subst("$UPLOAD_PROTOCOL") or "picotool"
upload_actions = []
upload_source = target_firm
def UploadUF2ToDisk(target, source, env):
assert "UPLOAD_PORT" in env
progname = env.subst("$PROGNAME")
ext = "uf2"
fpath = join(env.subst("$BUILD_DIR"), "%s.%s" % (progname, ext))
if not isfile(fpath):
print(
"Firmware file %s not found.\n" % fpath
)
return
copyfile(fpath, join(env.subst("$UPLOAD_PORT"), "%s.%s" % (progname, ext)))
print(
"Firmware has been successfully uploaded.\n"
"(Some boards may require manual hard reset)"
)
if upload_protocol == "mbed":
upload_actions = [
env.VerboseAction(env.AutodetectUploadPort, "Looking for upload disk..."),
env.VerboseAction(env.UploadToDisk, "Uploading $SOURCE")
env.VerboseAction(UploadUF2ToDisk, "Uploading $SOURCE")
]
elif upload_protocol == "picotool":
env.Replace(
UPLOADER=join(platform.get_package_dir("tool-rp2040tools") or "", "rp2040load"),
UPLOADERFLAGS=["-v", "-D"],
UPLOADCMD="$UPLOADER $UPLOADERFLAGS $SOURCES"
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES'
)
if "uploadfs" in COMMAND_LINE_TARGETS:
env.Replace(
UPLOADER=join(platform.get_package_dir("tool-rp2040tools") or "", "picotool"),
UPLOADERFLAGS=[
"load",
"--verify"
],
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES --offset ${hex(FS_START)}',
)
upload_actions = [
env.VerboseAction(BeforeUpload, "Looking for upload port..."),
env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE"),
]
# picotool seems to need just a tiny bit of delay, but rp2040 load not..
if "uploadfs" in COMMAND_LINE_TARGETS:
upload_actions.insert(1, env.VerboseAction(
lambda source, target, env: time.sleep(0.5), "Delaying a tiny bit..."))
# reboot after filesystem upload
upload_actions.append(env.VerboseAction(RebootPico, "Rebooting device..."))
upload_source = target_elf
elif upload_protocol.startswith("jlink"):
@@ -197,6 +354,7 @@ elif upload_protocol.startswith("jlink"):
UPLOADCMD='$UPLOADER $UPLOADERFLAGS -CommanderScript "${__jlink_cmd_script(__env__, SOURCE)}"'
)
upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")]
upload_source = env.ElfToHex(join("$BUILD_DIR", "${PROGNAME}"), target_elf)
elif upload_protocol in debug_tools:
openocd_args = [
@@ -204,23 +362,34 @@ elif upload_protocol in debug_tools:
]
openocd_args.extend(
debug_tools.get(upload_protocol).get("server").get("arguments", []))
if env.GetProjectOption("debug_speed"):
openocd_args.extend(
["-c", "adapter speed %s" % env.GetProjectOption("debug_speed")]
)
openocd_args.extend([
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
board.get("upload.offset_address", "")
])
# always use a default speed directive of 1000khz or an otherwise configured speed
# otherwise, flash failures were observed
speed = env.GetProjectOption("debug_speed") or "1000"
openocd_args.extend(
["-c", "adapter speed %s" % speed]
)
if "uploadfs" in COMMAND_LINE_TARGETS:
# filesystem upload. use FS_START.
openocd_args.extend([
"-c", "program {$SOURCE} ${hex(FS_START)} verify reset; shutdown;"
])
else:
# normal firmware upload. flash starts at 0x10000000
openocd_args.extend([
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
board.get("upload.offset_address", "")
])
openocd_args = [
f.replace("$PACKAGE_DIR", platform.get_package_dir(
"tool-openocd-raspberrypi") or "")
"tool-openocd-rp2040-earlephilhower") or "")
for f in openocd_args
]
env.Replace(
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
@@ -231,7 +400,7 @@ if not upload_actions:
sys.stderr.write("Warning! Unknown upload protocol %s\n" % upload_protocol)
AlwaysBuild(env.Alias("upload", upload_source, upload_actions))
env.AddPlatformTarget("uploadfs", target_firm, upload_actions, "Upload Filesystem Image")
#
# Default targets
#

View File

@@ -0,0 +1,29 @@
How to build PlatformIO based project
=====================================
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:
```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
```
## Notes
For Raspberry Pi Pico devices, two Arduino cores exist:
* https://github.com/arduino/ArduinoCore-mbed
* https://github.com/earlephilhower/arduino-pico
This examples showcases how to use both of these cores in the `platformio.ini`.

View File

@@ -1,32 +0,0 @@
.. Copyright 2014-present PlatformIO <contact@platformio.org>
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 <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:
.. 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

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
@@ -16,3 +16,26 @@ board = pico
[env:nanorp2040connect]
board = nanorp2040connect
[env:pico_earle]
board = pico
; "pico" board can use both mbed and earlephilhower core, must select here
board_build.core = earlephilhower
[env:nanorp2040connect_earle]
board = nanorp2040connect
; "nanorp2040connect" board can use both mbed and earlephilhower core, must select here
board_build.core = earlephilhower
; earlephilhower-only boards
[env:rpipico]
board = rpipico
[env:adafruit_feather]
board = adafruit_feather
[env:seeed_xiao_rp2040]
board = seeed_xiao_rp2040
[env:sparkfun_thingplusrp2040]
board = sparkfun_thingplusrp2040

View File

@@ -0,0 +1,27 @@
How to build PlatformIO based project
=====================================
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:
```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
```

View File

@@ -1,38 +0,0 @@
.. Copyright 2014-present PlatformIO <contact@platformio.org>
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 <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:
.. 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

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

File diff suppressed because it is too large Load Diff

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": [
@@ -12,17 +12,17 @@
"RP2040"
],
"engines": {
"platformio": "^5"
"platformio": "^6"
},
"repository": {
"type": "git",
"url": "https://github.com/platformio/platform-raspberrypi.git"
},
"version": "1.0.0",
"version": "1.7.0",
"frameworks": {
"arduino": {
"package": "framework-arduino-mbed",
"script": "builder/frameworks/arduino/mbed-core/arduino-core-mbed.py"
"script": "builder/frameworks/arduino/arduino.py"
}
},
"packages": {
@@ -31,29 +31,46 @@
"owner": "platformio",
"version": "~1.90201.0"
},
"toolchain-rp2040-earlephilhower": {
"type": "toolchain",
"optional": true,
"owner": "earlephilhower",
"version": "~5.100300.0"
},
"framework-arduino-mbed": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~2.0.0"
"version": "~3.1.1"
},
"framework-arduinopico": {
"type": "framework",
"optional": true,
"owner": "earlephilhower",
"version": "https://github.com/maxgerhardt/arduino-pico.git"
},
"tool-rp2040tools": {
"type": "uploader",
"optional": true,
"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",
"optional": true,
"owner": "platformio",
"version": "~1.72000.0"
"version": "^1.72000.0"
},
"tool-mklittlefs-rp2040-earlephilhower": {
"type": "uploader",
"optional": true,
"owner": "earlephilhower",
"version": "~5.100300.0"
}
}
}

View File

@@ -12,10 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import copy
import platform
from platformio.managers.platform import PlatformBase
from platformio.public import PlatformBase
class RaspberrypiPlatform(PlatformBase):
@@ -24,6 +23,34 @@ class RaspberrypiPlatform(PlatformBase):
return True
def configure_default_packages(self, variables, targets):
# configure arduino core package.
# select the right one based on the build.core, disable other one.
board = variables.get("board")
board_config = self.board_config(board)
build_core = variables.get(
"board_build.core", board_config.get("build.core", "arduino"))
frameworks = variables.get("pioframework", [])
if "arduino" in frameworks:
if build_core == "arduino":
self.frameworks["arduino"]["package"] = "framework-arduino-mbed"
self.packages["framework-arduinopico"]["optional"] = True
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-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)
env.Exit(1)
# if we want to build a filesystem, we need the tools.
if "buildfs" in targets:
self.packages["tool-mklittlefs-rp2040-earlephilhower"]["optional"] = False
# configure J-LINK tool
jlink_conds = [
"jlink" in variables.get(option, "")
@@ -39,16 +66,16 @@ class RaspberrypiPlatform(PlatformBase):
if not any(jlink_conds) and jlink_pkgname in self.packages:
del self.packages[jlink_pkgname]
return PlatformBase.configure_default_packages(self, variables, targets)
return super().configure_default_packages(variables, targets)
def get_boards(self, id_=None):
result = PlatformBase.get_boards(self, id_)
result = super().get_boards(id_)
if not result:
return result
if id_:
return self._add_default_debug_tools(result)
else:
for key, value in result.items():
for key in result:
result[key] = self._add_default_debug_tools(result[key])
return result
@@ -59,7 +86,7 @@ class RaspberrypiPlatform(PlatformBase):
if "tools" not in debug:
debug["tools"] = {}
for link in ("cmsis-dap", "jlink", "raspberrypi-swd"):
for link in ("cmsis-dap", "jlink", "raspberrypi-swd", "picoprobe"):
if link not in upload_protocols or link in debug["tools"]:
continue
@@ -84,11 +111,12 @@ class RaspberrypiPlatform(PlatformBase):
}
else:
openocd_target = debug.get("openocd_target")
assert openocd_target, ("Missing target configuration for %s" % board.id)
assert openocd_target, ("Missing target configuration for %s" %
board.id)
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,
@@ -100,19 +128,15 @@ 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 "1000"
server_options = debug_config.server or {}
server_arguments = server_options.get("arguments", [])
if "interface/cmsis-dap.cfg" in server_arguments or "interface/picoprobe.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]
)