Skip to content

Commit 84e1bf0

Browse files
authored
Merge pull request #834 from rp-rs/add-rp235x
2 parents e29c2c5 + 298f38b commit 84e1bf0

File tree

165 files changed

+28797
-189
lines changed

Some content is hidden

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

165 files changed

+28797
-189
lines changed

.github/workflows/rp2040_hal.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@ on: [push, pull_request]
22
name: Check rp2040-hal
33
env:
44
PACKAGE: rp2040-hal
5+
TARGET: thumbv6m-none-eabi
56
jobs:
67
build:
78
runs-on: ubuntu-20.04
89
steps:
910
- uses: actions/checkout@v4
1011
- uses: dtolnay/rust-toolchain@stable
1112
with:
12-
target: thumbv6m-none-eabi
13+
target: ${{ env.TARGET }}
1314
- name: Install cargo-hack
1415
run: |
1516
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
1617
- name: Build rp2040-hal
17-
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature --target=thumbv6m-none-eabi
18+
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature --target=${TARGET}
1819
- name: Build rp2040-hal-macros
1920
run: cd ${PACKAGE}-macros && cargo hack build --optional-deps --each-feature
2021
test:
@@ -23,7 +24,7 @@ jobs:
2324
- uses: actions/checkout@v4
2425
- uses: dtolnay/rust-toolchain@stable
2526
with:
26-
target: thumbv6m-none-eabi
27+
target: ${{ env.TARGET }}
2728
- name: Install cargo-hack
2829
run: |
2930
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
@@ -42,15 +43,15 @@ jobs:
4243
- uses: dtolnay/rust-toolchain@master
4344
with:
4445
toolchain: nightly-2024-01-30
45-
target: thumbv6m-none-eabi
46+
target: ${{ env.TARGET }}
4647
- name: Install cargo-hack
4748
run: |
4849
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
4950
- name: Install cargo-udeps
5051
run: |
5152
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
5253
- name: Run cargo-udeps on rp2040-hal
53-
run: cd ${PACKAGE} && cargo hack udeps --optional-deps --each-feature --target=thumbv6m-none-eabi
54+
run: cd ${PACKAGE} && cargo hack udeps --optional-deps --each-feature --target=${TARGET}
5455
- name: Run cargo-udeps on rp2040-hal-macros
5556
run: cd ${PACKAGE}-macros && cargo hack udeps --optional-deps --each-feature
5657
msrv:
@@ -61,14 +62,14 @@ jobs:
6162
- uses: dtolnay/rust-toolchain@master
6263
with:
6364
toolchain: 1.77
64-
target: thumbv6m-none-eabi
65+
target: ${{ env.TARGET }}
6566
- name: Install cargo-hack
6667
run: |
6768
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
6869
- name: Use older version of regex
6970
run: cd ${PACKAGE}-examples && cargo update -p regex --precise 1.9.3
7071
- name: Build rp2040-hal (on MSRV)
71-
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature --target=thumbv6m-none-eabi
72+
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature --target=${TARGET}
7273
- name: Build rp2040-hal-macros (on MSRV)
7374
run: cd ${PACKAGE}-macros && cargo hack build --optional-deps --each-feature
7475
fmt:
@@ -92,7 +93,7 @@ jobs:
9293
- uses: actions/checkout@v4
9394
- uses: dtolnay/rust-toolchain@stable
9495
with:
95-
target: thumbv6m-none-eabi
96+
target: ${{ env.TARGET }}
9697
components: clippy
9798
- name: Run cargo clippy
98-
run: cd ${PACKAGE} && cargo clippy --target=thumbv6m-none-eabi
99+
run: cd ${PACKAGE} && cargo clippy --target=${TARGET}

