Skip to content

Commit 4f27ec4

Browse files
Generate Platform.IO board definitions (#426)
As part of the boards.txt generation, also make necessary files for Platform.IO. Fixes #399
1 parent 843630c commit 4f27ec4

25 files changed

+1159
-3
lines changed

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
./tests/ci/pkgrefs_test.sh
3737
- name: Check boards.txt was not edited after makeboards.py
3838
run: |
39-
./tools/makeboards.py > boards.txt
39+
./tools/makeboards.py
4040
# If anything changed, GIT should return an error and fail the test
4141
git diff --exit-code
4242
- name: Run astyle on all code/examples

tools/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ rely on existence of `sed` command.
2525

2626
## makeboards.py
2727
Generates `boards.txt` programmatically. Never edit the `boards.txt` file
28-
manually, use `python3 tools/makeboards.py > boards.py`. Change the script
28+
manually, use `python3 tools/makeboards.py`. Change the script
2929
as necessary to add any add'l fields or menus required. Used because the
3030
`boards.txt` file is very repetitive and it's safer to generate with code
3131
than by hand.

tools/json/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This directory contains JSON board definitions for use with Platform.IO

tools/json/adafruit_feather.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"build": {
3+
"core": "earlephilhower",
4+
"cpu": "cortex-m0plus",
5+
"extra_flags": "-D ARDUINO_ADAFRUIT_FEATHER_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
6+
"f_cpu": "133000000L",
7+
"hwids": [
8+
[
9+
"0x2E8A",
10+
"0x00C0"
11+
]
12+
],
13+
"mcu": "rp2040",
14+
"arduino": {
15+
"earlephilhower": {
16+
"variant": "adafruit_feather",
17+
"boot2_source": "boot2_w25x10cl_4_padded_checksum.S",
18+
"usb_vid": "0x239a",
19+
"usb_pid": "0x80f1",
20+
"usb_manufacturer": "Adafruit",
21+
"usb_product": "Feather RP2040"
22+
}
23+
}
24+
},
25+
"debug": {
26+
"jlink_device": "RP2040_M0_0",
27+
"openocd_target": "rp2040.cfg",
28+
"svd_path": "rp2040.svd"
29+
},
30+
"frameworks": [
31+
"arduino"
32+
],
33+
"name": "Feather RP2040",
34+
"upload": {
35+
"maximum_ram_size": 270336,
36+
"maximum_size": 8388608,
37+
"require_upload_port": true,
38+
"native_usb": true,
39+
"use_1200bps_touch": true,
40+
"wait_for_upload_port": false,
41+
"protocol": "picotool",
42+
"protocols": [
43+
"cmsis-dap",
44+
"jlink",
45+
"raspberrypi-swd",
46+
"picotool",
47+
"picoprobe"
48+
]
49+
},
50+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
51+
"vendor": "Adafruit"
52+
}

tools/json/adafruit_itsybitsy.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"build": {
3+
"core": "earlephilhower",
4+
"cpu": "cortex-m0plus",
5+
"extra_flags": "-D ARDUINO_ADAFRUIT_ITSYBITSY_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
6+
"f_cpu": "133000000L",
7+
"hwids": [
8+
[
9+
"0x2E8A",
10+
"0x00C0"
11+
]
12+
],
13+
"mcu": "rp2040",
14+
"arduino": {
15+
"earlephilhower": {
16+
"variant": "adafruit_itsybitsy",
17+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18+
"usb_vid": "0x239a",
19+
"usb_pid": "0x80fd",
20+
"usb_manufacturer": "Adafruit",
21+
"usb_product": "ItsyBitsy RP2040"
22+
}
23+
}
24+
},
25+
"debug": {
26+
"jlink_device": "RP2040_M0_0",
27+
"openocd_target": "rp2040.cfg",
28+
"svd_path": "rp2040.svd"
29+
},
30+
"frameworks": [
31+
"arduino"
32+
],
33+
"name": "ItsyBitsy RP2040",
34+
"upload": {
35+
"maximum_ram_size": 270336,
36+
"maximum_size": 8388608,
37+
"require_upload_port": true,
38+
"native_usb": true,
39+
"use_1200bps_touch": true,
40+
"wait_for_upload_port": false,
41+
"protocol": "picotool",
42+
"protocols": [
43+
"cmsis-dap",
44+
"jlink",
45+
"raspberrypi-swd",
46+
"picotool",
47+
"picoprobe"
48+
]
49+
},
50+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
51+
"vendor": "Adafruit"
52+
}

