Compare commits

...
3 Commits
Author SHA1 Message Date
melfely 13e4e1c893 ci: Setup Linting and Build Test for RP2350. (#2)
Lint & Build / Build (push) Successful in 1m17s
Lint & Build / Linting (push) Successful in 1m47s
Reviewed-on: #2
Co-authored-by: Melfely <bug362@outlook.com>
2026-09-22 20:48:40 +00:00
melfely 3a1b828e03 Merge pull request 'Added Static_Cell Crate' (#1) from static_cell into master
Reviewed-on: #1
2026-08-15 18:54:49 +00:00
melfely 4667dff95d Added Static_Cell Crate 2026-08-15 13:54:09 -05:00
4 changed files with 109 additions and 7 deletions
+67
View File
@@ -0,0 +1,67 @@
name: Lint & Build
on:
push:
branches: [ main, master ]
pull_request:
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv8m.main-none-eabihf
components: rustfmt, clippy
- name: Install cargo sort
uses: taiki-e/install-action@v2
with:
tool: cargo-sort
- name: Install cargo machete
uses: taiki-e/install-action@v2
with:
tool: cargo-machete
- name: Check formatting
run: cargo fmt --check
- name: Check import sorting
run: cargo sort --grouped --check --check-format
- name: Check for unused dependencies
run: cargo machete
- name: Clippy for RP2350 ARM Cores
run: |
cargo clippy --target thumbv8m.main-none-eabihf -- -D warnings
build:
name: Build
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout Project
uses: actions/checkout@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv8m.main-none-eabihf
- name: Build for RP2350 ARM Cores
run: |
cargo build --target thumbv8m.main-none-eabihf --release --locked
Generated
+10
View File
@@ -588,6 +588,7 @@ dependencies = [
"embedded-io-async 0.7.0",
"heapless 0.9.3",
"panic-probe",
"static_cell",
]
[[package]]
@@ -1418,6 +1419,15 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
[[package]]
name = "static_cell"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0530892bb4fa575ee0da4b86f86c667132a94b74bb72160f58ee5a4afec74c23"
dependencies = [
"portable-atomic",
]
[[package]]
name = "string_cache"
version = "0.8.9"
+31 -6
View File
@@ -3,8 +3,36 @@ name = "embassy_template"
version = "0.1.0"
edition = "2024"
# This lists off all of the crates that come DEFAULT with the template
# This is so machete doesn't catch them in projects that do not use the crates provided by the template. Since many are required once you go beyond getting started, a few others are nice to haves like heapless and static_cell.
[package.metadata.cargo-machete]
ignored = [
"cortex-m",
"cortex-m-rt",
"critical-section",
"defmt",
"defmt-rtt",
"embassy-embedded-hal",
"embassy-executor",
"embassy-futures",
"embassy-rp",
"embassy-sync",
"embassy-sync",
"embassy-time",
"embassy-usb",
"embedded-hal-async",
"embedded-io-async",
"heapless",
"panic-probe",
"static_cell",
]
[dependencies]
cortex-m = { version = "0.7.6", features = ["inline-asm"] }
cortex-m-rt = "0.7.0"
critical-section = "1.1"
defmt = "1.1.1"
defmt-rtt = "1.3.0"
embassy-embedded-hal = { version = "0.6.0", features = ["defmt"] }
embassy-executor = { version = "0.10.0", features = ["defmt"] }
embassy-futures = { version = "0.1.2", features = ["defmt"] }
@@ -12,11 +40,8 @@ embassy-rp = { version = "0.10.0", features = ["defmt", "unstable-pac", "time-dr
embassy-sync = { version = "0.8.0", features = ["defmt"] }
embassy-time = { version = "0.5.1", features = ["defmt", "defmt-timestamp-uptime"] }
embassy-usb = { version = "0.6.0", features = ["defmt"] }
cortex-m = { version = "0.7.6", features = ["inline-asm"] }
cortex-m-rt = "0.7.0"
critical-section = "1.1"
panic-probe = { version = "1.0.0", features = ["print-defmt"] }
heapless = "0.9"
embedded-hal-async = "1.0"
embedded-io-async = { version = "0.7.0", features = ["defmt"] }
defmt-rtt = "1.3.0"
heapless = "0.9"
panic-probe = { version = "1.0.0", features = ["print-defmt"] }
static_cell = "2.1.1"
+1 -1
View File
@@ -25,7 +25,7 @@ pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
entry = "cortex_m_rt::entry"
)]
async fn main(_spawner: Spawner) {
let p = embassy_rp::init(Default::default());
let _p = embassy_rp::init(Default::default());
loop {
info!("led on!");