-
Notifications
You must be signed in to change notification settings - Fork 270
Add an RP2350 HAL. #834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add an RP2350 HAL. #834
Changes from 6 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
5cb6f9e
Add an RP2350 HAL.
thejpster 4f07e93
Moved some UART stuff into rp-hal-common.
thejpster 650a608
Set the rp235x-hal-examples to build in ARM mode by default
thejpster 94b2317
Don't check udeps for RISC-V examples
thejpster 2589e20
Format rp235x-hal/Cargo.toml
thejpster 4d2d08f
Use published 2350 PAC.
thejpster 86b4e69
RP235x: datasheet link clean-ups
thejpster 17296c7
RP235x: switch to using picotool
thejpster 2173130
RP235x: More datasheet fixes.
thejpster b41c5a7
RP235x: Mention the right board.
thejpster aa7b66a
RP235x: Formatting
thejpster 6ed9f06
RP235x: More notes in the block-loop example.
thejpster 270a1db
rp235x|rp2040: Fix gpio_in_out description
thejpster 95e0529
rp235x|rp2040: Fix watchdog example comments.
thejpster 879d831
rp235x|rp2040: Fix alloc description
thejpster d511278
Update .github/workflows/rp235x_hal_examples_riscv.yml
thejpster ab006c3
Update rp-hal-common/src/lib.rs
thejpster 8262524
Update rp235x-hal/src/lposc.rs
thejpster 298f38b
Update rp235x-hal/src/timer.rs
thejpster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
on: [push, pull_request] | ||
name: Check rp235x-hal on Arm | ||
env: | ||
PACKAGE: rp235x-hal | ||
TARGET: thumbv8m.main-none-eabihf | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: ${{ env.TARGET }} | ||
- name: Install cargo-hack | ||
run: | | ||
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 | ||
- name: Build rp235x-hal | ||
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature --target=${TARGET} | ||
- name: Build rp235x-hal-macros | ||
run: cd ${PACKAGE}-macros && cargo hack build --optional-deps --each-feature | ||
test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: ${{ env.TARGET }} | ||
- name: Install cargo-hack | ||
run: | | ||
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 | ||
- name: Test rp235x-hal | ||
run: cd ${PACKAGE} && cargo hack test --optional-deps --each-feature --tests --features critical-section-impl | ||
- name: Test rp235x-hal docs | ||
run: cd ${PACKAGE} && cargo hack test --optional-deps --each-feature --doc --features critical-section-impl | ||
- name: Test rp235x-hal-macros | ||
run: cd ${PACKAGE}-macros && cargo hack test --optional-deps --tests --each-feature | ||
- name: Test rp235x-hal-macros docs | ||
run: cd ${PACKAGE}-macros && cargo hack test --optional-deps --doc --each-feature | ||
udeps: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly-2024-01-30 | ||
target: ${{ env.TARGET }} | ||
- name: Install cargo-hack | ||
run: | | ||
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 | ||
- name: Install cargo-udeps | ||
run: | | ||
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 | ||
- name: Run cargo-udeps on rp235x-hal | ||
run: cd ${PACKAGE} && cargo hack udeps --optional-deps --each-feature --target=${TARGET} | ||
- name: Run cargo-udeps on rp235x-hal-macros | ||
run: cd ${PACKAGE}-macros && cargo hack udeps --optional-deps --each-feature | ||
msrv: | ||
name: Verify build on MSRV | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: 1.77 | ||
target: ${{ env.TARGET }} | ||
- name: Install cargo-hack | ||
run: | | ||
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 | ||
- name: Use older version of regex | ||
run: cd ${PACKAGE}-examples && cargo update -p regex --precise 1.9.3 | ||
- name: Build rp235x-hal (on MSRV) | ||
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature --target=${TARGET} | ||
- name: Build rp235x-hal-macros (on MSRV) | ||
run: cd ${PACKAGE}-macros && cargo hack build --optional-deps --each-feature | ||
fmt: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- name: Check format of rp235x-hal | ||
run: cd ${PACKAGE} && cargo fmt -- --check | ||
- name: Check format of rp235x-hal-macros | ||
run: cd ${PACKAGE}-macros && cargo fmt -- --check | ||
clippy: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: ${{ env.TARGET }} | ||
components: clippy | ||
- name: Run cargo clippy | ||
run: cd ${PACKAGE} && cargo clippy --target=${TARGET} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
on: [push, pull_request] | ||
name: Check rp235x-hal-examples on Arm | ||
env: | ||
PACKAGE: rp235x-hal-examples | ||
TARGET: thumbv8m.main-none-eabihf | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: ${{ env.TARGET }} | ||
- name: Build | ||
run: cd ${PACKAGE} && cargo build --target=${TARGET} | ||
udeps: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly-2024-01-30 | ||
target: ${{ env.TARGET }} | ||
- name: Install cargo-udeps | ||
run: | | ||
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 | ||
- name: Run cargo-udeps | ||
run: cd ${PACKAGE} && cargo udeps --target=${TARGET} | ||
msrv: | ||
name: Verify build on MSRV | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: 1.77 | ||
target: ${{ env.TARGET }} | ||
- name: Use older version of regex | ||
run: cd ${PACKAGE} && cargo update -p regex --precise 1.9.3 | ||
- name: Build on MSRV | ||
run: cd ${PACKAGE} && cargo build --target=${TARGET} | ||
fmt: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- name: Check format | ||
run: cd ${PACKAGE} && cargo fmt -- --check | ||
clippy: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: ${{ env.TARGET }} | ||
components: clippy | ||
- name: Run cargo clippy | ||
run: cd ${PACKAGE} && cargo clippy --target=${TARGET} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
on: [push, pull_request] | ||
name: Check rp235x-hal-examples on Arm | ||
env: | ||
PACKAGE: rp235x-hal-examples | ||
TARGET: riscv32imac-unknown-none-elf | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: ${{ env.TARGET }} | ||
- name: Build | ||
run: | | ||
cd ${PACKAGE} | ||
cat riscv_examples.txt | while read example; do | ||
echo "Building $example" | ||
cargo build --target=${TARGET} --bin $example | ||
done | ||
msrv: | ||
name: Verify build on MSRV | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: 1.77 | ||
target: ${{ env.TARGET }} | ||
- name: Use older version of regex | ||
run: cd ${PACKAGE} && cargo update -p regex --precise 1.9.3 | ||
- name: Build on MSRV | ||
run: | | ||
cd ${PACKAGE} | ||
cat riscv_examples.txt | while read example; do | ||
echo "Building $example" | ||
cargo build --target=${TARGET} --bin $example | ||
done | ||
fmt: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- name: Check format | ||
run: cd ${PACKAGE} && cargo fmt -- --check | ||
clippy: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: ${{ env.TARGET }} | ||
components: clippy | ||
- name: Run cargo clippy | ||
run: | | ||
cd ${PACKAGE} | ||
cat riscv_examples.txt | while read example; do | ||
echo "Checking $example" | ||
cargo clippy --target=${TARGET} --bin $example | ||
done |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.