.github/workflows/rp2040_hal_examples.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,30 @@ on: [push, pull_request]
22
name: Check rp2040-hal-examples
33
env:
44
PACKAGE: rp2040-hal-examples
5+
TARGET: thumbv6m-none-eabi
56
jobs:
67
build:
78
runs-on: ubuntu-20.04
89
steps:
910
- uses: actions/checkout@v4
1011
- uses: dtolnay/rust-toolchain@stable
1112
with:
12-
target: thumbv6m-none-eabi
13-
- name: Install cargo-hack
14-
run: |
15-
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
13+
target: ${{ env.TARGET }}
1614
- name: Build
17-
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature
15+
run: cd ${PACKAGE} && cargo build
1816
udeps:
1917
runs-on: ubuntu-20.04
2018
steps:
2119
- uses: actions/checkout@v4
2220
- uses: dtolnay/rust-toolchain@master
2321
with:
2422
toolchain: nightly-2024-01-30
25-
target: thumbv6m-none-eabi
26-
- name: Install cargo-hack
27-
run: |
28-
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
23+
target: ${{ env.TARGET }}
2924
- name: Install cargo-udeps
3025
run: |
3126
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
3227
- name: Run cargo-udeps
33-
run: cd ${PACKAGE} && cargo hack udeps --optional-deps --each-feature
28+
run: cd ${PACKAGE} && cargo udeps
3429
msrv:
3530
name: Verify build on MSRV
3631
runs-on: ubuntu-20.04
@@ -39,14 +34,11 @@ jobs:
3934
- uses: dtolnay/rust-toolchain@master
4035
with:
4136
toolchain: 1.77
42-
target: thumbv6m-none-eabi
43-
- name: Install cargo-hack
44-
run: |
45-
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
37+
target: ${{ env.TARGET }}
4638
- name: Use older version of regex
4739
run: cd ${PACKAGE} && cargo update -p regex --precise 1.9.3
4840
- name: Build on MSRV
49-
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature
41+
run: cd ${PACKAGE} && cargo build
5042
fmt:
5143
runs-on: ubuntu-20.04
5244
env:
@@ -66,7 +58,7 @@ jobs:
6658
- uses: actions/checkout@v4
6759
- uses: dtolnay/rust-toolchain@stable
6860
with:
69-
target: thumbv6m-none-eabi
61+
target: ${{ env.TARGET }}
7062
components: clippy
7163
- name: Run cargo clippy
7264
run: cd ${PACKAGE} && cargo clippy

