Skip to content

Commit 62a50dc

Browse files
committed
Merge branch 'master' into v4.2.1-tinyusb-host
2 parents 3f23b61 + bda12cd commit 62a50dc

File tree

688 files changed

+180759
-12369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

688 files changed

+180759
-12369
lines changed

.github/workflows/build-libpico.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Run whenever it is manually triggered, a pull request or a push is done that modifes the libpico configuration
2+
3+
name: libpico Builder
4+
5+
on:
6+
pull_request:
7+
paths:
8+
- tools/libpico/**
9+
workflow_dispatch:
10+
push:
11+
paths:
12+
- tools/libpico/**
13+
jobs:
14+
build-libpico:
15+
name: Build libpico precompiled libraries
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: false
21+
- name: Get submodules for pico-sdk
22+
run: cd pico-sdk && git submodule update --init --recursive
23+
- name: Install dependencies
24+
run: |
25+
sudo apt update
26+
sudo apt install cmake make build-essential wget
27+
# Automatically get correct toolchain
28+
cd tools && python3 get.py && cd ..
29+
# add to PATH
30+
echo "$GITHUB_WORKSPACE/system/riscv32-unknown-elf/bin" >> "$GITHUB_PATH"
31+
echo "$GITHUB_WORKSPACE/system/arm-none-eabi/bin" >> "$GITHUB_PATH"
32+
# Needed until we switch to Pico-SDK 2.0.1.
33+
- name: Patch Pico-SDK (Fix Assembly for newer GCC)
34+
run: |
35+
cd pico-sdk
36+
wget https://patch-diff.githubusercontent.com/raw/raspberrypi/pico-sdk/pull/2000.patch
37+
patch -p1 < 2000.patch
38+
- name: Build libpico
39+
run: |
40+
cd tools/libpico
41+
./make-libpico.sh
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: libpico
45+
path: |
46+
tools/libpico/build-rp2040/*.a
47+
tools/libpico/build-rp2350/*.a
48+
tools/libpico/build-rp2350-riscv/*.a

.github/workflows/pull-request.yml

Lines changed: 157 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,23 @@ name: Arduino-Pico CI
66
on:
77
pull_request:
88

9-
env:
10-
TRAVIS_BUILD_DIR: ${{ github.workspace }}
11-
TRAVIS_TAG: ${{ github.ref }}
12-
13-
149
jobs:
1510

16-
# Me no spell so good
17-
code-spell:
18-
name: Check spelling
19-
runs-on: ubuntu-latest
20-
steps:
21-
- uses: actions/checkout@v3
22-
with:
23-
submodules: true
24-
- name: Run codespell
25-
uses: codespell-project/actions-codespell@master
26-
with:
27-
skip: ./ArduinoCore-API,./libraries/ESP8266SdFat,./libraries/Adafruit_TinyUSB_Arduino,./libraries/LittleFS/lib,./tools/pyserial,./pico-sdk,./.github,./docs/i2s.rst,./cores/rp2040/api,./libraries/FreeRTOS,./tools/libbearssl/bearssl,./include,./libraries/WiFi/examples/BearSSL_Server,./ota/uzlib,./libraries/http-parser/lib,./libraries/WebServer/examples/HelloServerBearSSL/HelloServerBearSSL.ino,./libraries/HTTPUpdateServer/examples/SecureBearSSLUpdater/SecureBearSSLUpdater.ino,./.git
28-
ignore_words_list: ser,dout
29-
30-
# Consistent style
11+
# Consistent style, spelling
3112
astyle:
32-
name: Style, Boards, Package
13+
name: Spelling, Style, Boards, Package
3314
runs-on: ubuntu-latest
3415
steps:
35-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
3617
with:
3718
submodules: false
19+
- name: Run codespell
20+
uses: codespell-project/actions-codespell@v2
21+
with:
22+
skip: ./ArduinoCore-API,./libraries/ESP8266SdFat,./libraries/Adafruit_TinyUSB_Arduino,./libraries/LittleFS/lib,./tools/pyserial,./pico-sdk,./.github,./docs/i2s.rst,./cores/rp2040/api,./libraries/FreeRTOS,./tools/libbearssl/bearssl,./include,./libraries/WiFi/examples/BearSSL_Server,./ota/uzlib,./libraries/http-parser/lib,./libraries/WebServer/examples/HelloServerBearSSL/HelloServerBearSSL.ino,./libraries/HTTPUpdateServer/examples/SecureBearSSLUpdater/SecureBearSSLUpdater.ino,./.git,./libraries/FatFS/lib/fatfs,./libraries/FatFS/src/diskio.h,./libraries/FatFS/src/ff.cpp,./libraries/FatFS/src/ffconf.h,./libraries/FatFS/src/ffsystem.cpp,./libraries/FatFS/src/ff.h,./libraries/lwIP_WINC1500/src/driver,./libraries/lwIP_WINC1500/src/common,./libraries/lwIP_WINC1500/src/bus_wrapper,./libraries/lwIP_WINC1500/src/spi_flash
23+
ignore_words_list: ser,dout,shiftIn,acount
24+
- name: Get submodules for following tests
25+
run: git submodule update --init
3826
- name: Check package references
3927
run: |
4028
./tests/ci/pkgrefs_test.sh
@@ -59,15 +47,15 @@ jobs:
5947
matrix:
6048
chunk: [0, 1, 2, 3, 4, 5]
6149
steps:
62-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v4
6351
with:
6452
submodules: true
65-
- uses: actions/setup-python@v4
53+
- uses: actions/setup-python@v5
6654
with:
6755
python-version: '3.x'
6856
- name: Cache Linux toolchain
6957
id: cache-linux
70-
uses: actions/cache@v3
58+
uses: actions/cache@v4
7159
with:
7260
path: ./tools/dist
7361
key: ${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
@@ -82,20 +70,82 @@ jobs:
8270
cd ..
8371
bash ./tests/build.sh
8472
73+
# Build all rp2350 examples on linux (core and Arduino IDE)
74+
build-rp2350-linux:
75+
name: Build RP2350 ${{ matrix.chunk }}
76+
runs-on: ubuntu-latest
77+
strategy:
78+
matrix:
79+
chunk: [0, 1, 2, 3, 4, 5]
80+
steps:
81+
- uses: actions/checkout@v4
82+
with:
83+
submodules: true
84+
- uses: actions/setup-python@v5
85+
with:
86+
python-version: '3.x'
87+
- name: Cache Linux toolchain
88+
id: cache-linux
89+
uses: actions/cache@v4
90+
with:
91+
path: ./tools/dist
92+
key: ${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
93+
- name: Build Sketches
94+
env:
95+
BUILD_PARITY: custom
96+
mod: 6
97+
rem: ${{ matrix.chunk }}
98+
run: |
99+
cd pico-sdk
100+
git submodule update --init
101+
cd ..
102+
bash ./tests/build-rp2350.sh
103+
104+
# Build all rp2350-riscv examples on linux (core and Arduino IDE)
105+
build-rp2350-riscv-linux:
106+
name: Build RP2350-RISCV ${{ matrix.chunk }}
107+
runs-on: ubuntu-latest
108+
strategy:
109+
matrix:
110+
chunk: [0, 1, 2, 3, 4, 5]
111+
steps:
112+
- uses: actions/checkout@v4
113+
with:
114+
submodules: true
115+
- uses: actions/setup-python@v5
116+
with:
117+
python-version: '3.x'
118+
- name: Cache Linux toolchain
119+
id: cache-linux
120+
uses: actions/cache@v4
121+
with:
122+
path: ./tools/dist
123+
key: ${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
124+
- name: Build Sketches
125+
env:
126+
BUILD_PARITY: custom
127+
mod: 6
128+
rem: ${{ matrix.chunk }}
129+
run: |
130+
cd pico-sdk
131+
git submodule update --init
132+
cd ..
133+
bash ./tests/build-rp2350-riscv.sh
134+
85135
# Build TinyUSB examples, requires custom build command line
86136
build-tinyusb:
87137
name: Build TinyUSB Examples
88138
runs-on: ubuntu-latest
89139
steps:
90-
- uses: actions/checkout@v3
140+
- uses: actions/checkout@v4
91141
with:
92142
submodules: true
93-
- uses: actions/setup-python@v4
143+
- uses: actions/setup-python@v5
94144
with:
95145
python-version: '3.x'
96146
- name: Cache Linux toolchain
97147
id: cache-linux
98-
uses: actions/cache@v3
148+
uses: actions/cache@v4
99149
with:
100150
path: ./tools/dist
101151
key: ${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
@@ -113,15 +163,15 @@ jobs:
113163
name: Windows
114164
runs-on: windows-latest
115165
steps:
116-
- uses: actions/checkout@v3
166+
- uses: actions/checkout@v4
117167
with:
118168
submodules: true
119-
- uses: actions/setup-python@v4
169+
- uses: actions/setup-python@v5
120170
with:
121171
python-version: '3.x'
122172
- name: Cache Windows toolchain
123173
id: cache-windows
124-
uses: actions/cache@v3
174+
uses: actions/cache@v4
125175
with:
126176
path: ./tools/dist
127177
key: ${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
@@ -144,17 +194,20 @@ jobs:
144194
# Single build under macOS to ensure the Mac toolchain is good.
145195
build-mac:
146196
name: Mac
147-
runs-on: macOS-12
197+
strategy:
198+
matrix:
199+
os: [macOS-12, macOS-14]
200+
runs-on: ${{ matrix.os }}
148201
steps:
149-
- uses: actions/checkout@v3
202+
- uses: actions/checkout@v4
150203
with:
151204
submodules: true
152-
- uses: actions/setup-python@v4
205+
- uses: actions/setup-python@v5
153206
with:
154207
python-version: '3.x'
155208
- name: Cache Mac toolchain
156209
id: cache-mac
157-
uses: actions/cache@v3
210+
uses: actions/cache@v4
158211
with:
159212
path: ./tools/dist
160213
key: ${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
@@ -165,17 +218,23 @@ jobs:
165218
mod: 500
166219
rem: 1
167220
run: |
221+
brew update
222+
brew install bash
223+
/usr/bin/env bash --version
224+
uname -a
168225
cd pico-sdk
169226
git submodule update --init
170227
cd ..
171-
bash ./tests/build.sh
228+
/usr/bin/env bash ./tests/build.sh
229+
./system/picotool/picotool version
230+
otool -L ./system/picotool/picotool
172231
173232
# Build a few examples with PlatformIO to test if integration works
174233
build-platformio:
175234
name: Build PlatformIO Examples
176235
runs-on: ubuntu-latest
177236
steps:
178-
- uses: actions/checkout@v3
237+
- uses: actions/checkout@v4
179238
with:
180239
submodules: 'true'
181240
- name: Initialize needed submodules
@@ -186,29 +245,33 @@ jobs:
186245
git submodule update --init
187246
cd ../..
188247
- name: Cache pip
189-
uses: actions/cache@v3
248+
uses: actions/cache@v4
190249
with:
191250
path: ~/.cache/pip
192251
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
193252
restore-keys: |
194253
${{ runner.os }}-pip-
195254
- name: Cache PlatformIO
196-
uses: actions/cache@v3
255+
uses: actions/cache@v4
197256
with:
198257
path: ~/.platformio
199258
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
200259
- name: Set up Python
201-
uses: actions/setup-python@v4
260+
uses: actions/setup-python@v5
202261
with:
203262
python-version: '3.x'
204263
- name: Install PlatformIO
205264
run: |
206265
python -m pip install --upgrade pip
207266
pip install --upgrade platformio
208267
pio pkg install --global --platform https://github.com/maxgerhardt/platform-raspberrypi.git
268+
pio pkg update --global --platform https://github.com/maxgerhardt/platform-raspberrypi.git
209269
pio pkg install --global --tool symlink://.
270+
cp -f /home/runner/work/arduino-pico/arduino-pico/tools/json/*.json /home/runner/.platformio/platforms/raspberrypi/boards/.
210271
- name: Build Multicore Example
211-
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
272+
run: pio ci -v --board=rpipico --board=rpipico2 --board=adafruit_feather -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/rp2040/examples/Multicore/Multicore.ino
273+
- name: Build Multicore Example (RISC-V)
274+
run: pio ci -v --board=rpipico2 -O "board_build.mcu = rp2350-riscv" -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/rp2040/examples/Multicore/Multicore.ino
212275
- name: Build Fade Example
213276
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
214277
- name: Build TinyUSB Example
@@ -219,3 +282,56 @@ jobs:
219282
run: pio ci --board=rpipicow -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/ArduinoOTA/examples/SignedOTA/SignedOTA.ino
220283
- name: Build Bluetooth Example
221284
run: pio ci --board=rpipicow -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" -O "build_flags=-DPIO_FRAMEWORK_ARDUINO_ENABLE_BLUETOOTH" libraries/MouseBLE/examples/BLECircle/BLECircle.ino
285+
286+
# Build every variant using PIO for simplicity
287+
build-variants:
288+
name: Build Every Variant ${{ matrix.chunk }}
289+
runs-on: ubuntu-latest
290+
strategy:
291+
matrix:
292+
chunk: [0, 1]
293+
steps:
294+
- uses: actions/checkout@v4
295+
with:
296+
submodules: 'true'
297+
- name: Initialize needed submodules
298+
run: |
299+
cd pico-sdk
300+
git submodule update --init
301+
cd ../libraries/Adafruit_TinyUSB_Arduino
302+
git submodule update --init
303+
cd ../..
304+
- name: Cache pip
305+
uses: actions/cache@v4
306+
with:
307+
path: ~/.cache/pip
308+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
309+
restore-keys: |
310+
${{ runner.os }}-pip-
311+
- name: Cache PlatformIO
312+
uses: actions/cache@v4
313+
with:
314+
path: ~/.platformio
315+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
316+
- name: Set up Python
317+
uses: actions/setup-python@v5
318+
with:
319+
python-version: '3.x'
320+
- name: Install PlatformIO
321+
run: |
322+
python -m pip install --upgrade pip
323+
pip install --upgrade platformio
324+
pio pkg install --global --platform https://github.com/maxgerhardt/platform-raspberrypi.git
325+
pio pkg update --global --platform https://github.com/maxgerhardt/platform-raspberrypi.git
326+
pio pkg install --global --tool symlink://.
327+
cp -f /home/runner/work/arduino-pico/arduino-pico/tools/json/*.json /home/runner/.platformio/platforms/raspberrypi/boards/.
328+
- name: Build Every Variant
329+
run: |
330+
cnt=0
331+
for b in $(cut -f1 -d. /home/runner/work/arduino-pico/arduino-pico/boards.txt | sed 's/#.*//' | sed 's/^menu$//' | sort -u); do
332+
cnt=$((cnt + 1))
333+
rem=$((cnt % 2))
334+
if [ $rem == ${{ matrix.chunk }} ]; then
335+
pio ci --board=$b -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/rp2040/examples/Bootsel/Bootsel.ino
336+
fi
337+
done

.github/workflows/release-to-publish.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ jobs:
99
name: Update master JSON file
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
with:
1414
submodules: true
1515
- name: Cache pip
16-
uses: actions/cache@v3
16+
uses: actions/cache@v4
1717
with:
1818
path: ~/.cache/pip
1919
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
2020
restore-keys: |
2121
${{ runner.os }}-pip-
22-
- uses: actions/setup-python@v4
22+
- uses: actions/setup-python@v5
2323
with:
2424
python-version: '3.x'
2525
# - name: Cache PlatformIO
26-
# uses: actions/cache@v3
26+
# uses: actions/cache@v4
2727
# with:
2828
# path: ~/.platformio
2929
# key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
@@ -33,7 +33,6 @@ jobs:
3333
# pip install --upgrade platformio
3434
- name: Deploy updated JSON
3535
env:
36-
TRAVIS_BUILD_DIR: ${{ github.workspace }}
3736
BUILD_TYPE: package
3837
CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
3938
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}

0 commit comments

Comments
 (0)