Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: thumbv6m-none-eabi
target: thumbv8m.main-none-eabihf
- run: cargo install flip-link
- run: cargo build --all
- run: cargo build --all --release
Expand All @@ -43,7 +43,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
target: thumbv6m-none-eabi
target: thumbv8m.main-none-eabihf
- run: cargo clippy --all-features -- --deny=warnings
formatting:
name: Formatting
Expand All @@ -55,5 +55,5 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
target: thumbv6m-none-eabi
target: thumbv8m.main-none-eabihf
- run: cargo fmt -- --check
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ panic-probe = { version = "1", features = ["print-defmt"] }
#rp-pico2 = "0.9" # TODO: Do we have that crate already ?

# If you're not going to use a Board Support Package you'll need these:
rp235x-hal = { version="0.3", features=["rt", "critical-section-impl"] }
rp235x-hal = { version = "0.3", features = [
"rt",
"critical-section-impl",
"binary-info",
] }

# cargo build/run
[profile.dev]
Expand Down
4 changes: 2 additions & 2 deletions Embed.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ enabled = true
halt_afterwards = false

[default.general]
chip = "RP2040"
chip = "RP235x"
log_level = "WARN"
# RP2040 does not support connect_under_reset
# RP2350 does not support connect_under_reset?
connect_under_reset = false

[default.rtt]
Expand Down
6 changes: 5 additions & 1 deletion cargo-generate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ panic-probe = { version = "1", features = ["print-defmt"] }
#rp-pico2 = "0.9" # TODO: Do we have that crate already ?

# If you're not going to use a Board Support Package you'll need these:
rp235x-hal = { version="0.3", features=["rt", "critical-section-impl"] }
rp235x-hal = { version = "0.3", features = [
"rt",
"critical-section-impl",
"binary-info",
] }

# cargo build/run
[profile.dev]
Expand Down
2 changes: 0 additions & 2 deletions memory.x
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,3 @@ SECTIONS {

PROVIDE(start_to_end = __end_block_addr - __start_block_addr);
PROVIDE(end_to_start = __start_block_addr - __end_block_addr);


15 changes: 13 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ fn main() -> ! {
&mut pac.RESETS,
);

// This is the correct pin on the Raspberry Pico board. On other boards, even if they have an
// This is the correct pin on the Raspberry Pico 2 board. On other boards, even if they have an
// on-board LED, it might need to be changed.
//
// Notably, on the Pico W, the LED is not connected to any of the RP2040 GPIOs but to the cyw43 module instead.
// Notably, on the Pico 2 W, the LED is not connected to any of the RP2350 GPIOs but to the cyw43 module instead.
// One way to do that is by using [embassy](https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/wifi_blinky.rs)
//
// If you have a Pico W and want to toggle a LED with a simple GPIO output pin, you can connect an external
Expand All @@ -73,4 +73,15 @@ fn main() -> ! {
}
}

/// Program metadata for `picotool info`
#[link_section = ".bi_entries"]
#[used]
pub static PICOTOOL_ENTRIES: [rp235x_hal::binary_info::EntryAddr; 5] = [
rp235x_hal::binary_info::rp_cargo_bin_name!(),
rp235x_hal::binary_info::rp_cargo_version!(),
rp235x_hal::binary_info::rp_program_description!(c"RP2350 Template"),
rp235x_hal::binary_info::rp_cargo_homepage_url!(),
rp235x_hal::binary_info::rp_program_build_attribute!(),
];

// End of file