aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xci.sh1
-rw-r--r--embassy-rp/Cargo.toml3
-rw-r--r--embassy-rp/src/binary_info/consts.rs34
-rw-r--r--embassy-rp/src/binary_info/macros.rs171
-rw-r--r--embassy-rp/src/binary_info/mod.rs175
-rw-r--r--embassy-rp/src/binary_info/types.rs195
-rw-r--r--embassy-rp/src/lib.rs5
-rw-r--r--examples/rp23/src/bin/adc.rs8
-rw-r--r--examples/rp23/src/bin/adc_dma.rs8
-rw-r--r--examples/rp23/src/bin/assign_resources.rs8
-rw-r--r--examples/rp23/src/bin/blinky.rs8
-rw-r--r--examples/rp23/src/bin/blinky_two_channels.rs8
-rw-r--r--examples/rp23/src/bin/blinky_two_tasks.rs8
-rw-r--r--examples/rp23/src/bin/button.rs8
-rw-r--r--examples/rp23/src/bin/debounce.rs8
-rw-r--r--examples/rp23/src/bin/flash.rs8
-rw-r--r--examples/rp23/src/bin/gpio_async.rs8
-rw-r--r--examples/rp23/src/bin/gpout.rs8
-rw-r--r--examples/rp23/src/bin/i2c_async.rs8
-rw-r--r--examples/rp23/src/bin/i2c_async_embassy.rs8
-rw-r--r--examples/rp23/src/bin/i2c_blocking.rs8
-rw-r--r--examples/rp23/src/bin/i2c_slave.rs8
-rw-r--r--examples/rp23/src/bin/interrupt.rs8
-rw-r--r--examples/rp23/src/bin/multicore.rs8
-rw-r--r--examples/rp23/src/bin/multiprio.rs8
-rw-r--r--examples/rp23/src/bin/pio_async.rs8
-rw-r--r--examples/rp23/src/bin/pio_dma.rs8
-rw-r--r--examples/rp23/src/bin/pio_hd44780.rs8
-rw-r--r--examples/rp23/src/bin/pio_i2s.rs8
-rw-r--r--examples/rp23/src/bin/pio_pwm.rs8
-rw-r--r--examples/rp23/src/bin/pio_rotary_encoder.rs8
-rw-r--r--examples/rp23/src/bin/pio_servo.rs8
-rw-r--r--examples/rp23/src/bin/pio_stepper.rs8
-rw-r--r--examples/rp23/src/bin/pio_ws2812.rs8
-rw-r--r--examples/rp23/src/bin/pwm.rs8
-rw-r--r--examples/rp23/src/bin/pwm_input.rs8
-rw-r--r--examples/rp23/src/bin/rosc.rs8
-rw-r--r--examples/rp23/src/bin/shared_bus.rs8
-rw-r--r--examples/rp23/src/bin/sharing.rs8
-rw-r--r--examples/rp23/src/bin/spi.rs8
-rw-r--r--examples/rp23/src/bin/spi_async.rs8
-rw-r--r--examples/rp23/src/bin/spi_display.rs8
-rw-r--r--examples/rp23/src/bin/spi_sdmmc.rs8
-rw-r--r--examples/rp23/src/bin/uart.rs8
-rw-r--r--examples/rp23/src/bin/uart_buffered_split.rs8
-rw-r--r--examples/rp23/src/bin/uart_r503.rs8
-rw-r--r--examples/rp23/src/bin/uart_unidir.rs8
-rw-r--r--examples/rp23/src/bin/usb_webusb.rs8
-rw-r--r--examples/rp23/src/bin/watchdog.rs8
-rw-r--r--examples/rp23/src/bin/zerocopy.rs8
50 files changed, 178 insertions, 750 deletions
diff --git a/ci.sh b/ci.sh
index da842577d..70fe4f5d8 100755
--- a/ci.sh
+++ b/ci.sh
@@ -88,6 +88,7 @@ cargo batch \
88 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features time-driver,qspi-as-gpio,rp2040 \ 88 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features time-driver,qspi-as-gpio,rp2040 \
89 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv8m.main-none-eabihf --features time-driver,defmt,rp235xa \ 89 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv8m.main-none-eabihf --features time-driver,defmt,rp235xa \
90 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv8m.main-none-eabihf --features time-driver,log,rp235xa \ 90 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv8m.main-none-eabihf --features time-driver,log,rp235xa \
91 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv8m.main-none-eabihf --features time-driver,rp235xa,binary-info \
91 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32l552ze,defmt,exti,time-driver-any,time \ 92 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32l552ze,defmt,exti,time-driver-any,time \
92 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32l552ze,defmt,time-driver-any,time \ 93 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32l552ze,defmt,time-driver-any,time \
93 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32l552ze,defmt,exti,time \ 94 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32l552ze,defmt,exti,time \
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml
index d0612957f..29a8a3c53 100644
--- a/embassy-rp/Cargo.toml
+++ b/embassy-rp/Cargo.toml
@@ -105,7 +105,7 @@ _test = []
105## 105##
106## Takes up a little flash space, but picotool can then report the name of your 106## Takes up a little flash space, but picotool can then report the name of your
107## program and other details. 107## program and other details.
108binary-info = [ "rt" ] 108binary-info = ["rt", "dep:rp-binary-info", "rp-binary-info?/binary-info"]
109 109
110[dependencies] 110[dependencies]
111embassy-sync = { version = "0.6.0", path = "../embassy-sync" } 111embassy-sync = { version = "0.6.0", path = "../embassy-sync" }
@@ -143,6 +143,7 @@ pio = {version= "0.2.1" }
143rp2040-boot2 = "0.3" 143rp2040-boot2 = "0.3"
144document-features = "0.2.7" 144document-features = "0.2.7"
145sha2-const-stable = "0.1" 145sha2-const-stable = "0.1"
146rp-binary-info = { version = "0.1.0", optional = true }
146 147
147[dev-dependencies] 148[dev-dependencies]
148embassy-executor = { version = "0.6.0", path = "../embassy-executor", features = ["arch-std", "executor-thread"] } 149embassy-executor = { version = "0.6.0", path = "../embassy-executor", features = ["arch-std", "executor-thread"] }
diff --git a/embassy-rp/src/binary_info/consts.rs b/embassy-rp/src/binary_info/consts.rs
deleted file mode 100644
index d5fcd0d75..000000000
--- a/embassy-rp/src/binary_info/consts.rs
+++ /dev/null
@@ -1,34 +0,0 @@
1//! Constants for binary info
2
3// Credit: Taken from https://github.com/thejpster/rp-hal-rp2350-public (also licensed Apache 2.0 + MIT).
4// Copyright (c) rp-rs organization
5
6/// All Raspberry Pi specified IDs have this tag.
7///
8/// You can create your own for custom fields.
9pub const TAG_RASPBERRY_PI: u16 = super::make_tag(b"RP");
10
11/// Used to note the program name - use with StringEntry
12pub const ID_RP_PROGRAM_NAME: u32 = 0x02031c86;
13/// Used to note the program version - use with StringEntry
14pub const ID_RP_PROGRAM_VERSION_STRING: u32 = 0x11a9bc3a;
15/// Used to note the program build date - use with StringEntry
16pub const ID_RP_PROGRAM_BUILD_DATE_STRING: u32 = 0x9da22254;
17/// Used to note the size of the binary - use with IntegerEntry
18pub const ID_RP_BINARY_END: u32 = 0x68f465de;
19/// Used to note a URL for the program - use with StringEntry
20pub const ID_RP_PROGRAM_URL: u32 = 0x1856239a;
21/// Used to note a description of the program - use with StringEntry
22pub const ID_RP_PROGRAM_DESCRIPTION: u32 = 0xb6a07c19;
23/// Used to note some feature of the program - use with StringEntry
24pub const ID_RP_PROGRAM_FEATURE: u32 = 0xa1f4b453;
25/// Used to note some whether this was a Debug or Release build - use with StringEntry
26pub const ID_RP_PROGRAM_BUILD_ATTRIBUTE: u32 = 0x4275f0d3;
27/// Used to note the Pico SDK version used - use with StringEntry
28pub const ID_RP_SDK_VERSION: u32 = 0x5360b3ab;
29/// Used to note which board this program targets - use with StringEntry
30pub const ID_RP_PICO_BOARD: u32 = 0xb63cffbb;
31/// Used to note which `boot2` image this program uses - use with StringEntry
32pub const ID_RP_BOOT2_NAME: u32 = 0x7f8882e1;
33
34// End of file
diff --git a/embassy-rp/src/binary_info/macros.rs b/embassy-rp/src/binary_info/macros.rs
deleted file mode 100644
index faf6148c8..000000000
--- a/embassy-rp/src/binary_info/macros.rs
+++ /dev/null
@@ -1,171 +0,0 @@
1//! Handy macros for making Binary Info entries
2
3// Credit: Taken from https://github.com/thejpster/rp-hal-rp2350-public (also licensed Apache 2.0 + MIT).
4// Copyright (c) rp-rs organization
5
6/// Generate a static item containing the given environment variable,
7/// and return its [`EntryAddr`](super::EntryAddr).
8#[macro_export]
9macro_rules! binary_info_env {
10 ($tag:expr, $id:expr, $env_var_name:expr) => {
11 $crate::binary_info_str!($tag, $id, {
12 let value = concat!(env!($env_var_name), "\0");
13 // # Safety
14 //
15 // We used `concat!` to null-terminate on the line above.
16 let value_cstr = unsafe { core::ffi::CStr::from_bytes_with_nul_unchecked(value.as_bytes()) };
17 value_cstr
18 })
19 };
20}
21
22/// Generate a static item containing the given string, and return its
23/// [`EntryAddr`](super::EntryAddr).
24///
25/// You must pass a numeric tag, a numeric ID, and `&CStr` (which is always
26/// null-terminated).
27#[macro_export]
28macro_rules! binary_info_str {
29 ($tag:expr, $id:expr, $str:expr) => {{
30 static ENTRY: $crate::binary_info::StringEntry = $crate::binary_info::StringEntry::new($tag, $id, $str);
31 ENTRY.addr()
32 }};
33}
34
35/// Generate a static item containing the given string, and return its
36/// [`EntryAddr`](super::EntryAddr).
37///
38/// You must pass a numeric tag, a numeric ID, and `&CStr` (which is always
39/// null-terminated).
40#[macro_export]
41macro_rules! binary_info_int {
42 ($tag:expr, $id:expr, $int:expr) => {{
43 static ENTRY: $crate::binary_info::IntegerEntry = $crate::binary_info::IntegerEntry::new($tag, $id, $int);
44 ENTRY.addr()
45 }};
46}
47
48/// Generate a static item containing the program name, and return its
49/// [`EntryAddr`](super::EntryAddr).
50#[macro_export]
51macro_rules! binary_info_rp_program_name {
52 ($name:expr) => {
53 $crate::binary_info_str!(
54 $crate::binary_info::consts::TAG_RASPBERRY_PI,
55 $crate::binary_info::consts::ID_RP_PROGRAM_NAME,
56 $name
57 )
58 };
59}
60
61/// Generate a static item containing the `CARGO_BIN_NAME` as the program name,
62/// and return its [`EntryAddr`](super::EntryAddr).
63#[macro_export]
64macro_rules! binary_info_rp_cargo_bin_name {
65 () => {
66 $crate::binary_info_env!(
67 $crate::binary_info::consts::TAG_RASPBERRY_PI,
68 $crate::binary_info::consts::ID_RP_PROGRAM_NAME,
69 "CARGO_BIN_NAME"
70 )
71 };
72}
73
74/// Generate a static item containing the program version, and return its
75/// [`EntryAddr`](super::EntryAddr).
76#[macro_export]
77macro_rules! binary_info_rp_program_version {
78 ($version:expr) => {{
79 $crate::binary_info_str!(
80 $crate::binary_info::consts::TAG_RASPBERRY_PI,
81 $crate::binary_info::consts::ID_RP_PROGRAM_VERSION,
82 $version
83 )
84 }};
85}
86
87/// Generate a static item containing the `CARGO_PKG_VERSION` as the program
88/// version, and return its [`EntryAddr`](super::EntryAddr).
89#[macro_export]
90macro_rules! binary_info_rp_cargo_version {
91 () => {
92 $crate::binary_info_env!(
93 $crate::binary_info::consts::TAG_RASPBERRY_PI,
94 $crate::binary_info::consts::ID_RP_PROGRAM_VERSION_STRING,
95 "CARGO_PKG_VERSION"
96 )
97 };
98}
99
100/// Generate a static item containing the program URL, and return its
101/// [`EntryAddr`](super::EntryAddr).
102#[macro_export]
103macro_rules! binary_info_rp_program_url {
104 ($url:expr) => {
105 $crate::binary_info_str!(
106 $crate::binary_info::consts::TAG_RASPBERRY_PI,
107 $crate::binary_info::consts::ID_RP_PROGRAM_URL,
108 $url
109 )
110 };
111}
112
113/// Generate a static item containing the `CARGO_PKG_HOMEPAGE` as the program URL,
114/// and return its [`EntryAddr`](super::EntryAddr).
115#[macro_export]
116macro_rules! binary_info_rp_cargo_homepage_url {
117 () => {
118 $crate::binary_info_env!(
119 $crate::binary_info::consts::TAG_RASPBERRY_PI,
120 $crate::binary_info::consts::ID_RP_PROGRAM_URL,
121 "CARGO_PKG_HOMEPAGE"
122 )
123 };
124}
125
126/// Generate a static item containing the program description, and return its
127/// [`EntryAddr`](super::EntryAddr).
128#[macro_export]
129macro_rules! binary_info_rp_program_description {
130 ($description:expr) => {
131 $crate::binary_info_str!(
132 $crate::binary_info::consts::TAG_RASPBERRY_PI,
133 $crate::binary_info::consts::ID_RP_PROGRAM_DESCRIPTION,
134 $description
135 )
136 };
137}
138
139/// Generate a static item containing whether this is a debug or a release
140/// build, and return its [`EntryAddr`](super::EntryAddr).
141#[macro_export]
142macro_rules! binary_info_rp_program_build_attribute {
143 () => {
144 $crate::binary_info_str!(
145 $crate::binary_info::consts::TAG_RASPBERRY_PI,
146 $crate::binary_info::consts::ID_RP_PROGRAM_BUILD_ATTRIBUTE,
147 {
148 if cfg!(debug_assertions) {
149 c"debug"
150 } else {
151 c"release"
152 }
153 }
154 )
155 };
156}
157
158/// Generate a static item containing the specific board this program runs on,
159/// and return its [`EntryAddr`](super::EntryAddr).
160#[macro_export]
161macro_rules! binary_info_rp_pico_board {
162 ($board:expr) => {
163 $crate::binary_info_str!(
164 $crate::binary_info::consts::TAG_RASPBERRY_PI,
165 $crate::binary_info::consts::ID_RP_PICO_BOARD,
166 $board
167 )
168 };
169}
170
171// End of file
diff --git a/embassy-rp/src/binary_info/mod.rs b/embassy-rp/src/binary_info/mod.rs
deleted file mode 100644
index ea475086b..000000000
--- a/embassy-rp/src/binary_info/mod.rs
+++ /dev/null
@@ -1,175 +0,0 @@
1//! Code and types for creating Picotool compatible "Binary Info" metadata
2//!
3//! Add something like this to your program, and compile with the "binary-info"
4//! and "rt" features:
5//!
6//! ```
7//! #[link_section = ".bi_entries"]
8//! #[used]
9//! pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 3] = [
10//! embassy_rp::binary_info_rp_program_name!(c"Program Name Here"),
11//! embassy_rp::binary_info_rp_cargo_version!(),
12//! embassy_rp::binary_info_int!(embassy_rp::binary_info::make_tag(b"JP"), 0x0000_0001, 0x12345678),
13//! ];
14//! ```
15
16// Credit: Taken from https://github.com/thejpster/rp-hal-rp2350-public (also licensed Apache 2.0 + MIT).
17// Copyright (c) rp-rs organization
18
19pub mod consts;
20
21mod types;
22pub use types::*;
23
24#[macro_use]
25mod macros;
26
27extern "C" {
28 /// The linker script sets this symbol to have the address of the first
29 /// entry in the `.bi_entries` section.
30 static __bi_entries_start: EntryAddr;
31 /// The linker script sets this symbol to have the address just past the
32 /// last entry in the `.bi_entries` section.
33 static __bi_entries_end: EntryAddr;
34 /// The linker script sets this symbol to have the address of the first
35 /// entry in the `.data` section.
36 static __sdata: u32;
37 /// The linker script sets this symbol to have the address just past the
38 /// first entry in the `.data` section.
39 static __edata: u32;
40 /// The linker script sets this symbol to have the address of the
41 /// initialisation data for the first entry in the `.data` section (i.e. a
42 /// flash address, not a RAM address).
43 static __sidata: u32;
44}
45
46/// Picotool can find this block in our ELF file and report interesting
47/// metadata.
48///
49/// The data here tells picotool the start and end flash addresses of our
50/// metadata.
51#[cfg(feature = "binary-info")]
52#[link_section = ".start_block"]
53#[used]
54pub static PICOTOOL_HEADER: Header = unsafe {
55 Header::new(
56 core::ptr::addr_of!(__bi_entries_start),
57 core::ptr::addr_of!(__bi_entries_end),
58 &MAPPING_TABLE,
59 )
60};
61
62/// This tells picotool how to convert RAM addresses back into Flash addresses
63#[cfg(feature = "binary-info")]
64pub static MAPPING_TABLE: [MappingTableEntry; 2] = [
65 // This is the entry for .data
66 MappingTableEntry {
67 source_addr_start: unsafe { core::ptr::addr_of!(__sidata) },
68 dest_addr_start: unsafe { core::ptr::addr_of!(__sdata) },
69 dest_addr_end: unsafe { core::ptr::addr_of!(__edata) },
70 },
71 // This is the terminating marker
72 MappingTableEntry::null(),
73];
74
75/// Create a 'Binary Info' entry containing the program name
76///
77/// This is well-known to picotool, and will be displayed if you run `picotool info`.
78///
79/// * Tag: [`consts::TAG_RASPBERRY_PI`]
80/// * ID: [`consts::ID_RP_PROGRAM_NAME`]
81pub const fn rp_program_name(name: &'static core::ffi::CStr) -> StringEntry {
82 StringEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_PROGRAM_NAME, name)
83}
84
85/// Create a 'Binary Info' entry containing the program version.
86///
87/// * Tag: [`consts::TAG_RASPBERRY_PI`]
88/// * Id: [`consts::ID_RP_PROGRAM_VERSION_STRING`]
89pub const fn rp_program_version(name: &'static core::ffi::CStr) -> StringEntry {
90 StringEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_PROGRAM_VERSION_STRING, name)
91}
92
93/// Create a 'Binary Info' entry with a URL
94///
95/// * Tag: [`consts::TAG_RASPBERRY_PI`]
96/// * Id: [`consts::ID_RP_PROGRAM_URL`]
97pub const fn rp_program_url(url: &'static core::ffi::CStr) -> StringEntry {
98 StringEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_PROGRAM_URL, url)
99}
100
101/// Create a 'Binary Info' with the program build date
102///
103/// * Tag: [`consts::TAG_RASPBERRY_PI`]
104/// * Id: [`consts::ID_RP_PROGRAM_BUILD_DATE_STRING`]
105pub const fn rp_program_build_date_string(value: &'static core::ffi::CStr) -> StringEntry {
106 StringEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_PROGRAM_BUILD_DATE_STRING, value)
107}
108
109/// Create a 'Binary Info' with the size of the binary
110///
111/// * Tag: [`consts::TAG_RASPBERRY_PI`]
112/// * Id: [`consts::ID_RP_BINARY_END`]
113pub const fn rp_binary_end(value: u32) -> IntegerEntry {
114 IntegerEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_BINARY_END, value)
115}
116
117/// Create a 'Binary Info' with a description of the program
118///
119/// * Tag: [`consts::TAG_RASPBERRY_PI`]
120/// * Id: [`consts::ID_RP_PROGRAM_DESCRIPTION`]
121pub const fn rp_program_description(value: &'static core::ffi::CStr) -> StringEntry {
122 StringEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_PROGRAM_DESCRIPTION, value)
123}
124
125/// Create a 'Binary Info' with some feature of the program
126///
127/// * Tag: [`consts::TAG_RASPBERRY_PI`]
128/// * Id: [`consts::ID_RP_PROGRAM_FEATURE`]
129pub const fn rp_program_feature(value: &'static core::ffi::CStr) -> StringEntry {
130 StringEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_PROGRAM_FEATURE, value)
131}
132
133/// Create a 'Binary Info' with some whether this was a Debug or Release build
134///
135/// * Tag: [`consts::TAG_RASPBERRY_PI`]
136/// * Id: [`consts::ID_RP_PROGRAM_BUILD_ATTRIBUTE`]
137pub const fn rp_program_build_attribute(value: &'static core::ffi::CStr) -> StringEntry {
138 StringEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_PROGRAM_BUILD_ATTRIBUTE, value)
139}
140
141/// Create a 'Binary Info' with the Pico SDK version used
142///
143/// * Tag: [`consts::TAG_RASPBERRY_PI`]
144/// * Id: [`consts::ID_RP_SDK_VERSION`]
145pub const fn rp_sdk_version(value: &'static core::ffi::CStr) -> StringEntry {
146 StringEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_SDK_VERSION, value)
147}
148
149/// Create a 'Binary Info' with which board this program targets
150///
151/// * Tag: [`consts::TAG_RASPBERRY_PI`]
152/// * Id: [`consts::ID_RP_PICO_BOARD`]
153pub const fn rp_pico_board(value: &'static core::ffi::CStr) -> StringEntry {
154 StringEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_PICO_BOARD, value)
155}
156
157/// Create a 'Binary Info' with which `boot2` image this program uses
158///
159/// * Tag: [`consts::TAG_RASPBERRY_PI`]
160/// * Id: [`consts::ID_RP_BOOT2_NAME`]
161pub const fn rp_boot2_name(value: &'static core::ffi::CStr) -> StringEntry {
162 StringEntry::new(consts::TAG_RASPBERRY_PI, consts::ID_RP_BOOT2_NAME, value)
163}
164
165/// Create a tag from two ASCII letters.
166///
167/// ```
168/// let tag = embassy_rp::binary_info::make_tag(b"RP");
169/// assert_eq!(tag, 0x5052);
170/// ```
171pub const fn make_tag(c: &[u8; 2]) -> u16 {
172 u16::from_le_bytes(*c)
173}
174
175// End of file
diff --git a/embassy-rp/src/binary_info/types.rs b/embassy-rp/src/binary_info/types.rs
deleted file mode 100644
index 6aec1902e..000000000
--- a/embassy-rp/src/binary_info/types.rs
+++ /dev/null
@@ -1,195 +0,0 @@
1//! Types for the Binary Info system
2
3// Credit: Taken from https://github.com/thejpster/rp-hal-rp2350-public (also licensed Apache 2.0 + MIT).
4// Copyright (c) rp-rs organization
5
6/// This is the 'Binary Info' header block that `picotool` looks for in your UF2
7/// file/ELF file/Pico in Bootloader Mode to give you useful metadata about your
8/// program.
9///
10/// It should be placed in the first 4096 bytes of flash, so use your `memory.x`
11/// to insert a section between `.text` and `.vector_table` and put a static
12/// value of this type in that section.
13#[repr(C)]
14pub struct Header {
15 /// Must be equal to Picotool::MARKER_START
16 marker_start: u32,
17 /// The first in our table of pointers to Entries
18 entries_start: *const EntryAddr,
19 /// The last in our table of pointers to Entries
20 entries_end: *const EntryAddr,
21 /// The first entry in a null-terminated RAM/Flash mapping table
22 mapping_table: *const MappingTableEntry,
23 /// Must be equal to Picotool::MARKER_END
24 marker_end: u32,
25}
26
27impl Header {
28 /// This is the `BINARY_INFO_MARKER_START` magic value from `picotool`
29 const MARKER_START: u32 = 0x7188ebf2;
30 /// This is the `BINARY_INFO_MARKER_END` magic value from `picotool`
31 const MARKER_END: u32 = 0xe71aa390;
32
33 /// Create a new `picotool` compatible header.
34 ///
35 /// * `entries_start` - the first [`EntryAddr`] in the table
36 /// * `entries_end` - the last [`EntryAddr`] in the table
37 /// * `mapping_table` - the RAM/Flash address mapping table
38 pub const fn new(
39 entries_start: *const EntryAddr,
40 entries_end: *const EntryAddr,
41 mapping_table: &'static [MappingTableEntry],
42 ) -> Self {
43 let mapping_table = mapping_table.as_ptr();
44 Self {
45 marker_start: Self::MARKER_START,
46 entries_start,
47 entries_end,
48 mapping_table,
49 marker_end: Self::MARKER_END,
50 }
51 }
52}
53
54// We need this as rustc complains that is is unsafe to share `*const u32`
55// pointers between threads. We only allow these to be created with static
56// data, so this is OK.
57unsafe impl Sync for Header {}
58
59/// This is a reference to an entry. It's like a `&dyn` ref to some type `T:
60/// Entry`, except that the run-time type information is encoded into the
61/// Entry itself in very specific way.
62#[repr(transparent)]
63pub struct EntryAddr(*const u32);
64
65// We need this as rustc complains that is is unsafe to share `*const u32`
66// pointers between threads. We only allow these to be created with static
67// data, so this is OK.
68unsafe impl Sync for EntryAddr {}
69
70/// Allows us to tell picotool where values are in the UF2 given their run-time
71/// address.
72///
73/// The most obvious example is RAM variables, which must be found in the
74/// `.data` section of the UF2.
75#[repr(C)]
76pub struct MappingTableEntry {
77 /// The start address in RAM (or wherever the address picotool finds will
78 /// point)
79 pub source_addr_start: *const u32,
80 /// The start address in flash (or whever the data actually lives in the
81 /// ELF)
82 pub dest_addr_start: *const u32,
83 /// The end address in flash
84 pub dest_addr_end: *const u32,
85}
86
87impl MappingTableEntry {
88 /// Generate a null entry to mark the end of the list
89 pub const fn null() -> MappingTableEntry {
90 MappingTableEntry {
91 source_addr_start: core::ptr::null(),
92 dest_addr_start: core::ptr::null(),
93 dest_addr_end: core::ptr::null(),
94 }
95 }
96}
97
98// We need this as rustc complains that is is unsafe to share `*const u32`
99// pointers between threads. We only allow these to be created with static
100// data, so this is OK.
101unsafe impl Sync for MappingTableEntry {}
102
103/// This is the set of data types that `picotool` supports.
104#[repr(u16)]
105pub enum DataType {
106 /// Raw data
107 Raw = 1,
108 /// Data with a size
109 SizedData = 2,
110 /// A list of binary data
111 BinaryInfoListZeroTerminated = 3,
112 /// A BSON encoded blob
113 Bson = 4,
114 /// An Integer with an ID
115 IdAndInt = 5,
116 /// A string with an Id
117 IdAndString = 6,
118 /// A block device
119 BlockDevice = 7,
120 /// GPIO pins, with their function
121 PinsWithFunction = 8,
122 /// GPIO pins, with their name
123 PinsWithName = 9,
124 /// GPIO pins, with multiple names?
125 PinsWithNames = 10,
126}
127
128/// All Entries start with this common header
129#[repr(C)]
130struct EntryCommon {
131 data_type: DataType,
132 tag: u16,
133}
134
135/// An entry which contains both an ID (e.g. `ID_RP_PROGRAM_NAME`) and a pointer
136/// to a null-terminated string.
137#[repr(C)]
138pub struct StringEntry {
139 header: EntryCommon,
140 id: u32,
141 value: *const core::ffi::c_char,
142}
143
144impl StringEntry {
145 /// Create a new `StringEntry`
146 pub const fn new(tag: u16, id: u32, value: &'static core::ffi::CStr) -> StringEntry {
147 StringEntry {
148 header: EntryCommon {
149 data_type: DataType::IdAndString,
150 tag,
151 },
152 id,
153 value: value.as_ptr(),
154 }
155 }
156
157 /// Get this entry's address
158 pub const fn addr(&self) -> EntryAddr {
159 EntryAddr(self as *const Self as *const u32)
160 }
161}
162
163// We need this as rustc complains that is is unsafe to share `*const
164// core::ffi::c_char` pointers between threads. We only allow these to be
165// created with static string slices, so it's OK.
166unsafe impl Sync for StringEntry {}
167
168/// An entry which contains both an ID (e.g. `ID_RP_BINARY_END`) and an integer.
169#[repr(C)]
170pub struct IntegerEntry {
171 header: EntryCommon,
172 id: u32,
173 value: u32,
174}
175
176impl IntegerEntry {
177 /// Create a new `StringEntry`
178 pub const fn new(tag: u16, id: u32, value: u32) -> IntegerEntry {
179 IntegerEntry {
180 header: EntryCommon {
181 data_type: DataType::IdAndInt,
182 tag,
183 },
184 id,
185 value,
186 }
187 }
188
189 /// Get this entry's address
190 pub const fn addr(&self) -> EntryAddr {
191 EntryAddr(self as *const Self as *const u32)
192 }
193}
194
195// End of file
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs
index 1fc397107..21f0771de 100644
--- a/embassy-rp/src/lib.rs
+++ b/embassy-rp/src/lib.rs
@@ -9,6 +9,9 @@
9// This mod MUST go first, so that the others see its macros. 9// This mod MUST go first, so that the others see its macros.
10pub(crate) mod fmt; 10pub(crate) mod fmt;
11 11
12#[cfg(feature = "binary-info")]
13pub use rp_binary_info as binary_info;
14
12#[cfg(feature = "critical-section-impl")] 15#[cfg(feature = "critical-section-impl")]
13mod critical_section_impl; 16mod critical_section_impl;
14 17
@@ -16,8 +19,6 @@ mod intrinsics;
16 19
17pub mod adc; 20pub mod adc;
18#[cfg(feature = "_rp235x")] 21#[cfg(feature = "_rp235x")]
19pub mod binary_info;
20#[cfg(feature = "_rp235x")]
21pub mod block; 22pub mod block;
22#[cfg(feature = "rp2040")] 23#[cfg(feature = "rp2040")]
23pub mod bootsel; 24pub mod bootsel;
diff --git a/examples/rp23/src/bin/adc.rs b/examples/rp23/src/bin/adc.rs
index 19872607e..d1f053d39 100644
--- a/examples/rp23/src/bin/adc.rs
+++ b/examples/rp23/src/bin/adc.rs
@@ -21,10 +21,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
21#[link_section = ".bi_entries"] 21#[link_section = ".bi_entries"]
22#[used] 22#[used]
23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
24 embassy_rp::binary_info_rp_cargo_bin_name!(), 24 embassy_rp::binary_info::rp_program_name!(c"example"),
25 embassy_rp::binary_info_rp_cargo_version!(), 25 embassy_rp::binary_info::rp_cargo_version!(),
26 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 26 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
27 embassy_rp::binary_info_rp_program_build_attribute!(), 27 embassy_rp::binary_info::rp_program_build_attribute!(),
28]; 28];
29 29
30bind_interrupts!(struct Irqs { 30bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/adc_dma.rs b/examples/rp23/src/bin/adc_dma.rs
index d538ddaa2..5046e5530 100644
--- a/examples/rp23/src/bin/adc_dma.rs
+++ b/examples/rp23/src/bin/adc_dma.rs
@@ -21,10 +21,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
21#[link_section = ".bi_entries"] 21#[link_section = ".bi_entries"]
22#[used] 22#[used]
23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
24 embassy_rp::binary_info_rp_cargo_bin_name!(), 24 embassy_rp::binary_info::rp_program_name!(c"example"),
25 embassy_rp::binary_info_rp_cargo_version!(), 25 embassy_rp::binary_info::rp_cargo_version!(),
26 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 26 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
27 embassy_rp::binary_info_rp_program_build_attribute!(), 27 embassy_rp::binary_info::rp_program_build_attribute!(),
28]; 28];
29 29
30bind_interrupts!(struct Irqs { 30bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/assign_resources.rs b/examples/rp23/src/bin/assign_resources.rs
index 923c13514..2f9783917 100644
--- a/examples/rp23/src/bin/assign_resources.rs
+++ b/examples/rp23/src/bin/assign_resources.rs
@@ -28,10 +28,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
28#[link_section = ".bi_entries"] 28#[link_section = ".bi_entries"]
29#[used] 29#[used]
30pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 30pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
31 embassy_rp::binary_info_rp_cargo_bin_name!(), 31 embassy_rp::binary_info::rp_program_name!(c"example"),
32 embassy_rp::binary_info_rp_cargo_version!(), 32 embassy_rp::binary_info::rp_cargo_version!(),
33 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 33 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
34 embassy_rp::binary_info_rp_program_build_attribute!(), 34 embassy_rp::binary_info::rp_program_build_attribute!(),
35]; 35];
36 36
37#[embassy_executor::main] 37#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/blinky.rs b/examples/rp23/src/bin/blinky.rs
index 02bdf9b3d..9e45679c8 100644
--- a/examples/rp23/src/bin/blinky.rs
+++ b/examples/rp23/src/bin/blinky.rs
@@ -21,10 +21,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
21#[link_section = ".bi_entries"] 21#[link_section = ".bi_entries"]
22#[used] 22#[used]
23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
24 embassy_rp::binary_info_rp_cargo_bin_name!(), 24 embassy_rp::binary_info::rp_program_name!(c"example"),
25 embassy_rp::binary_info_rp_cargo_version!(), 25 embassy_rp::binary_info::rp_cargo_version!(),
26 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 26 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
27 embassy_rp::binary_info_rp_program_build_attribute!(), 27 embassy_rp::binary_info::rp_program_build_attribute!(),
28]; 28];
29 29
30#[embassy_executor::main] 30#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/blinky_two_channels.rs b/examples/rp23/src/bin/blinky_two_channels.rs
index 4d7dc89fa..87fc58bbc 100644
--- a/examples/rp23/src/bin/blinky_two_channels.rs
+++ b/examples/rp23/src/bin/blinky_two_channels.rs
@@ -23,10 +23,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
23#[link_section = ".bi_entries"] 23#[link_section = ".bi_entries"]
24#[used] 24#[used]
25pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 25pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
26 embassy_rp::binary_info_rp_cargo_bin_name!(), 26 embassy_rp::binary_info::rp_program_name!(c"example"),
27 embassy_rp::binary_info_rp_cargo_version!(), 27 embassy_rp::binary_info::rp_cargo_version!(),
28 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 28 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
29 embassy_rp::binary_info_rp_program_build_attribute!(), 29 embassy_rp::binary_info::rp_program_build_attribute!(),
30]; 30];
31 31
32enum LedState { 32enum LedState {
diff --git a/examples/rp23/src/bin/blinky_two_tasks.rs b/examples/rp23/src/bin/blinky_two_tasks.rs
index 24b960242..40236c53b 100644
--- a/examples/rp23/src/bin/blinky_two_tasks.rs
+++ b/examples/rp23/src/bin/blinky_two_tasks.rs
@@ -23,10 +23,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
23#[link_section = ".bi_entries"] 23#[link_section = ".bi_entries"]
24#[used] 24#[used]
25pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 25pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
26 embassy_rp::binary_info_rp_cargo_bin_name!(), 26 embassy_rp::binary_info::rp_program_name!(c"example"),
27 embassy_rp::binary_info_rp_cargo_version!(), 27 embassy_rp::binary_info::rp_cargo_version!(),
28 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 28 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
29 embassy_rp::binary_info_rp_program_build_attribute!(), 29 embassy_rp::binary_info::rp_program_build_attribute!(),
30]; 30];
31 31
32type LedType = Mutex<ThreadModeRawMutex, Option<Output<'static>>>; 32type LedType = Mutex<ThreadModeRawMutex, Option<Output<'static>>>;
diff --git a/examples/rp23/src/bin/button.rs b/examples/rp23/src/bin/button.rs
index 0a0559397..fb067a370 100644
--- a/examples/rp23/src/bin/button.rs
+++ b/examples/rp23/src/bin/button.rs
@@ -18,10 +18,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
18#[link_section = ".bi_entries"] 18#[link_section = ".bi_entries"]
19#[used] 19#[used]
20pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 20pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
21 embassy_rp::binary_info_rp_cargo_bin_name!(), 21 embassy_rp::binary_info::rp_program_name!(c"example"),
22 embassy_rp::binary_info_rp_cargo_version!(), 22 embassy_rp::binary_info::rp_cargo_version!(),
23 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 23 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
24 embassy_rp::binary_info_rp_program_build_attribute!(), 24 embassy_rp::binary_info::rp_program_build_attribute!(),
25]; 25];
26 26
27#[embassy_executor::main] 27#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/debounce.rs b/examples/rp23/src/bin/debounce.rs
index e82e71f61..e672521ec 100644
--- a/examples/rp23/src/bin/debounce.rs
+++ b/examples/rp23/src/bin/debounce.rs
@@ -19,10 +19,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
19#[link_section = ".bi_entries"] 19#[link_section = ".bi_entries"]
20#[used] 20#[used]
21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
22 embassy_rp::binary_info_rp_cargo_bin_name!(), 22 embassy_rp::binary_info::rp_program_name!(c"example"),
23 embassy_rp::binary_info_rp_cargo_version!(), 23 embassy_rp::binary_info::rp_cargo_version!(),
24 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 24 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
25 embassy_rp::binary_info_rp_program_build_attribute!(), 25 embassy_rp::binary_info::rp_program_build_attribute!(),
26]; 26];
27 27
28pub struct Debouncer<'a> { 28pub struct Debouncer<'a> {
diff --git a/examples/rp23/src/bin/flash.rs b/examples/rp23/src/bin/flash.rs
index 2917dda0b..811561f26 100644
--- a/examples/rp23/src/bin/flash.rs
+++ b/examples/rp23/src/bin/flash.rs
@@ -19,10 +19,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
19#[link_section = ".bi_entries"] 19#[link_section = ".bi_entries"]
20#[used] 20#[used]
21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
22 embassy_rp::binary_info_rp_cargo_bin_name!(), 22 embassy_rp::binary_info::rp_program_name!(c"example"),
23 embassy_rp::binary_info_rp_cargo_version!(), 23 embassy_rp::binary_info::rp_cargo_version!(),
24 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 24 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
25 embassy_rp::binary_info_rp_program_build_attribute!(), 25 embassy_rp::binary_info::rp_program_build_attribute!(),
26]; 26];
27 27
28const ADDR_OFFSET: u32 = 0x100000; 28const ADDR_OFFSET: u32 = 0x100000;
diff --git a/examples/rp23/src/bin/gpio_async.rs b/examples/rp23/src/bin/gpio_async.rs
index 1618f7c8b..ff12367bf 100644
--- a/examples/rp23/src/bin/gpio_async.rs
+++ b/examples/rp23/src/bin/gpio_async.rs
@@ -21,10 +21,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
21#[link_section = ".bi_entries"] 21#[link_section = ".bi_entries"]
22#[used] 22#[used]
23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
24 embassy_rp::binary_info_rp_cargo_bin_name!(), 24 embassy_rp::binary_info::rp_program_name!(c"example"),
25 embassy_rp::binary_info_rp_cargo_version!(), 25 embassy_rp::binary_info::rp_cargo_version!(),
26 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 26 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
27 embassy_rp::binary_info_rp_program_build_attribute!(), 27 embassy_rp::binary_info::rp_program_build_attribute!(),
28]; 28];
29 29
30/// It requires an external signal to be manually triggered on PIN 16. For 30/// It requires an external signal to be manually triggered on PIN 16. For
diff --git a/examples/rp23/src/bin/gpout.rs b/examples/rp23/src/bin/gpout.rs
index b15963f02..d2ee55197 100644
--- a/examples/rp23/src/bin/gpout.rs
+++ b/examples/rp23/src/bin/gpout.rs
@@ -20,10 +20,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
20#[link_section = ".bi_entries"] 20#[link_section = ".bi_entries"]
21#[used] 21#[used]
22pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 22pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
23 embassy_rp::binary_info_rp_cargo_bin_name!(), 23 embassy_rp::binary_info::rp_program_name!(c"example"),
24 embassy_rp::binary_info_rp_cargo_version!(), 24 embassy_rp::binary_info::rp_cargo_version!(),
25 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 25 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
26 embassy_rp::binary_info_rp_program_build_attribute!(), 26 embassy_rp::binary_info::rp_program_build_attribute!(),
27]; 27];
28 28
29#[embassy_executor::main] 29#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/i2c_async.rs b/examples/rp23/src/bin/i2c_async.rs
index 2528fe1d2..c8d918b56 100644
--- a/examples/rp23/src/bin/i2c_async.rs
+++ b/examples/rp23/src/bin/i2c_async.rs
@@ -24,10 +24,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
24#[link_section = ".bi_entries"] 24#[link_section = ".bi_entries"]
25#[used] 25#[used]
26pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 26pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
27 embassy_rp::binary_info_rp_cargo_bin_name!(), 27 embassy_rp::binary_info::rp_program_name!(c"example"),
28 embassy_rp::binary_info_rp_cargo_version!(), 28 embassy_rp::binary_info::rp_cargo_version!(),
29 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 29 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
30 embassy_rp::binary_info_rp_program_build_attribute!(), 30 embassy_rp::binary_info::rp_program_build_attribute!(),
31]; 31];
32 32
33bind_interrupts!(struct Irqs { 33bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/i2c_async_embassy.rs b/examples/rp23/src/bin/i2c_async_embassy.rs
index 461b1d171..cce0abcde 100644
--- a/examples/rp23/src/bin/i2c_async_embassy.rs
+++ b/examples/rp23/src/bin/i2c_async_embassy.rs
@@ -19,10 +19,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
19#[link_section = ".bi_entries"] 19#[link_section = ".bi_entries"]
20#[used] 20#[used]
21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
22 embassy_rp::binary_info_rp_cargo_bin_name!(), 22 embassy_rp::binary_info::rp_program_name!(c"example"),
23 embassy_rp::binary_info_rp_cargo_version!(), 23 embassy_rp::binary_info::rp_cargo_version!(),
24 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 24 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
25 embassy_rp::binary_info_rp_program_build_attribute!(), 25 embassy_rp::binary_info::rp_program_build_attribute!(),
26]; 26];
27 27
28// Our anonymous hypotetical temperature sensor could be: 28// Our anonymous hypotetical temperature sensor could be:
diff --git a/examples/rp23/src/bin/i2c_blocking.rs b/examples/rp23/src/bin/i2c_blocking.rs
index 6d36d1890..85c33bf0d 100644
--- a/examples/rp23/src/bin/i2c_blocking.rs
+++ b/examples/rp23/src/bin/i2c_blocking.rs
@@ -22,10 +22,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
22#[link_section = ".bi_entries"] 22#[link_section = ".bi_entries"]
23#[used] 23#[used]
24pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 24pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
25 embassy_rp::binary_info_rp_cargo_bin_name!(), 25 embassy_rp::binary_info::rp_program_name!(c"example"),
26 embassy_rp::binary_info_rp_cargo_version!(), 26 embassy_rp::binary_info::rp_cargo_version!(),
27 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 27 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
28 embassy_rp::binary_info_rp_program_build_attribute!(), 28 embassy_rp::binary_info::rp_program_build_attribute!(),
29]; 29];
30 30
31#[allow(dead_code)] 31#[allow(dead_code)]
diff --git a/examples/rp23/src/bin/i2c_slave.rs b/examples/rp23/src/bin/i2c_slave.rs
index 1f3408cf3..fb5f3cda1 100644
--- a/examples/rp23/src/bin/i2c_slave.rs
+++ b/examples/rp23/src/bin/i2c_slave.rs
@@ -19,10 +19,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
19#[link_section = ".bi_entries"] 19#[link_section = ".bi_entries"]
20#[used] 20#[used]
21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
22 embassy_rp::binary_info_rp_cargo_bin_name!(), 22 embassy_rp::binary_info::rp_program_name!(c"example"),
23 embassy_rp::binary_info_rp_cargo_version!(), 23 embassy_rp::binary_info::rp_cargo_version!(),
24 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 24 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
25 embassy_rp::binary_info_rp_program_build_attribute!(), 25 embassy_rp::binary_info::rp_program_build_attribute!(),
26]; 26];
27 27
28bind_interrupts!(struct Irqs { 28bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/interrupt.rs b/examples/rp23/src/bin/interrupt.rs
index 6184b1bd7..ee3d9bfe7 100644
--- a/examples/rp23/src/bin/interrupt.rs
+++ b/examples/rp23/src/bin/interrupt.rs
@@ -33,10 +33,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
33#[link_section = ".bi_entries"] 33#[link_section = ".bi_entries"]
34#[used] 34#[used]
35pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 35pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
36 embassy_rp::binary_info_rp_cargo_bin_name!(), 36 embassy_rp::binary_info::rp_program_name!(c"example"),
37 embassy_rp::binary_info_rp_cargo_version!(), 37 embassy_rp::binary_info::rp_cargo_version!(),
38 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 38 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
39 embassy_rp::binary_info_rp_program_build_attribute!(), 39 embassy_rp::binary_info::rp_program_build_attribute!(),
40]; 40];
41 41
42static COUNTER: AtomicU32 = AtomicU32::new(0); 42static COUNTER: AtomicU32 = AtomicU32::new(0);
diff --git a/examples/rp23/src/bin/multicore.rs b/examples/rp23/src/bin/multicore.rs
index 8649143e1..9ab43d7a5 100644
--- a/examples/rp23/src/bin/multicore.rs
+++ b/examples/rp23/src/bin/multicore.rs
@@ -24,10 +24,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
24#[link_section = ".bi_entries"] 24#[link_section = ".bi_entries"]
25#[used] 25#[used]
26pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 26pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
27 embassy_rp::binary_info_rp_cargo_bin_name!(), 27 embassy_rp::binary_info::rp_program_name!(c"example"),
28 embassy_rp::binary_info_rp_cargo_version!(), 28 embassy_rp::binary_info::rp_cargo_version!(),
29 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 29 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
30 embassy_rp::binary_info_rp_program_build_attribute!(), 30 embassy_rp::binary_info::rp_program_build_attribute!(),
31]; 31];
32 32
33static mut CORE1_STACK: Stack<4096> = Stack::new(); 33static mut CORE1_STACK: Stack<4096> = Stack::new();
diff --git a/examples/rp23/src/bin/multiprio.rs b/examples/rp23/src/bin/multiprio.rs
index 7590fb431..27cd3656e 100644
--- a/examples/rp23/src/bin/multiprio.rs
+++ b/examples/rp23/src/bin/multiprio.rs
@@ -74,10 +74,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
74#[link_section = ".bi_entries"] 74#[link_section = ".bi_entries"]
75#[used] 75#[used]
76pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 76pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
77 embassy_rp::binary_info_rp_cargo_bin_name!(), 77 embassy_rp::binary_info::rp_program_name!(c"example"),
78 embassy_rp::binary_info_rp_cargo_version!(), 78 embassy_rp::binary_info::rp_cargo_version!(),
79 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 79 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
80 embassy_rp::binary_info_rp_program_build_attribute!(), 80 embassy_rp::binary_info::rp_program_build_attribute!(),
81]; 81];
82 82
83#[embassy_executor::task] 83#[embassy_executor::task]
diff --git a/examples/rp23/src/bin/pio_async.rs b/examples/rp23/src/bin/pio_async.rs
index 005708bc2..231afc80e 100644
--- a/examples/rp23/src/bin/pio_async.rs
+++ b/examples/rp23/src/bin/pio_async.rs
@@ -20,10 +20,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
20#[link_section = ".bi_entries"] 20#[link_section = ".bi_entries"]
21#[used] 21#[used]
22pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 22pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
23 embassy_rp::binary_info_rp_cargo_bin_name!(), 23 embassy_rp::binary_info::rp_program_name!(c"example"),
24 embassy_rp::binary_info_rp_cargo_version!(), 24 embassy_rp::binary_info::rp_cargo_version!(),
25 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 25 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
26 embassy_rp::binary_info_rp_program_build_attribute!(), 26 embassy_rp::binary_info::rp_program_build_attribute!(),
27]; 27];
28 28
29bind_interrupts!(struct Irqs { 29bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/pio_dma.rs b/examples/rp23/src/bin/pio_dma.rs
index 48fd9123f..60fbcb83a 100644
--- a/examples/rp23/src/bin/pio_dma.rs
+++ b/examples/rp23/src/bin/pio_dma.rs
@@ -21,10 +21,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
21#[link_section = ".bi_entries"] 21#[link_section = ".bi_entries"]
22#[used] 22#[used]
23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
24 embassy_rp::binary_info_rp_cargo_bin_name!(), 24 embassy_rp::binary_info::rp_program_name!(c"example"),
25 embassy_rp::binary_info_rp_cargo_version!(), 25 embassy_rp::binary_info::rp_cargo_version!(),
26 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 26 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
27 embassy_rp::binary_info_rp_program_build_attribute!(), 27 embassy_rp::binary_info::rp_program_build_attribute!(),
28]; 28];
29 29
30bind_interrupts!(struct Irqs { 30bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/pio_hd44780.rs b/examples/rp23/src/bin/pio_hd44780.rs
index fc658267d..92aa858f9 100644
--- a/examples/rp23/src/bin/pio_hd44780.rs
+++ b/examples/rp23/src/bin/pio_hd44780.rs
@@ -26,10 +26,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
26#[link_section = ".bi_entries"] 26#[link_section = ".bi_entries"]
27#[used] 27#[used]
28pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 28pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
29 embassy_rp::binary_info_rp_cargo_bin_name!(), 29 embassy_rp::binary_info::rp_program_name!(c"example"),
30 embassy_rp::binary_info_rp_cargo_version!(), 30 embassy_rp::binary_info::rp_cargo_version!(),
31 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 31 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
32 embassy_rp::binary_info_rp_program_build_attribute!(), 32 embassy_rp::binary_info::rp_program_build_attribute!(),
33]; 33];
34 34
35bind_interrupts!(pub struct Irqs { 35bind_interrupts!(pub struct Irqs {
diff --git a/examples/rp23/src/bin/pio_i2s.rs b/examples/rp23/src/bin/pio_i2s.rs
index 5a3bde759..d6d2d0ade 100644
--- a/examples/rp23/src/bin/pio_i2s.rs
+++ b/examples/rp23/src/bin/pio_i2s.rs
@@ -29,10 +29,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
29#[link_section = ".bi_entries"] 29#[link_section = ".bi_entries"]
30#[used] 30#[used]
31pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 31pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
32 embassy_rp::binary_info_rp_cargo_bin_name!(), 32 embassy_rp::binary_info::rp_program_name!(c"example"),
33 embassy_rp::binary_info_rp_cargo_version!(), 33 embassy_rp::binary_info::rp_cargo_version!(),
34 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 34 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
35 embassy_rp::binary_info_rp_program_build_attribute!(), 35 embassy_rp::binary_info::rp_program_build_attribute!(),
36]; 36];
37 37
38bind_interrupts!(struct Irqs { 38bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/pio_pwm.rs b/examples/rp23/src/bin/pio_pwm.rs
index 7c5eefc45..587f91ac3 100644
--- a/examples/rp23/src/bin/pio_pwm.rs
+++ b/examples/rp23/src/bin/pio_pwm.rs
@@ -22,10 +22,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
22#[link_section = ".bi_entries"] 22#[link_section = ".bi_entries"]
23#[used] 23#[used]
24pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 24pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
25 embassy_rp::binary_info_rp_cargo_bin_name!(), 25 embassy_rp::binary_info::rp_program_name!(c"example"),
26 embassy_rp::binary_info_rp_cargo_version!(), 26 embassy_rp::binary_info::rp_cargo_version!(),
27 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 27 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
28 embassy_rp::binary_info_rp_program_build_attribute!(), 28 embassy_rp::binary_info::rp_program_build_attribute!(),
29]; 29];
30 30
31const REFRESH_INTERVAL: u64 = 20000; 31const REFRESH_INTERVAL: u64 = 20000;
diff --git a/examples/rp23/src/bin/pio_rotary_encoder.rs b/examples/rp23/src/bin/pio_rotary_encoder.rs
index 287992a83..c147351e8 100644
--- a/examples/rp23/src/bin/pio_rotary_encoder.rs
+++ b/examples/rp23/src/bin/pio_rotary_encoder.rs
@@ -21,10 +21,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
21#[link_section = ".bi_entries"] 21#[link_section = ".bi_entries"]
22#[used] 22#[used]
23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
24 embassy_rp::binary_info_rp_cargo_bin_name!(), 24 embassy_rp::binary_info::rp_program_name!(c"example"),
25 embassy_rp::binary_info_rp_cargo_version!(), 25 embassy_rp::binary_info::rp_cargo_version!(),
26 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 26 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
27 embassy_rp::binary_info_rp_program_build_attribute!(), 27 embassy_rp::binary_info::rp_program_build_attribute!(),
28]; 28];
29 29
30bind_interrupts!(struct Irqs { 30bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/pio_servo.rs b/examples/rp23/src/bin/pio_servo.rs
index 1dec86927..5e8714178 100644
--- a/examples/rp23/src/bin/pio_servo.rs
+++ b/examples/rp23/src/bin/pio_servo.rs
@@ -22,10 +22,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
22#[link_section = ".bi_entries"] 22#[link_section = ".bi_entries"]
23#[used] 23#[used]
24pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 24pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
25 embassy_rp::binary_info_rp_cargo_bin_name!(), 25 embassy_rp::binary_info::rp_program_name!(c"example"),
26 embassy_rp::binary_info_rp_cargo_version!(), 26 embassy_rp::binary_info::rp_cargo_version!(),
27 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 27 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
28 embassy_rp::binary_info_rp_program_build_attribute!(), 28 embassy_rp::binary_info::rp_program_build_attribute!(),
29]; 29];
30 30
31const DEFAULT_MIN_PULSE_WIDTH: u64 = 1000; // uncalibrated default, the shortest duty cycle sent to a servo 31const DEFAULT_MIN_PULSE_WIDTH: u64 = 1000; // uncalibrated default, the shortest duty cycle sent to a servo
diff --git a/examples/rp23/src/bin/pio_stepper.rs b/examples/rp23/src/bin/pio_stepper.rs
index 8b52dc37a..24785443b 100644
--- a/examples/rp23/src/bin/pio_stepper.rs
+++ b/examples/rp23/src/bin/pio_stepper.rs
@@ -25,10 +25,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
25#[link_section = ".bi_entries"] 25#[link_section = ".bi_entries"]
26#[used] 26#[used]
27pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 27pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
28 embassy_rp::binary_info_rp_cargo_bin_name!(), 28 embassy_rp::binary_info::rp_program_name!(c"example"),
29 embassy_rp::binary_info_rp_cargo_version!(), 29 embassy_rp::binary_info::rp_cargo_version!(),
30 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 30 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
31 embassy_rp::binary_info_rp_program_build_attribute!(), 31 embassy_rp::binary_info::rp_program_build_attribute!(),
32]; 32];
33 33
34bind_interrupts!(struct Irqs { 34bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/pio_ws2812.rs b/examples/rp23/src/bin/pio_ws2812.rs
index 99d9cf7e6..00fe5e396 100644
--- a/examples/rp23/src/bin/pio_ws2812.rs
+++ b/examples/rp23/src/bin/pio_ws2812.rs
@@ -27,10 +27,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
27#[link_section = ".bi_entries"] 27#[link_section = ".bi_entries"]
28#[used] 28#[used]
29pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 29pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
30 embassy_rp::binary_info_rp_cargo_bin_name!(), 30 embassy_rp::binary_info::rp_program_name!(c"example"),
31 embassy_rp::binary_info_rp_cargo_version!(), 31 embassy_rp::binary_info::rp_cargo_version!(),
32 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 32 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
33 embassy_rp::binary_info_rp_program_build_attribute!(), 33 embassy_rp::binary_info::rp_program_build_attribute!(),
34]; 34];
35 35
36bind_interrupts!(struct Irqs { 36bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/pwm.rs b/examples/rp23/src/bin/pwm.rs
index 4cd3b3eb4..bfc2c6f67 100644
--- a/examples/rp23/src/bin/pwm.rs
+++ b/examples/rp23/src/bin/pwm.rs
@@ -20,10 +20,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
20#[link_section = ".bi_entries"] 20#[link_section = ".bi_entries"]
21#[used] 21#[used]
22pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 22pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
23 embassy_rp::binary_info_rp_cargo_bin_name!(), 23 embassy_rp::binary_info::rp_program_name!(c"example"),
24 embassy_rp::binary_info_rp_cargo_version!(), 24 embassy_rp::binary_info::rp_cargo_version!(),
25 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 25 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
26 embassy_rp::binary_info_rp_program_build_attribute!(), 26 embassy_rp::binary_info::rp_program_build_attribute!(),
27]; 27];
28 28
29#[embassy_executor::main] 29#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/pwm_input.rs b/examples/rp23/src/bin/pwm_input.rs
index b75d04963..b65f2778b 100644
--- a/examples/rp23/src/bin/pwm_input.rs
+++ b/examples/rp23/src/bin/pwm_input.rs
@@ -19,10 +19,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
19#[link_section = ".bi_entries"] 19#[link_section = ".bi_entries"]
20#[used] 20#[used]
21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
22 embassy_rp::binary_info_rp_cargo_bin_name!(), 22 embassy_rp::binary_info::rp_program_name!(c"example"),
23 embassy_rp::binary_info_rp_cargo_version!(), 23 embassy_rp::binary_info::rp_cargo_version!(),
24 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 24 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
25 embassy_rp::binary_info_rp_program_build_attribute!(), 25 embassy_rp::binary_info::rp_program_build_attribute!(),
26]; 26];
27 27
28#[embassy_executor::main] 28#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/rosc.rs b/examples/rp23/src/bin/rosc.rs
index 28c778f51..f65b236b1 100644
--- a/examples/rp23/src/bin/rosc.rs
+++ b/examples/rp23/src/bin/rosc.rs
@@ -21,10 +21,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
21#[link_section = ".bi_entries"] 21#[link_section = ".bi_entries"]
22#[used] 22#[used]
23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
24 embassy_rp::binary_info_rp_cargo_bin_name!(), 24 embassy_rp::binary_info::rp_program_name!(c"example"),
25 embassy_rp::binary_info_rp_cargo_version!(), 25 embassy_rp::binary_info::rp_cargo_version!(),
26 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 26 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
27 embassy_rp::binary_info_rp_program_build_attribute!(), 27 embassy_rp::binary_info::rp_program_build_attribute!(),
28]; 28];
29 29
30#[embassy_executor::main] 30#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/shared_bus.rs b/examples/rp23/src/bin/shared_bus.rs
index 00e65f80d..b3fde13e3 100644
--- a/examples/rp23/src/bin/shared_bus.rs
+++ b/examples/rp23/src/bin/shared_bus.rs
@@ -27,10 +27,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
27#[link_section = ".bi_entries"] 27#[link_section = ".bi_entries"]
28#[used] 28#[used]
29pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 29pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
30 embassy_rp::binary_info_rp_cargo_bin_name!(), 30 embassy_rp::binary_info::rp_program_name!(c"example"),
31 embassy_rp::binary_info_rp_cargo_version!(), 31 embassy_rp::binary_info::rp_cargo_version!(),
32 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 32 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
33 embassy_rp::binary_info_rp_program_build_attribute!(), 33 embassy_rp::binary_info::rp_program_build_attribute!(),
34]; 34];
35 35
36type Spi1Bus = Mutex<NoopRawMutex, Spi<'static, SPI1, spi::Async>>; 36type Spi1Bus = Mutex<NoopRawMutex, Spi<'static, SPI1, spi::Async>>;
diff --git a/examples/rp23/src/bin/sharing.rs b/examples/rp23/src/bin/sharing.rs
index b5ef08147..4a3301cfd 100644
--- a/examples/rp23/src/bin/sharing.rs
+++ b/examples/rp23/src/bin/sharing.rs
@@ -40,10 +40,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
40#[link_section = ".bi_entries"] 40#[link_section = ".bi_entries"]
41#[used] 41#[used]
42pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 42pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
43 embassy_rp::binary_info_rp_cargo_bin_name!(), 43 embassy_rp::binary_info::rp_program_name!(c"example"),
44 embassy_rp::binary_info_rp_cargo_version!(), 44 embassy_rp::binary_info::rp_cargo_version!(),
45 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 45 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
46 embassy_rp::binary_info_rp_program_build_attribute!(), 46 embassy_rp::binary_info::rp_program_build_attribute!(),
47]; 47];
48 48
49type UartAsyncMutex = mutex::Mutex<CriticalSectionRawMutex, UartTx<'static, UART0, uart::Async>>; 49type UartAsyncMutex = mutex::Mutex<CriticalSectionRawMutex, UartTx<'static, UART0, uart::Async>>;
diff --git a/examples/rp23/src/bin/spi.rs b/examples/rp23/src/bin/spi.rs
index 98aa7622c..924873e60 100644
--- a/examples/rp23/src/bin/spi.rs
+++ b/examples/rp23/src/bin/spi.rs
@@ -21,10 +21,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
21#[link_section = ".bi_entries"] 21#[link_section = ".bi_entries"]
22#[used] 22#[used]
23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 23pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
24 embassy_rp::binary_info_rp_cargo_bin_name!(), 24 embassy_rp::binary_info::rp_program_name!(c"example"),
25 embassy_rp::binary_info_rp_cargo_version!(), 25 embassy_rp::binary_info::rp_cargo_version!(),
26 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 26 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
27 embassy_rp::binary_info_rp_program_build_attribute!(), 27 embassy_rp::binary_info::rp_program_build_attribute!(),
28]; 28];
29 29
30#[embassy_executor::main] 30#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/spi_async.rs b/examples/rp23/src/bin/spi_async.rs
index 71eaa5c05..4a74f991c 100644
--- a/examples/rp23/src/bin/spi_async.rs
+++ b/examples/rp23/src/bin/spi_async.rs
@@ -19,10 +19,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
19#[link_section = ".bi_entries"] 19#[link_section = ".bi_entries"]
20#[used] 20#[used]
21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
22 embassy_rp::binary_info_rp_cargo_bin_name!(), 22 embassy_rp::binary_info::rp_program_name!(c"example"),
23 embassy_rp::binary_info_rp_cargo_version!(), 23 embassy_rp::binary_info::rp_cargo_version!(),
24 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 24 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
25 embassy_rp::binary_info_rp_program_build_attribute!(), 25 embassy_rp::binary_info::rp_program_build_attribute!(),
26]; 26];
27 27
28#[embassy_executor::main] 28#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/spi_display.rs b/examples/rp23/src/bin/spi_display.rs
index 2441b1186..71dd84658 100644
--- a/examples/rp23/src/bin/spi_display.rs
+++ b/examples/rp23/src/bin/spi_display.rs
@@ -36,10 +36,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
36#[link_section = ".bi_entries"] 36#[link_section = ".bi_entries"]
37#[used] 37#[used]
38pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 38pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
39 embassy_rp::binary_info_rp_cargo_bin_name!(), 39 embassy_rp::binary_info::rp_program_name!(c"example"),
40 embassy_rp::binary_info_rp_cargo_version!(), 40 embassy_rp::binary_info::rp_cargo_version!(),
41 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 41 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
42 embassy_rp::binary_info_rp_program_build_attribute!(), 42 embassy_rp::binary_info::rp_program_build_attribute!(),
43]; 43];
44 44
45use crate::my_display_interface::SPIDeviceInterface; 45use crate::my_display_interface::SPIDeviceInterface;
diff --git a/examples/rp23/src/bin/spi_sdmmc.rs b/examples/rp23/src/bin/spi_sdmmc.rs
index d7af77a30..dabf41ab8 100644
--- a/examples/rp23/src/bin/spi_sdmmc.rs
+++ b/examples/rp23/src/bin/spi_sdmmc.rs
@@ -25,10 +25,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
25#[link_section = ".bi_entries"] 25#[link_section = ".bi_entries"]
26#[used] 26#[used]
27pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 27pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
28 embassy_rp::binary_info_rp_cargo_bin_name!(), 28 embassy_rp::binary_info::rp_program_name!(c"example"),
29 embassy_rp::binary_info_rp_cargo_version!(), 29 embassy_rp::binary_info::rp_cargo_version!(),
30 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 30 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
31 embassy_rp::binary_info_rp_program_build_attribute!(), 31 embassy_rp::binary_info::rp_program_build_attribute!(),
32]; 32];
33 33
34struct DummyTimesource(); 34struct DummyTimesource();
diff --git a/examples/rp23/src/bin/uart.rs b/examples/rp23/src/bin/uart.rs
index ae00f36dc..0ffe0b293 100644
--- a/examples/rp23/src/bin/uart.rs
+++ b/examples/rp23/src/bin/uart.rs
@@ -20,10 +20,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
20#[link_section = ".bi_entries"] 20#[link_section = ".bi_entries"]
21#[used] 21#[used]
22pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 22pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
23 embassy_rp::binary_info_rp_cargo_bin_name!(), 23 embassy_rp::binary_info::rp_program_name!(c"example"),
24 embassy_rp::binary_info_rp_cargo_version!(), 24 embassy_rp::binary_info::rp_cargo_version!(),
25 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 25 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
26 embassy_rp::binary_info_rp_program_build_attribute!(), 26 embassy_rp::binary_info::rp_program_build_attribute!(),
27]; 27];
28 28
29#[embassy_executor::main] 29#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/uart_buffered_split.rs b/examples/rp23/src/bin/uart_buffered_split.rs
index 2b14520d5..4e69a20c4 100644
--- a/examples/rp23/src/bin/uart_buffered_split.rs
+++ b/examples/rp23/src/bin/uart_buffered_split.rs
@@ -26,10 +26,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
26#[link_section = ".bi_entries"] 26#[link_section = ".bi_entries"]
27#[used] 27#[used]
28pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 28pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
29 embassy_rp::binary_info_rp_cargo_bin_name!(), 29 embassy_rp::binary_info::rp_program_name!(c"example"),
30 embassy_rp::binary_info_rp_cargo_version!(), 30 embassy_rp::binary_info::rp_cargo_version!(),
31 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 31 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
32 embassy_rp::binary_info_rp_program_build_attribute!(), 32 embassy_rp::binary_info::rp_program_build_attribute!(),
33]; 33];
34 34
35bind_interrupts!(struct Irqs { 35bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/uart_r503.rs b/examples/rp23/src/bin/uart_r503.rs
index 39a17d305..5ac8839e3 100644
--- a/examples/rp23/src/bin/uart_r503.rs
+++ b/examples/rp23/src/bin/uart_r503.rs
@@ -19,10 +19,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
19#[link_section = ".bi_entries"] 19#[link_section = ".bi_entries"]
20#[used] 20#[used]
21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 21pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
22 embassy_rp::binary_info_rp_cargo_bin_name!(), 22 embassy_rp::binary_info::rp_program_name!(c"example"),
23 embassy_rp::binary_info_rp_cargo_version!(), 23 embassy_rp::binary_info::rp_cargo_version!(),
24 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 24 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
25 embassy_rp::binary_info_rp_program_build_attribute!(), 25 embassy_rp::binary_info::rp_program_build_attribute!(),
26]; 26];
27 27
28bind_interrupts!(pub struct Irqs { 28bind_interrupts!(pub struct Irqs {
diff --git a/examples/rp23/src/bin/uart_unidir.rs b/examples/rp23/src/bin/uart_unidir.rs
index 38210a8d0..988e44a79 100644
--- a/examples/rp23/src/bin/uart_unidir.rs
+++ b/examples/rp23/src/bin/uart_unidir.rs
@@ -25,10 +25,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
25#[link_section = ".bi_entries"] 25#[link_section = ".bi_entries"]
26#[used] 26#[used]
27pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 27pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
28 embassy_rp::binary_info_rp_cargo_bin_name!(), 28 embassy_rp::binary_info::rp_program_name!(c"example"),
29 embassy_rp::binary_info_rp_cargo_version!(), 29 embassy_rp::binary_info::rp_cargo_version!(),
30 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 30 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
31 embassy_rp::binary_info_rp_program_build_attribute!(), 31 embassy_rp::binary_info::rp_program_build_attribute!(),
32]; 32];
33 33
34bind_interrupts!(struct Irqs { 34bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/usb_webusb.rs b/examples/rp23/src/bin/usb_webusb.rs
index f4ecde30e..3ade2226b 100644
--- a/examples/rp23/src/bin/usb_webusb.rs
+++ b/examples/rp23/src/bin/usb_webusb.rs
@@ -38,10 +38,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
38#[link_section = ".bi_entries"] 38#[link_section = ".bi_entries"]
39#[used] 39#[used]
40pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 40pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
41 embassy_rp::binary_info_rp_cargo_bin_name!(), 41 embassy_rp::binary_info::rp_program_name!(c"example"),
42 embassy_rp::binary_info_rp_cargo_version!(), 42 embassy_rp::binary_info::rp_cargo_version!(),
43 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 43 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
44 embassy_rp::binary_info_rp_program_build_attribute!(), 44 embassy_rp::binary_info::rp_program_build_attribute!(),
45]; 45];
46 46
47bind_interrupts!(struct Irqs { 47bind_interrupts!(struct Irqs {
diff --git a/examples/rp23/src/bin/watchdog.rs b/examples/rp23/src/bin/watchdog.rs
index 3ac457219..a901c1164 100644
--- a/examples/rp23/src/bin/watchdog.rs
+++ b/examples/rp23/src/bin/watchdog.rs
@@ -22,10 +22,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
22#[link_section = ".bi_entries"] 22#[link_section = ".bi_entries"]
23#[used] 23#[used]
24pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 24pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
25 embassy_rp::binary_info_rp_cargo_bin_name!(), 25 embassy_rp::binary_info::rp_program_name!(c"example"),
26 embassy_rp::binary_info_rp_cargo_version!(), 26 embassy_rp::binary_info::rp_cargo_version!(),
27 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 27 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
28 embassy_rp::binary_info_rp_program_build_attribute!(), 28 embassy_rp::binary_info::rp_program_build_attribute!(),
29]; 29];
30 30
31#[embassy_executor::main] 31#[embassy_executor::main]
diff --git a/examples/rp23/src/bin/zerocopy.rs b/examples/rp23/src/bin/zerocopy.rs
index d04e1bf2a..86fca6f12 100644
--- a/examples/rp23/src/bin/zerocopy.rs
+++ b/examples/rp23/src/bin/zerocopy.rs
@@ -27,10 +27,10 @@ pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe();
27#[link_section = ".bi_entries"] 27#[link_section = ".bi_entries"]
28#[used] 28#[used]
29pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ 29pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
30 embassy_rp::binary_info_rp_cargo_bin_name!(), 30 embassy_rp::binary_info::rp_program_name!(c"example"),
31 embassy_rp::binary_info_rp_cargo_version!(), 31 embassy_rp::binary_info::rp_cargo_version!(),
32 embassy_rp::binary_info_rp_program_description!(c"Blinky"), 32 embassy_rp::binary_info::rp_program_description!(c"Blinky"),
33 embassy_rp::binary_info_rp_program_build_attribute!(), 33 embassy_rp::binary_info::rp_program_build_attribute!(),
34]; 34];
35 35
36type SampleBuffer = [u16; 512]; 36type SampleBuffer = [u16; 512];