.github/workflows/rp235x_hal_arm.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
on: [push, pull_request]
2+
name: Check rp235x-hal on Arm
3+
env:
4+
PACKAGE: rp235x-hal
5+
TARGET: thumbv8m.main-none-eabihf
6+
jobs:
7+
build:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: dtolnay/rust-toolchain@stable
12+
with:
13+
target: ${{ env.TARGET }}
14+
- name: Install cargo-hack
15+
run: |
16+
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
17+
- name: Build rp235x-hal
18+
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature --target=${TARGET}
19+
- name: Build rp235x-hal-macros
20+
run: cd ${PACKAGE}-macros && cargo hack build --optional-deps --each-feature
21+
test:
22+
runs-on: ubuntu-20.04
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: dtolnay/rust-toolchain@stable
26+
with:
27+
target: ${{ env.TARGET }}
28+
- name: Install cargo-hack
29+
run: |
30+
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
31+
- name: Test rp235x-hal
32+
run: cd ${PACKAGE} && cargo hack test --optional-deps --each-feature --tests --features critical-section-impl
33+
- name: Test rp235x-hal docs
34+
run: cd ${PACKAGE} && cargo hack test --optional-deps --each-feature --doc --features critical-section-impl
35+
- name: Test rp235x-hal-macros
36+
run: cd ${PACKAGE}-macros && cargo hack test --optional-deps --tests --each-feature
37+
- name: Test rp235x-hal-macros docs
38+
run: cd ${PACKAGE}-macros && cargo hack test --optional-deps --doc --each-feature
39+
udeps:
40+
runs-on: ubuntu-20.04
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: dtolnay/rust-toolchain@master
44+
with:
45+
toolchain: nightly-2024-01-30
46+
target: ${{ env.TARGET }}
47+
- name: Install cargo-hack
48+
run: |
49+
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
50+
- name: Install cargo-udeps
51+
run: |
52+
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
53+
- name: Run cargo-udeps on rp235x-hal
54+
run: cd ${PACKAGE} && cargo hack udeps --optional-deps --each-feature --target=${TARGET}
55+
- name: Run cargo-udeps on rp235x-hal-macros
56+
run: cd ${PACKAGE}-macros && cargo hack udeps --optional-deps --each-feature
57+
msrv:
58+
name: Verify build on MSRV
59+
runs-on: ubuntu-20.04
60+
steps:
61+
- uses: actions/checkout@v4
62+
- uses: dtolnay/rust-toolchain@master
63+
with:
64+
toolchain: 1.77
65+
target: ${{ env.TARGET }}
66+
- name: Install cargo-hack
67+
run: |
68+
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
69+
- name: Use older version of regex
70+
run: cd ${PACKAGE}-examples && cargo update -p regex --precise 1.9.3
71+
- name: Build rp235x-hal (on MSRV)
72+
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature --target=${TARGET}
73+
- name: Build rp235x-hal-macros (on MSRV)
74+
run: cd ${PACKAGE}-macros && cargo hack build --optional-deps --each-feature
75+
fmt:
76+
runs-on: ubuntu-20.04
77+
env:
78+
RUSTFLAGS: "-D warnings"
79+
steps:
80+
- uses: actions/checkout@v4
81+
- uses: dtolnay/rust-toolchain@stable
82+
with:
83+
components: rustfmt
84+
- name: Check format of rp235x-hal
85+
run: cd ${PACKAGE} && cargo fmt -- --check
86+
- name: Check format of rp235x-hal-macros
87+
run: cd ${PACKAGE}-macros && cargo fmt -- --check
88+
clippy:
89+
runs-on: ubuntu-20.04
90+
env:
91+
RUSTFLAGS: "-D warnings"
92+
steps:
93+
- uses: actions/checkout@v4
94+
- uses: dtolnay/rust-toolchain@stable
95+
with:
96+
target: ${{ env.TARGET }}
97+
components: clippy
98+
- name: Run cargo clippy
99+
run: cd ${PACKAGE} && cargo clippy --target=${TARGET}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
on: [push, pull_request]
2+
name: Check rp235x-hal-examples on Arm
3+
env:
4+
PACKAGE: rp235x-hal-examples
5+
TARGET: thumbv8m.main-none-eabihf
6+
jobs:
7+
build:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: dtolnay/rust-toolchain@stable
12+
with:
13+
target: ${{ env.TARGET }}
14+
- name: Build
15+
run: cd ${PACKAGE} && cargo build --target=${TARGET}
16+
udeps:
17+
runs-on: ubuntu-20.04
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: dtolnay/rust-toolchain@master
21+
with:
22+
toolchain: nightly-2024-01-30
23+
target: ${{ env.TARGET }}
24+
- name: Install cargo-udeps
25+
run: |
26+
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
27+
- name: Run cargo-udeps
28+
run: cd ${PACKAGE} && cargo udeps --target=${TARGET}
29+
msrv:
30+
name: Verify build on MSRV
31+
runs-on: ubuntu-20.04
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: dtolnay/rust-toolchain@master
35+
with:
36+
toolchain: 1.77
37+
target: ${{ env.TARGET }}
38+
- name: Use older version of regex
39+
run: cd ${PACKAGE} && cargo update -p regex --precise 1.9.3
40+
- name: Build on MSRV
41+
run: cd ${PACKAGE} && cargo build --target=${TARGET}
42+
fmt:
43+
runs-on: ubuntu-20.04
44+
env:
45+
RUSTFLAGS: "-D warnings"
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: dtolnay/rust-toolchain@stable
49+
with:
50+
components: rustfmt
51+
- name: Check format
52+
run: cd ${PACKAGE} && cargo fmt -- --check
53+
clippy:
54+
runs-on: ubuntu-20.04
55+
env:
56+
RUSTFLAGS: "-D warnings"
57+
steps:
58+
- uses: actions/checkout@v4
59+
- uses: dtolnay/rust-toolchain@stable
60+
with:
61+
target: ${{ env.TARGET }}
62+
components: clippy
63+
- name: Run cargo clippy
64+
run: cd ${PACKAGE} && cargo clippy --target=${TARGET}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
on: [push, pull_request]
2+
name: Check rp235x-hal-examples on RISC-V
3+
env:
4+
PACKAGE: rp235x-hal-examples
5+
TARGET: riscv32imac-unknown-none-elf
6+
jobs:
7+
build:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: dtolnay/rust-toolchain@stable
12+
with:
13+
target: ${{ env.TARGET }}
14+
- name: Build
15+
run: |
16+
cd ${PACKAGE}
17+
cat riscv_examples.txt | while read example; do
18+
echo "Building $example"
19+
cargo build --target=${TARGET} --bin $example
20+
done
21+
msrv:
22+
name: Verify build on MSRV
23+
runs-on: ubuntu-20.04
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: dtolnay/rust-toolchain@master
27+
with:
28+
toolchain: 1.77
29+
target: ${{ env.TARGET }}
30+
- name: Use older version of regex
31+
run: cd ${PACKAGE} && cargo update -p regex --precise 1.9.3
32+
- name: Build on MSRV
33+
run: |
34+
cd ${PACKAGE}
35+
cat riscv_examples.txt | while read example; do
36+
echo "Building $example"
37+
cargo build --target=${TARGET} --bin $example
38+
done
39+
fmt:
40+
runs-on: ubuntu-20.04
41+
env:
42+
RUSTFLAGS: "-D warnings"
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: dtolnay/rust-toolchain@stable
46+
with:
47+
components: rustfmt
48+
- name: Check format
49+
run: cd ${PACKAGE} && cargo fmt -- --check
50+
clippy:
51+
runs-on: ubuntu-20.04
52+
env:
53+
RUSTFLAGS: "-D warnings"
54+
steps:
55+
- uses: actions/checkout@v4
56+
- uses: dtolnay/rust-toolchain@stable
57+
with:
58+
target: ${{ env.TARGET }}
59+
components: clippy
60+
- name: Run cargo clippy
61+
run: |
62+
cd ${PACKAGE}
63+
cat riscv_examples.txt | while read example; do
64+
echo "Checking $example"
65+
cargo clippy --target=${TARGET} --bin $example
66+
done

0 commit comments

Comments
 (0)