tools/json/adafruit_kb2040.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"build": {
3+
"core": "earlephilhower",
4+
"cpu": "cortex-m0plus",
5+
"extra_flags": "-D ARDUINO_ADAFRUIT_KB2040_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
6+
"f_cpu": "133000000L",
7+
"hwids": [
8+
[
9+
"0x2E8A",
10+
"0x00C0"
11+
]
12+
],
13+
"mcu": "rp2040",
14+
"arduino": {
15+
"earlephilhower": {
16+
"variant": "adafruit_kb2040",
17+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18+
"usb_vid": "0x239a",
19+
"usb_pid": "0x8105",
20+
"usb_manufacturer": "Adafruit",
21+
"usb_product": "KB2040"
22+
}
23+
}
24+
},
25+
"debug": {
26+
"jlink_device": "RP2040_M0_0",
27+
"openocd_target": "rp2040.cfg",
28+
"svd_path": "rp2040.svd"
29+
},
30+
"frameworks": [
31+
"arduino"
32+
],
33+
"name": "KB2040",
34+
"upload": {
35+
"maximum_ram_size": 270336,
36+
"maximum_size": 8388608,
37+
"require_upload_port": true,
38+
"native_usb": true,
39+
"use_1200bps_touch": true,
40+
"wait_for_upload_port": false,
41+
"protocol": "picotool",
42+
"protocols": [
43+
"cmsis-dap",
44+
"jlink",
45+
"raspberrypi-swd",
46+
"picotool",
47+
"picoprobe"
48+
]
49+
},
50+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
51+
"vendor": "Adafruit"
52+
}

tools/json/adafruit_macropad2040.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"build": {
3+
"core": "earlephilhower",
4+
"cpu": "cortex-m0plus",
5+
"extra_flags": "-D ARDUINO_ADAFRUIT_MACROPAD_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
6+
"f_cpu": "133000000L",
7+
"hwids": [
8+
[
9+
"0x2E8A",
10+
"0x00C0"
11+
]
12+
],
13+
"mcu": "rp2040",
14+
"arduino": {
15+
"earlephilhower": {
16+
"variant": "adafruit_macropad2040",
17+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18+
"usb_vid": "0x239a",
19+
"usb_pid": "0x8107",
20+
"usb_manufacturer": "Adafruit",
21+
"usb_product": "MacroPad RP2040"
22+
}
23+
}
24+
},
25+
"debug": {
26+
"jlink_device": "RP2040_M0_0",
27+
"openocd_target": "rp2040.cfg",
28+
"svd_path": "rp2040.svd"
29+
},
30+
"frameworks": [
31+
"arduino"
32+
],
33+
"name": "MacroPad RP2040",
34+
"upload": {
35+
"maximum_ram_size": 270336,
36+
"maximum_size": 8388608,
37+
"require_upload_port": true,
38+
"native_usb": true,
39+
"use_1200bps_touch": true,
40+
"wait_for_upload_port": false,
41+
"protocol": "picotool",
42+
"protocols": [
43+
"cmsis-dap",
44+
"jlink",
45+
"raspberrypi-swd",
46+
"picotool",
47+
"picoprobe"
48+
]
49+
},
50+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
51+
"vendor": "Adafruit"
52+
}

