Skip to content

Commit 0a23dfe

Browse files
authored
Update PlatformIO board files, add PIO CI (earlephilhower#634)
* Shift arduino attribute higher in JSON file * Try out PlatformIO CI * Trigger CI * Clone recursively, actually use own repo * Fix YAML * Build Verbose * Revert to checkout@v2 version, add TinyUSB to examples * Try fix TInyUSB example * Pull repo recursively * Use v3 after all, correct path to example * Only do CI on PR
1 parent 4a94677 commit 0a23dfe

31 files changed

+280
-246
lines changed

.github/workflows/pull-request.yml

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
name: Check spelling
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818
with:
1919
submodules: true
2020
- name: Run codespell
@@ -28,7 +28,7 @@ jobs:
2828
name: Style, Boards, Package
2929
runs-on: ubuntu-latest
3030
steps:
31-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
3232
with:
3333
submodules: false
3434
- name: Check package references
@@ -59,7 +59,7 @@ jobs:
5959
matrix:
6060
chunk: [0, 1, 2, 3]
6161
steps:
62-
- uses: actions/checkout@v2
62+
- uses: actions/checkout@v3
6363
with:
6464
submodules: true
6565
- uses: actions/setup-python@v2
@@ -89,7 +89,7 @@ jobs:
8989
name: Build TinyUSB Examples
9090
runs-on: ubuntu-latest
9191
steps:
92-
- uses: actions/checkout@v2
92+
- uses: actions/checkout@v3
9393
with:
9494
submodules: true
9595
- uses: actions/setup-python@v2
@@ -117,7 +117,7 @@ jobs:
117117
name: Windows
118118
runs-on: windows-latest
119119
steps:
120-
- uses: actions/checkout@v2
120+
- uses: actions/checkout@v3
121121
with:
122122
submodules: true
123123
- uses: actions/setup-python@v2
@@ -152,7 +152,7 @@ jobs:
152152
name: Mac
153153
runs-on: macOS-latest
154154
steps:
155-
- uses: actions/checkout@v2
155+
- uses: actions/checkout@v3
156156
with:
157157
submodules: true
158158
- uses: actions/setup-python@v2
@@ -178,3 +178,37 @@ jobs:
178178
cd ..
179179
bash ./tests/build.sh
180180
181+
# Build a few examples with PlatformIO to test if integration works
182+
build-platformio:
183+
name: Build PlatformIO Examples
184+
runs-on: ubuntu-latest
185+
steps:
186+
- uses: actions/checkout@v3
187+
with:
188+
submodules: 'recursive'
189+
- name: Cache pip
190+
uses: actions/cache@v2
191+
with:
192+
path: ~/.cache/pip
193+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
194+
restore-keys: |
195+
${{ runner.os }}-pip-
196+
- name: Cache PlatformIO
197+
uses: actions/cache@v2
198+
with:
199+
path: ~/.platformio
200+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
201+
- name: Set up Python
202+
uses: actions/setup-python@v2
203+
- name: Install PlatformIO
204+
run: |
205+
python -m pip install --upgrade pip
206+
pip install --upgrade platformio
207+
pio pkg install --global --platform https://github.com/maxgerhardt/platform-raspberrypi.git
208+
pio pkg install --global --tool symlink://.
209+
- name: Build Multicore Example
210+
run: pio ci --board=rpipico --board=adafruit_feather -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/rp2040/examples/Multicore/Multicore.ino
211+
- name: Build Fade Example
212+
run: pio ci --board=rpipico --board=adafruit_feather -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/rp2040/examples/Fade/Fade.ino
213+
- name: Build TinyUSB Example
214+
run: pio ci --board=rpipico --board=adafruit_feather -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" -O "build_flags=-DUSE_TINYUSB" libraries/Adafruit_TinyUSB_Arduino/examples/CDC/cdc_multi/cdc_multi.ino

tools/json/adafruit_feather.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25x10cl_4_padded_checksum.S",
6+
"usb_vid": "0x239a",
7+
"usb_pid": "0x80f1"
8+
}
9+
},
310
"core": "earlephilhower",
411
"cpu": "cortex-m0plus",
512
"extra_flags": "-D ARDUINO_ADAFRUIT_FEATHER_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
@@ -11,14 +18,7 @@
1118
]
1219
],
1320
"mcu": "rp2040",
14-
"variant": "adafruit_feather",
15-
"arduino": {
16-
"earlephilhower": {
17-
"boot2_source": "boot2_w25x10cl_4_padded_checksum.S",
18-
"usb_vid": "0x239a",
19-
"usb_pid": "0x80f1"
20-
}
21-
}
21+
"variant": "adafruit_feather"
2222
},
2323
"debug": {
2424
"jlink_device": "RP2040_M0_0",

tools/json/adafruit_itsybitsy.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x239a",
7+
"usb_pid": "0x80fd"
8+
}
9+
},
310
"core": "earlephilhower",
411
"cpu": "cortex-m0plus",
512
"extra_flags": "-D ARDUINO_ADAFRUIT_ITSYBITSY_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
@@ -11,14 +18,7 @@
1118
]
1219
],
1320
"mcu": "rp2040",
14-
"variant": "adafruit_itsybitsy",
15-
"arduino": {
16-
"earlephilhower": {
17-
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18-
"usb_vid": "0x239a",
19-
"usb_pid": "0x80fd"
20-
}
21-
}
21+
"variant": "adafruit_itsybitsy"
2222
},
2323
"debug": {
2424
"jlink_device": "RP2040_M0_0",

tools/json/adafruit_kb2040.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x239a",
7+
"usb_pid": "0x8105"
8+
}
9+
},
310
"core": "earlephilhower",
411
"cpu": "cortex-m0plus",
512
"extra_flags": "-D ARDUINO_ADAFRUIT_KB2040_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
@@ -11,14 +18,7 @@
1118
]
1219
],
1320
"mcu": "rp2040",
14-
"variant": "adafruit_kb2040",
15-
"arduino": {
16-
"earlephilhower": {
17-
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18-
"usb_vid": "0x239a",
19-
"usb_pid": "0x8105"
20-
}
21-
}
21+
"variant": "adafruit_kb2040"
2222
},
2323
"debug": {
2424
"jlink_device": "RP2040_M0_0",

tools/json/adafruit_macropad2040.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x239a",
7+
"usb_pid": "0x8107"
8+
}
9+
},
310
"core": "earlephilhower",
411
"cpu": "cortex-m0plus",
512
"extra_flags": "-D ARDUINO_ADAFRUIT_MACROPAD_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
@@ -11,14 +18,7 @@
1118
]
1219
],
1320
"mcu": "rp2040",
14-
"variant": "adafruit_macropad2040",
15-
"arduino": {
16-
"earlephilhower": {
17-
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18-
"usb_vid": "0x239a",
19-
"usb_pid": "0x8107"
20-
}
21-
}
21+
"variant": "adafruit_macropad2040"
2222
},
2323
"debug": {
2424
"jlink_device": "RP2040_M0_0",

tools/json/adafruit_qtpy.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x239a",
7+
"usb_pid": "0x80f7"
8+
}
9+
},
310
"core": "earlephilhower",
411
"cpu": "cortex-m0plus",
512
"extra_flags": "-D ARDUINO_ADAFRUIT_QTPY_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
@@ -11,14 +18,7 @@
1118
]
1219
],
1320
"mcu": "rp2040",
14-
"variant": "adafruit_qtpy",
15-
"arduino": {
16-
"earlephilhower": {
17-
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18-
"usb_vid": "0x239a",
19-
"usb_pid": "0x80f7"
20-
}
21-
}
21+
"variant": "adafruit_qtpy"
2222
},
2323
"debug": {
2424
"jlink_device": "RP2040_M0_0",

tools/json/adafruit_stemmafriend.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x239a",
7+
"usb_pid": "0x80e3"
8+
}
9+
},
310
"core": "earlephilhower",
411
"cpu": "cortex-m0plus",
512
"extra_flags": "-D ARDUINO_ADAFRUIT_STEMMAFRIEND_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
@@ -11,14 +18,7 @@
1118
]
1219
],
1320
"mcu": "rp2040",
14-
"variant": "adafruit_stemmafriend",
15-
"arduino": {
16-
"earlephilhower": {
17-
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18-
"usb_vid": "0x239a",
19-
"usb_pid": "0x80e3"
20-
}
21-
}
21+
"variant": "adafruit_stemmafriend"
2222
},
2323
"debug": {
2424
"jlink_device": "RP2040_M0_0",

tools/json/adafruit_trinkeyrp2040qt.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x239a",
7+
"usb_pid": "0x8109"
8+
}
9+
},
310
"core": "earlephilhower",
411
"cpu": "cortex-m0plus",
512
"extra_flags": "-D ARDUINO_ADAFRUIT_TRINKEYQT_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
@@ -11,14 +18,7 @@
1118
]
1219
],
1320
"mcu": "rp2040",
14-
"variant": "adafruit_trinkeyrp2040qt",
15-
"arduino": {
16-
"earlephilhower": {
17-
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18-
"usb_vid": "0x239a",
19-
"usb_pid": "0x8109"
20-
}
21-
}
21+
"variant": "adafruit_trinkeyrp2040qt"
2222
},
2323
"debug": {
2424
"jlink_device": "RP2040_M0_0",

tools/json/arduino_nano_connect.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x2341",
7+
"usb_pid": "0x0058"
8+
}
9+
},
310
"core": "earlephilhower",
411
"cpu": "cortex-m0plus",
512
"extra_flags": "-D ARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
@@ -11,14 +18,7 @@
1118
]
1219
],
1320
"mcu": "rp2040",
14-
"variant": "arduino_nano_connect",
15-
"arduino": {
16-
"earlephilhower": {
17-
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18-
"usb_vid": "0x2341",
19-
"usb_pid": "0x0058"
20-
}
21-
}
21+
"variant": "arduino_nano_connect"
2222
},
2323
"debug": {
2424
"jlink_device": "RP2040_M0_0",

tools/json/challenger_2040_lora.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x2e8a",
7+
"usb_pid": "0x1023"
8+
}
9+
},
310
"core": "earlephilhower",
411
"cpu": "cortex-m0plus",
512
"extra_flags": "-D ARDUINO_CHALLENGER_2040_LORA_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
@@ -11,14 +18,7 @@
1118
]
1219
],
1320
"mcu": "rp2040",
14-
"variant": "challenger_2040_lora",
15-
"arduino": {
16-
"earlephilhower": {
17-
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18-
"usb_vid": "0x2e8a",
19-
"usb_pid": "0x1023"
20-
}
21-
}
21+
"variant": "challenger_2040_lora"
2222
},
2323
"debug": {
2424
"jlink_device": "RP2040_M0_0",

tools/json/challenger_2040_lte.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x2e8a",
7+
"usb_pid": "0x100b"
8+
}
9+
},
310
"core": "earlephilhower",
411
"cpu": "cortex-m0plus",
512
"extra_flags": "-D ARDUINO_CHALLENGER_2040_LTE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500",
@@ -11,14 +18,7 @@
1118
]
1219
],
1320
"mcu": "rp2040",
14-
"variant": "challenger_2040_lte",
15-
"arduino": {
16-
"earlephilhower": {
17-
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
18-
"usb_vid": "0x2e8a",
19-
"usb_pid": "0x100b"
20-
}
21-
}
21+
"variant": "challenger_2040_lte"
2222
},
2323
"debug": {
2424
"jlink_device": "RP2040_M0_0",

0 commit comments

Comments
 (0)