Skip to content

Commit 0e0eadc

Browse files
authored
Merge pull request #2 from mbrossard/fixes
A few fixes and one enhancement
2 parents 6f29b7d + 8d92900 commit 0e0eadc

File tree

6 files changed

+28
-11
lines changed

6 files changed

+28
-11
lines changed

.github/workflows/ci_checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- uses: dtolnay/rust-toolchain@master
3030
with:
3131
toolchain: ${{ matrix.rust }}
32-
target: thumbv6m-none-eabi
32+
target: thumbv8m.main-none-eabihf
3333
- run: cargo install flip-link
3434
- run: cargo build --all
3535
- run: cargo build --all --release
@@ -43,7 +43,7 @@ jobs:
4343
- uses: dtolnay/rust-toolchain@stable
4444
with:
4545
components: clippy
46-
target: thumbv6m-none-eabi
46+
target: thumbv8m.main-none-eabihf
4747
- run: cargo clippy --all-features -- --deny=warnings
4848
formatting:
4949
name: Formatting
@@ -55,5 +55,5 @@ jobs:
5555
- uses: dtolnay/rust-toolchain@stable
5656
with:
5757
components: rustfmt
58-
target: thumbv6m-none-eabi
58+
target: thumbv8m.main-none-eabihf
5959
- run: cargo fmt -- --check

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ panic-probe = { version = "1", features = ["print-defmt"] }
1717
#rp-pico2 = "0.9" # TODO: Do we have that crate already ?
1818

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

2226
# cargo build/run
2327
[profile.dev]

Embed.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ enabled = true
1818
halt_afterwards = false
1919

2020
[default.general]
21-
chip = "RP2040"
21+
chip = "RP235x"
2222
log_level = "WARN"
23-
# RP2040 does not support connect_under_reset
23+
# RP2350 does not support connect_under_reset?
2424
connect_under_reset = false
2525

2626
[default.rtt]

cargo-generate/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ panic-probe = { version = "1", features = ["print-defmt"] }
1717
#rp-pico2 = "0.9" # TODO: Do we have that crate already ?
1818

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

2226
# cargo build/run
2327
[profile.dev]

memory.x

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,3 @@ SECTIONS {
7373

7474
PROVIDE(start_to_end = __end_block_addr - __start_block_addr);
7575
PROVIDE(end_to_start = __start_block_addr - __end_block_addr);
76-
77-

src/main.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ fn main() -> ! {
5252
&mut pac.RESETS,
5353
);
5454

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

76+
/// Program metadata for `picotool info`
77+
#[link_section = ".bi_entries"]
78+
#[used]
79+
pub static PICOTOOL_ENTRIES: [rp235x_hal::binary_info::EntryAddr; 5] = [
80+
rp235x_hal::binary_info::rp_cargo_bin_name!(),
81+
rp235x_hal::binary_info::rp_cargo_version!(),
82+
rp235x_hal::binary_info::rp_program_description!(c"RP2350 Template"),
83+
rp235x_hal::binary_info::rp_cargo_homepage_url!(),
84+
rp235x_hal::binary_info::rp_program_build_attribute!(),
85+
];
86+
7687
// End of file

0 commit comments

Comments
 (0)