tools/json/adafruit_qtpy.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"build": {
3+
"core": "earlephilhower",
4+
"cpu": "cortex-m0plus",
5+
"extra_flags": "-D ARDUINO_ADAFRUIT_QTPY_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
6+
"f_cpu": "133000000L",
7+
"hwids": [
8+
[
9+
"0x2E8A",
10+
"0x00C0"
11+
]
12+
],
13+
"mcu": "rp2040",
14+
"arduino": {
15+
"earlephilhower": {
16+
"variant": "adafruit_qtpy",
17+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18+
"usb_vid": "0x239a",
19+
"usb_pid": "0x80f7",
20+
"usb_manufacturer": "Adafruit",
21+
"usb_product": "QT Py RP2040"
22+
}
23+
}
24+
},
25+
"debug": {
26+
"jlink_device": "RP2040_M0_0",
27+
"openocd_target": "rp2040.cfg",
28+
"svd_path": "rp2040.svd"
29+
},
30+
"frameworks": [
31+
"arduino"
32+
],
33+
"name": "QT Py RP2040",
34+
"upload": {
35+
"maximum_ram_size": 270336,
36+
"maximum_size": 8388608,
37+
"require_upload_port": true,
38+
"native_usb": true,
39+
"use_1200bps_touch": true,
40+
"wait_for_upload_port": false,
41+
"protocol": "picotool",
42+
"protocols": [
43+
"cmsis-dap",
44+
"jlink",
45+
"raspberrypi-swd",
46+
"picotool",
47+
"picoprobe"
48+
]
49+
},
50+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
51+
"vendor": "Adafruit"
52+
}

tools/json/adafruit_stemmafriend.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"build": {
3+
"core": "earlephilhower",
4+
"cpu": "cortex-m0plus",
5+
"extra_flags": "-D ARDUINO_ADAFRUIT_STEMMAFRIEND_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
6+
"f_cpu": "133000000L",
7+
"hwids": [
8+
[
9+
"0x2E8A",
10+
"0x00C0"
11+
]
12+
],
13+
"mcu": "rp2040",
14+
"arduino": {
15+
"earlephilhower": {
16+
"variant": "adafruit_stemmafriend",
17+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18+
"usb_vid": "0x239a",
19+
"usb_pid": "0x80e3",
20+
"usb_manufacturer": "Adafruit",
21+
"usb_product": "STEMMA Friend RP2040"
22+
}
23+
}
24+
},
25+
"debug": {
26+
"jlink_device": "RP2040_M0_0",
27+
"openocd_target": "rp2040.cfg",
28+
"svd_path": "rp2040.svd"
29+
},
30+
"frameworks": [
31+
"arduino"
32+
],
33+
"name": "STEMMA Friend RP2040",
34+
"upload": {
35+
"maximum_ram_size": 270336,
36+
"maximum_size": 8388608,
37+
"require_upload_port": true,
38+
"native_usb": true,
39+
"use_1200bps_touch": true,
40+
"wait_for_upload_port": false,
41+
"protocol": "picotool",
42+
"protocols": [
43+
"cmsis-dap",
44+
"jlink",
45+
"raspberrypi-swd",
46+
"picotool",
47+
"picoprobe"
48+
]
49+
},
50+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
51+
"vendor": "Adafruit"
52+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"build": {
3+
"core": "earlephilhower",
4+
"cpu": "cortex-m0plus",
5+
"extra_flags": "-D ARDUINO_ADAFRUIT_TRINKEYQT_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
6+
"f_cpu": "133000000L",
7+
"hwids": [
8+
[
9+
"0x2E8A",
10+
"0x00C0"
11+
]
12+
],
13+
"mcu": "rp2040",
14+
"arduino": {
15+
"earlephilhower": {
16+
"variant": "adafruit_trinkeyrp2040qt",
17+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18+
"usb_vid": "0x239a",
19+
"usb_pid": "0x8109",
20+
"usb_manufacturer": "Adafruit",
21+
"usb_product": "Trinkey RP2040 QT"
22+
}
23+
}
24+
},
25+
"debug": {
26+
"jlink_device": "RP2040_M0_0",
27+
"openocd_target": "rp2040.cfg",
28+
"svd_path": "rp2040.svd"
29+
},
30+
"frameworks": [
31+
"arduino"
32+
],
33+
"name": "Trinkey RP2040 QT",
34+
"upload": {
35+
"maximum_ram_size": 270336,
36+
"maximum_size": 8388608,
37+
"require_upload_port": true,
38+
"native_usb": true,
39+
"use_1200bps_touch": true,
40+
"wait_for_upload_port": false,
41+
"protocol": "picotool",
42+
"protocols": [
43+
"cmsis-dap",
44+
"jlink",
45+
"raspberrypi-swd",
46+
"picotool",
47+
"picoprobe"
48+
]
49+
},
50+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
51+
"vendor": "Adafruit"
52+
}

0 commit comments

Comments
 (0)