diff options
29 files changed, 64 insertions, 64 deletions
diff --git a/docs/pages/faq.adoc b/docs/pages/faq.adoc index a535e89f8..b21be9a30 100644 --- a/docs/pages/faq.adoc +++ b/docs/pages/faq.adoc | |||
| @@ -268,7 +268,7 @@ General steps: | |||
| 268 | 1. Find out which memory region BDMA has access to. You can get this information from the bus matrix and the memory mapping table in the STM32 datasheet. | 268 | 1. Find out which memory region BDMA has access to. You can get this information from the bus matrix and the memory mapping table in the STM32 datasheet. |
| 269 | 2. Add the memory region to `memory.x`, you can modify the generated one from https://github.com/embassy-rs/stm32-data-generated/tree/main/data/chips. | 269 | 2. Add the memory region to `memory.x`, you can modify the generated one from https://github.com/embassy-rs/stm32-data-generated/tree/main/data/chips. |
| 270 | 3. You might need to modify `build.rs` to make cargo pick up the modified `memory.x`. | 270 | 3. You might need to modify `build.rs` to make cargo pick up the modified `memory.x`. |
| 271 | 4. In your code, access the defined memory region using `#[link_section = ".xxx"]` | 271 | 4. In your code, access the defined memory region using `#[unsafe(link_section = ".xxx")]` |
| 272 | 5. Copy data to that region before using BDMA. | 272 | 5. Copy data to that region before using BDMA. |
| 273 | 273 | ||
| 274 | See link:https://github.com/embassy-rs/embassy/blob/main/examples/stm32h7/src/bin/spi_bdma.rs[SMT32H7 SPI BDMA example] for more details. | 274 | See link:https://github.com/embassy-rs/embassy/blob/main/examples/stm32h7/src/bin/spi_bdma.rs[SMT32H7 SPI BDMA example] for more details. |
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index b440591cf..a073c8b9e 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -86,7 +86,7 @@ boot2-w25x10cl = [] | |||
| 86 | ## Have embassy-rp not provide the boot2 so you can use your own. | 86 | ## Have embassy-rp not provide the boot2 so you can use your own. |
| 87 | ## Place your own in the ".boot2" section like: | 87 | ## Place your own in the ".boot2" section like: |
| 88 | ## ``` | 88 | ## ``` |
| 89 | ## #[link_section = ".boot2"] | 89 | ## #[unsafe(link_section = ".boot2")] |
| 90 | ## #[used] | 90 | ## #[used] |
| 91 | ## static BOOT2: [u8; 256] = [0; 256]; // Provide your own with e.g. include_bytes! | 91 | ## static BOOT2: [u8; 256] = [0; 256]; // Provide your own with e.g. include_bytes! |
| 92 | ## ``` | 92 | ## ``` |
| @@ -109,7 +109,7 @@ imagedef-nonsecure-exe = [] | |||
| 109 | ## ```ignore | 109 | ## ```ignore |
| 110 | ## use embassy_rp::block::ImageDef; | 110 | ## use embassy_rp::block::ImageDef; |
| 111 | ## | 111 | ## |
| 112 | ## #[link_section = ".start_block"] | 112 | ## #[unsafe(link_section = ".start_block")] |
| 113 | ## #[used] | 113 | ## #[used] |
| 114 | ## static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); // Update this with your own implementation. | 114 | ## static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); // Update this with your own implementation. |
| 115 | ## ``` | 115 | ## ``` |
diff --git a/embassy-rp/src/bootsel.rs b/embassy-rp/src/bootsel.rs index 14f9e46aa..5f0bac248 100644 --- a/embassy-rp/src/bootsel.rs +++ b/embassy-rp/src/bootsel.rs | |||
| @@ -36,7 +36,7 @@ mod ram_helpers { | |||
| 36 | /// This function must live in ram. It uses inline asm to avoid any | 36 | /// This function must live in ram. It uses inline asm to avoid any |
| 37 | /// potential calls to ABI functions that might be in flash. | 37 | /// potential calls to ABI functions that might be in flash. |
| 38 | #[inline(never)] | 38 | #[inline(never)] |
| 39 | #[link_section = ".data.ram_func"] | 39 | #[unsafe(link_section = ".data.ram_func")] |
| 40 | #[cfg(target_arch = "arm")] | 40 | #[cfg(target_arch = "arm")] |
| 41 | pub unsafe fn read_cs_status() -> GpioStatus { | 41 | pub unsafe fn read_cs_status() -> GpioStatus { |
| 42 | let result: u32; | 42 | let result: u32; |
diff --git a/embassy-rp/src/flash.rs b/embassy-rp/src/flash.rs index ef1cd9212..1ac15a677 100644 --- a/embassy-rp/src/flash.rs +++ b/embassy-rp/src/flash.rs | |||
| @@ -623,7 +623,7 @@ mod ram_helpers { | |||
| 623 | /// Length of data must be a multiple of 4096 | 623 | /// Length of data must be a multiple of 4096 |
| 624 | /// addr must be aligned to 4096 | 624 | /// addr must be aligned to 4096 |
| 625 | #[inline(never)] | 625 | #[inline(never)] |
| 626 | #[link_section = ".data.ram_func"] | 626 | #[unsafe(link_section = ".data.ram_func")] |
| 627 | #[cfg(feature = "rp2040")] | 627 | #[cfg(feature = "rp2040")] |
| 628 | unsafe fn write_flash_inner(addr: u32, len: u32, data: Option<&[u8]>, ptrs: *const FlashFunctionPointers) { | 628 | unsafe fn write_flash_inner(addr: u32, len: u32, data: Option<&[u8]>, ptrs: *const FlashFunctionPointers) { |
| 629 | #[cfg(target_arch = "arm")] | 629 | #[cfg(target_arch = "arm")] |
| @@ -688,7 +688,7 @@ mod ram_helpers { | |||
| 688 | /// Length of data must be a multiple of 4096 | 688 | /// Length of data must be a multiple of 4096 |
| 689 | /// addr must be aligned to 4096 | 689 | /// addr must be aligned to 4096 |
| 690 | #[inline(never)] | 690 | #[inline(never)] |
| 691 | #[link_section = ".data.ram_func"] | 691 | #[unsafe(link_section = ".data.ram_func")] |
| 692 | #[cfg(feature = "_rp235x")] | 692 | #[cfg(feature = "_rp235x")] |
| 693 | unsafe fn write_flash_inner(addr: u32, len: u32, data: Option<&[u8]>, ptrs: *const FlashFunctionPointers) { | 693 | unsafe fn write_flash_inner(addr: u32, len: u32, data: Option<&[u8]>, ptrs: *const FlashFunctionPointers) { |
| 694 | let data = data.map(|d| d.as_ptr()).unwrap_or(core::ptr::null()); | 694 | let data = data.map(|d| d.as_ptr()).unwrap_or(core::ptr::null()); |
| @@ -807,7 +807,7 @@ mod ram_helpers { | |||
| 807 | /// | 807 | /// |
| 808 | /// Credit: taken from `rp2040-flash` (also licensed Apache+MIT) | 808 | /// Credit: taken from `rp2040-flash` (also licensed Apache+MIT) |
| 809 | #[inline(never)] | 809 | #[inline(never)] |
| 810 | #[link_section = ".data.ram_func"] | 810 | #[unsafe(link_section = ".data.ram_func")] |
| 811 | #[cfg(feature = "rp2040")] | 811 | #[cfg(feature = "rp2040")] |
| 812 | unsafe fn read_flash_inner(cmd: FlashCommand, ptrs: *const FlashFunctionPointers) { | 812 | unsafe fn read_flash_inner(cmd: FlashCommand, ptrs: *const FlashFunctionPointers) { |
| 813 | #[cfg(target_arch = "arm")] | 813 | #[cfg(target_arch = "arm")] |
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index f549446bc..9b7c2b6ea 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs | |||
| @@ -434,13 +434,13 @@ macro_rules! select_bootloader { | |||
| 434 | ( $( $feature:literal => $loader:ident, )+ default => $default:ident ) => { | 434 | ( $( $feature:literal => $loader:ident, )+ default => $default:ident ) => { |
| 435 | $( | 435 | $( |
| 436 | #[cfg(feature = $feature)] | 436 | #[cfg(feature = $feature)] |
| 437 | #[link_section = ".boot2"] | 437 | #[unsafe(link_section = ".boot2")] |
| 438 | #[used] | 438 | #[used] |
| 439 | static BOOT2: [u8; 256] = rp2040_boot2::$loader; | 439 | static BOOT2: [u8; 256] = rp2040_boot2::$loader; |
| 440 | )* | 440 | )* |
| 441 | 441 | ||
| 442 | #[cfg(not(any( $( feature = $feature),* )))] | 442 | #[cfg(not(any( $( feature = $feature),* )))] |
| 443 | #[link_section = ".boot2"] | 443 | #[unsafe(link_section = ".boot2")] |
| 444 | #[used] | 444 | #[used] |
| 445 | static BOOT2: [u8; 256] = rp2040_boot2::$default; | 445 | static BOOT2: [u8; 256] = rp2040_boot2::$default; |
| 446 | } | 446 | } |
| @@ -463,13 +463,13 @@ macro_rules! select_imagedef { | |||
| 463 | ( $( $feature:literal => $imagedef:ident, )+ default => $default:ident ) => { | 463 | ( $( $feature:literal => $imagedef:ident, )+ default => $default:ident ) => { |
| 464 | $( | 464 | $( |
| 465 | #[cfg(feature = $feature)] | 465 | #[cfg(feature = $feature)] |
| 466 | #[link_section = ".start_block"] | 466 | #[unsafe(link_section = ".start_block")] |
| 467 | #[used] | 467 | #[used] |
| 468 | static IMAGE_DEF: crate::block::ImageDef = crate::block::ImageDef::$imagedef(); | 468 | static IMAGE_DEF: crate::block::ImageDef = crate::block::ImageDef::$imagedef(); |
| 469 | )* | 469 | )* |
| 470 | 470 | ||
| 471 | #[cfg(not(any( $( feature = $feature),* )))] | 471 | #[cfg(not(any( $( feature = $feature),* )))] |
| 472 | #[link_section = ".start_block"] | 472 | #[unsafe(link_section = ".start_block")] |
| 473 | #[used] | 473 | #[used] |
| 474 | static IMAGE_DEF: crate::block::ImageDef = crate::block::ImageDef::$default(); | 474 | static IMAGE_DEF: crate::block::ImageDef = crate::block::ImageDef::$default(); |
| 475 | } | 475 | } |
diff --git a/embassy-rp/src/multicore.rs b/embassy-rp/src/multicore.rs index d10b6837c..ec05bfdf5 100644 --- a/embassy-rp/src/multicore.rs +++ b/embassy-rp/src/multicore.rs | |||
| @@ -90,7 +90,7 @@ impl<const SIZE: usize> Stack<SIZE> { | |||
| 90 | 90 | ||
| 91 | #[cfg(all(feature = "rt", feature = "rp2040"))] | 91 | #[cfg(all(feature = "rt", feature = "rp2040"))] |
| 92 | #[interrupt] | 92 | #[interrupt] |
| 93 | #[link_section = ".data.ram_func"] | 93 | #[unsafe(link_section = ".data.ram_func")] |
| 94 | unsafe fn SIO_IRQ_PROC1() { | 94 | unsafe fn SIO_IRQ_PROC1() { |
| 95 | let sio = pac::SIO; | 95 | let sio = pac::SIO; |
| 96 | // Clear IRQ | 96 | // Clear IRQ |
| @@ -115,7 +115,7 @@ unsafe fn SIO_IRQ_PROC1() { | |||
| 115 | 115 | ||
| 116 | #[cfg(all(feature = "rt", feature = "_rp235x"))] | 116 | #[cfg(all(feature = "rt", feature = "_rp235x"))] |
| 117 | #[interrupt] | 117 | #[interrupt] |
| 118 | #[link_section = ".data.ram_func"] | 118 | #[unsafe(link_section = ".data.ram_func")] |
| 119 | unsafe fn SIO_IRQ_FIFO() { | 119 | unsafe fn SIO_IRQ_FIFO() { |
| 120 | let sio = pac::SIO; | 120 | let sio = pac::SIO; |
| 121 | // Clear IRQ | 121 | // Clear IRQ |
diff --git a/embassy-stm32-wpan/src/tables.rs b/embassy-stm32-wpan/src/tables.rs index fe6fc47a3..204790e6d 100644 --- a/embassy-stm32-wpan/src/tables.rs +++ b/embassy-stm32-wpan/src/tables.rs | |||
| @@ -190,94 +190,94 @@ pub struct RefTable { | |||
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | // --------------------- ref table --------------------- | 192 | // --------------------- ref table --------------------- |
| 193 | #[link_section = "TL_REF_TABLE"] | 193 | #[unsafe(link_section = "TL_REF_TABLE")] |
| 194 | pub static mut TL_REF_TABLE: MaybeUninit<RefTable> = MaybeUninit::uninit(); | 194 | pub static mut TL_REF_TABLE: MaybeUninit<RefTable> = MaybeUninit::uninit(); |
| 195 | 195 | ||
| 196 | #[link_section = "MB_MEM1"] | 196 | #[unsafe(link_section = "MB_MEM1")] |
| 197 | pub static mut TL_DEVICE_INFO_TABLE: Aligned<A4, MaybeUninit<DeviceInfoTable>> = Aligned(MaybeUninit::uninit()); | 197 | pub static mut TL_DEVICE_INFO_TABLE: Aligned<A4, MaybeUninit<DeviceInfoTable>> = Aligned(MaybeUninit::uninit()); |
| 198 | 198 | ||
| 199 | #[link_section = "MB_MEM1"] | 199 | #[unsafe(link_section = "MB_MEM1")] |
| 200 | pub static mut TL_BLE_TABLE: Aligned<A4, MaybeUninit<BleTable>> = Aligned(MaybeUninit::uninit()); | 200 | pub static mut TL_BLE_TABLE: Aligned<A4, MaybeUninit<BleTable>> = Aligned(MaybeUninit::uninit()); |
| 201 | 201 | ||
| 202 | #[link_section = "MB_MEM1"] | 202 | #[unsafe(link_section = "MB_MEM1")] |
| 203 | pub static mut TL_THREAD_TABLE: Aligned<A4, MaybeUninit<ThreadTable>> = Aligned(MaybeUninit::uninit()); | 203 | pub static mut TL_THREAD_TABLE: Aligned<A4, MaybeUninit<ThreadTable>> = Aligned(MaybeUninit::uninit()); |
| 204 | 204 | ||
| 205 | #[link_section = "MB_MEM1"] | 205 | #[unsafe(link_section = "MB_MEM1")] |
| 206 | pub static mut TL_LLD_TESTS_TABLE: Aligned<A4, MaybeUninit<LldTestsTable>> = Aligned(MaybeUninit::uninit()); | 206 | pub static mut TL_LLD_TESTS_TABLE: Aligned<A4, MaybeUninit<LldTestsTable>> = Aligned(MaybeUninit::uninit()); |
| 207 | 207 | ||
| 208 | #[link_section = "MB_MEM1"] | 208 | #[unsafe(link_section = "MB_MEM1")] |
| 209 | pub static mut TL_BLE_LLD_TABLE: Aligned<A4, MaybeUninit<BleLldTable>> = Aligned(MaybeUninit::uninit()); | 209 | pub static mut TL_BLE_LLD_TABLE: Aligned<A4, MaybeUninit<BleLldTable>> = Aligned(MaybeUninit::uninit()); |
| 210 | 210 | ||
| 211 | #[link_section = "MB_MEM1"] | 211 | #[unsafe(link_section = "MB_MEM1")] |
| 212 | pub static mut TL_SYS_TABLE: Aligned<A4, MaybeUninit<SysTable>> = Aligned(MaybeUninit::uninit()); | 212 | pub static mut TL_SYS_TABLE: Aligned<A4, MaybeUninit<SysTable>> = Aligned(MaybeUninit::uninit()); |
| 213 | 213 | ||
| 214 | #[link_section = "MB_MEM1"] | 214 | #[unsafe(link_section = "MB_MEM1")] |
| 215 | pub static mut TL_MEM_MANAGER_TABLE: Aligned<A4, MaybeUninit<MemManagerTable>> = Aligned(MaybeUninit::uninit()); | 215 | pub static mut TL_MEM_MANAGER_TABLE: Aligned<A4, MaybeUninit<MemManagerTable>> = Aligned(MaybeUninit::uninit()); |
| 216 | 216 | ||
| 217 | #[link_section = "MB_MEM1"] | 217 | #[unsafe(link_section = "MB_MEM1")] |
| 218 | pub static mut TL_TRACES_TABLE: Aligned<A4, MaybeUninit<TracesTable>> = Aligned(MaybeUninit::uninit()); | 218 | pub static mut TL_TRACES_TABLE: Aligned<A4, MaybeUninit<TracesTable>> = Aligned(MaybeUninit::uninit()); |
| 219 | 219 | ||
| 220 | #[link_section = "MB_MEM1"] | 220 | #[unsafe(link_section = "MB_MEM1")] |
| 221 | pub static mut TL_MAC_802_15_4_TABLE: Aligned<A4, MaybeUninit<Mac802_15_4Table>> = Aligned(MaybeUninit::uninit()); | 221 | pub static mut TL_MAC_802_15_4_TABLE: Aligned<A4, MaybeUninit<Mac802_15_4Table>> = Aligned(MaybeUninit::uninit()); |
| 222 | 222 | ||
| 223 | #[link_section = "MB_MEM1"] | 223 | #[unsafe(link_section = "MB_MEM1")] |
| 224 | pub static mut TL_ZIGBEE_TABLE: Aligned<A4, MaybeUninit<ZigbeeTable>> = Aligned(MaybeUninit::uninit()); | 224 | pub static mut TL_ZIGBEE_TABLE: Aligned<A4, MaybeUninit<ZigbeeTable>> = Aligned(MaybeUninit::uninit()); |
| 225 | 225 | ||
| 226 | // --------------------- tables --------------------- | 226 | // --------------------- tables --------------------- |
| 227 | #[link_section = "MB_MEM1"] | 227 | #[unsafe(link_section = "MB_MEM1")] |
| 228 | pub static mut FREE_BUF_QUEUE: Aligned<A4, MaybeUninit<LinkedListNode>> = Aligned(MaybeUninit::uninit()); | 228 | pub static mut FREE_BUF_QUEUE: Aligned<A4, MaybeUninit<LinkedListNode>> = Aligned(MaybeUninit::uninit()); |
| 229 | 229 | ||
| 230 | #[allow(dead_code)] | 230 | #[allow(dead_code)] |
| 231 | #[link_section = "MB_MEM1"] | 231 | #[unsafe(link_section = "MB_MEM1")] |
| 232 | pub static mut TRACES_EVT_QUEUE: Aligned<A4, MaybeUninit<LinkedListNode>> = Aligned(MaybeUninit::uninit()); | 232 | pub static mut TRACES_EVT_QUEUE: Aligned<A4, MaybeUninit<LinkedListNode>> = Aligned(MaybeUninit::uninit()); |
| 233 | 233 | ||
| 234 | #[link_section = "MB_MEM2"] | 234 | #[unsafe(link_section = "MB_MEM2")] |
| 235 | pub static mut CS_BUFFER: Aligned<A4, MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + TL_CS_EVT_SIZE]>> = | 235 | pub static mut CS_BUFFER: Aligned<A4, MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + TL_CS_EVT_SIZE]>> = |
| 236 | Aligned(MaybeUninit::uninit()); | 236 | Aligned(MaybeUninit::uninit()); |
| 237 | 237 | ||
| 238 | #[link_section = "MB_MEM2"] | 238 | #[unsafe(link_section = "MB_MEM2")] |
| 239 | pub static mut EVT_QUEUE: Aligned<A4, MaybeUninit<LinkedListNode>> = Aligned(MaybeUninit::uninit()); | 239 | pub static mut EVT_QUEUE: Aligned<A4, MaybeUninit<LinkedListNode>> = Aligned(MaybeUninit::uninit()); |
| 240 | 240 | ||
| 241 | #[link_section = "MB_MEM2"] | 241 | #[unsafe(link_section = "MB_MEM2")] |
| 242 | pub static mut SYSTEM_EVT_QUEUE: Aligned<A4, MaybeUninit<LinkedListNode>> = Aligned(MaybeUninit::uninit()); | 242 | pub static mut SYSTEM_EVT_QUEUE: Aligned<A4, MaybeUninit<LinkedListNode>> = Aligned(MaybeUninit::uninit()); |
| 243 | 243 | ||
| 244 | // --------------------- app tables --------------------- | 244 | // --------------------- app tables --------------------- |
| 245 | #[cfg(feature = "mac")] | 245 | #[cfg(feature = "mac")] |
| 246 | #[link_section = "MB_MEM2"] | 246 | #[unsafe(link_section = "MB_MEM2")] |
| 247 | pub static mut MAC_802_15_4_CMD_BUFFER: Aligned<A4, MaybeUninit<CmdPacket>> = Aligned(MaybeUninit::uninit()); | 247 | pub static mut MAC_802_15_4_CMD_BUFFER: Aligned<A4, MaybeUninit<CmdPacket>> = Aligned(MaybeUninit::uninit()); |
| 248 | 248 | ||
| 249 | #[cfg(feature = "mac")] | 249 | #[cfg(feature = "mac")] |
| 250 | #[link_section = "MB_MEM2"] | 250 | #[unsafe(link_section = "MB_MEM2")] |
| 251 | pub static mut MAC_802_15_4_NOTIF_RSP_EVT_BUFFER: MaybeUninit< | 251 | pub static mut MAC_802_15_4_NOTIF_RSP_EVT_BUFFER: MaybeUninit< |
| 252 | Aligned<A4, [u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + 255]>, | 252 | Aligned<A4, [u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + 255]>, |
| 253 | > = MaybeUninit::uninit(); | 253 | > = MaybeUninit::uninit(); |
| 254 | 254 | ||
| 255 | #[link_section = "MB_MEM2"] | 255 | #[unsafe(link_section = "MB_MEM2")] |
| 256 | pub static mut EVT_POOL: Aligned<A4, MaybeUninit<[u8; POOL_SIZE]>> = Aligned(MaybeUninit::uninit()); | 256 | pub static mut EVT_POOL: Aligned<A4, MaybeUninit<[u8; POOL_SIZE]>> = Aligned(MaybeUninit::uninit()); |
| 257 | 257 | ||
| 258 | #[link_section = "MB_MEM2"] | 258 | #[unsafe(link_section = "MB_MEM2")] |
| 259 | pub static mut SYS_CMD_BUF: Aligned<A4, MaybeUninit<CmdPacket>> = Aligned(MaybeUninit::uninit()); | 259 | pub static mut SYS_CMD_BUF: Aligned<A4, MaybeUninit<CmdPacket>> = Aligned(MaybeUninit::uninit()); |
| 260 | 260 | ||
| 261 | #[link_section = "MB_MEM2"] | 261 | #[unsafe(link_section = "MB_MEM2")] |
| 262 | pub static mut SYS_SPARE_EVT_BUF: Aligned<A4, MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + 255]>> = | 262 | pub static mut SYS_SPARE_EVT_BUF: Aligned<A4, MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + 255]>> = |
| 263 | Aligned(MaybeUninit::uninit()); | 263 | Aligned(MaybeUninit::uninit()); |
| 264 | 264 | ||
| 265 | #[cfg(feature = "mac")] | 265 | #[cfg(feature = "mac")] |
| 266 | #[link_section = "MB_MEM2"] | 266 | #[unsafe(link_section = "MB_MEM2")] |
| 267 | pub static mut MAC_802_15_4_CNFINDNOT: Aligned<A4, MaybeUninit<[u8; C_SIZE_CMD_STRING]>> = | 267 | pub static mut MAC_802_15_4_CNFINDNOT: Aligned<A4, MaybeUninit<[u8; C_SIZE_CMD_STRING]>> = |
| 268 | Aligned(MaybeUninit::uninit()); | 268 | Aligned(MaybeUninit::uninit()); |
| 269 | 269 | ||
| 270 | #[cfg(feature = "ble")] | 270 | #[cfg(feature = "ble")] |
| 271 | #[link_section = "MB_MEM1"] | 271 | #[unsafe(link_section = "MB_MEM1")] |
| 272 | pub static mut BLE_CMD_BUFFER: Aligned<A4, MaybeUninit<CmdPacket>> = Aligned(MaybeUninit::uninit()); | 272 | pub static mut BLE_CMD_BUFFER: Aligned<A4, MaybeUninit<CmdPacket>> = Aligned(MaybeUninit::uninit()); |
| 273 | 273 | ||
| 274 | #[cfg(feature = "ble")] | 274 | #[cfg(feature = "ble")] |
| 275 | #[link_section = "MB_MEM2"] | 275 | #[unsafe(link_section = "MB_MEM2")] |
| 276 | pub static mut BLE_SPARE_EVT_BUF: Aligned<A4, MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + 255]>> = | 276 | pub static mut BLE_SPARE_EVT_BUF: Aligned<A4, MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + 255]>> = |
| 277 | Aligned(MaybeUninit::uninit()); | 277 | Aligned(MaybeUninit::uninit()); |
| 278 | 278 | ||
| 279 | #[cfg(feature = "ble")] | 279 | #[cfg(feature = "ble")] |
| 280 | #[link_section = "MB_MEM2"] | 280 | #[unsafe(link_section = "MB_MEM2")] |
| 281 | // fuck these "magic" numbers from ST ---v---v | 281 | // fuck these "magic" numbers from ST ---v---v |
| 282 | pub static mut HCI_ACL_DATA_BUFFER: Aligned<A4, MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + 5 + 251]>> = | 282 | pub static mut HCI_ACL_DATA_BUFFER: Aligned<A4, MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + 5 + 251]>> = |
| 283 | Aligned(MaybeUninit::uninit()); | 283 | Aligned(MaybeUninit::uninit()); |
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index 226293a9d..8ba604830 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs | |||
| @@ -331,7 +331,7 @@ mod dual_core { | |||
| 331 | /// use core::mem::MaybeUninit; | 331 | /// use core::mem::MaybeUninit; |
| 332 | /// use embassy_stm32::{init_secondary, SharedData}; | 332 | /// use embassy_stm32::{init_secondary, SharedData}; |
| 333 | /// | 333 | /// |
| 334 | /// #[link_section = ".ram_d3"] | 334 | /// #[unsafe(link_section = ".ram_d3")] |
| 335 | /// static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 335 | /// static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 336 | /// | 336 | /// |
| 337 | /// init_secondary(&SHARED_DATA); | 337 | /// init_secondary(&SHARED_DATA); |
diff --git a/examples/boot/application/stm32wl/src/bin/a.rs b/examples/boot/application/stm32wl/src/bin/a.rs index 127de0237..e4526927f 100644 --- a/examples/boot/application/stm32wl/src/bin/a.rs +++ b/examples/boot/application/stm32wl/src/bin/a.rs | |||
| @@ -20,7 +20,7 @@ static APP_B: &[u8] = &[0, 1, 2, 3]; | |||
| 20 | #[cfg(not(feature = "skip-include"))] | 20 | #[cfg(not(feature = "skip-include"))] |
| 21 | static APP_B: &[u8] = include_bytes!("../../b.bin"); | 21 | static APP_B: &[u8] = include_bytes!("../../b.bin"); |
| 22 | 22 | ||
| 23 | #[link_section = ".shared_data"] | 23 | #[unsafe(link_section = ".shared_data")] |
| 24 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 24 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 25 | 25 | ||
| 26 | #[embassy_executor::main] | 26 | #[embassy_executor::main] |
diff --git a/examples/boot/application/stm32wl/src/bin/b.rs b/examples/boot/application/stm32wl/src/bin/b.rs index 768dadf8b..6016a9555 100644 --- a/examples/boot/application/stm32wl/src/bin/b.rs +++ b/examples/boot/application/stm32wl/src/bin/b.rs | |||
| @@ -11,7 +11,7 @@ use embassy_stm32::SharedData; | |||
| 11 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
| 12 | use panic_reset as _; | 12 | use panic_reset as _; |
| 13 | 13 | ||
| 14 | #[link_section = ".shared_data"] | 14 | #[unsafe(link_section = ".shared_data")] |
| 15 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 15 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 16 | 16 | ||
| 17 | #[embassy_executor::main] | 17 | #[embassy_executor::main] |
diff --git a/examples/mimxrt6/build.rs b/examples/mimxrt6/build.rs index 9c0ed3213..56010dfd6 100644 --- a/examples/mimxrt6/build.rs +++ b/examples/mimxrt6/build.rs | |||
| @@ -25,7 +25,7 @@ fn main() { | |||
| 25 | .write_all( | 25 | .write_all( |
| 26 | format!( | 26 | format!( |
| 27 | r##" | 27 | r##" |
| 28 | #[link_section = ".biv"] | 28 | #[unsafe(link_section = ".biv")] |
| 29 | #[used] | 29 | #[used] |
| 30 | static BOOT_IMAGE_VERSION: u32 = 0x{:02x}{:02x}{:02x}00; | 30 | static BOOT_IMAGE_VERSION: u32 = 0x{:02x}{:02x}{:02x}00; |
| 31 | "##, | 31 | "##, |
diff --git a/examples/mimxrt6/src/lib.rs b/examples/mimxrt6/src/lib.rs index da6e14427..3c3ea1981 100644 --- a/examples/mimxrt6/src/lib.rs +++ b/examples/mimxrt6/src/lib.rs | |||
| @@ -6,15 +6,15 @@ use {defmt_rtt as _, panic_probe as _}; | |||
| 6 | // auto-generated version information from Cargo.toml | 6 | // auto-generated version information from Cargo.toml |
| 7 | include!(concat!(env!("OUT_DIR"), "/biv.rs")); | 7 | include!(concat!(env!("OUT_DIR"), "/biv.rs")); |
| 8 | 8 | ||
| 9 | #[link_section = ".otfad"] | 9 | #[unsafe(link_section = ".otfad")] |
| 10 | #[used] | 10 | #[used] |
| 11 | static OTFAD: [u8; 256] = [0; 256]; | 11 | static OTFAD: [u8; 256] = [0; 256]; |
| 12 | 12 | ||
| 13 | #[rustfmt::skip] | 13 | #[rustfmt::skip] |
| 14 | #[link_section = ".fcb"] | 14 | #[unsafe(link_section = ".fcb")] |
| 15 | #[used] | 15 | #[used] |
| 16 | static FCB: FlexSPIFlashConfigurationBlock = FlexSPIFlashConfigurationBlock::build(); | 16 | static FCB: FlexSPIFlashConfigurationBlock = FlexSPIFlashConfigurationBlock::build(); |
| 17 | 17 | ||
| 18 | #[link_section = ".keystore"] | 18 | #[unsafe(link_section = ".keystore")] |
| 19 | #[used] | 19 | #[used] |
| 20 | static KEYSTORE: [u8; 2048] = [0; 2048]; | 20 | static KEYSTORE: [u8; 2048] = [0; 2048]; |
diff --git a/examples/rp235x/src/bin/blinky.rs b/examples/rp235x/src/bin/blinky.rs index a36029f92..8a2464fbb 100644 --- a/examples/rp235x/src/bin/blinky.rs +++ b/examples/rp235x/src/bin/blinky.rs | |||
| @@ -14,7 +14,7 @@ use {defmt_rtt as _, panic_probe as _}; | |||
| 14 | 14 | ||
| 15 | // Program metadata for `picotool info`. | 15 | // Program metadata for `picotool info`. |
| 16 | // This isn't needed, but it's recomended to have these minimal entries. | 16 | // This isn't needed, but it's recomended to have these minimal entries. |
| 17 | #[link_section = ".bi_entries"] | 17 | #[unsafe(link_section = ".bi_entries")] |
| 18 | #[used] | 18 | #[used] |
| 19 | pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ | 19 | pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ |
| 20 | embassy_rp::binary_info::rp_program_name!(c"Blinky Example"), | 20 | embassy_rp::binary_info::rp_program_name!(c"Blinky Example"), |
diff --git a/examples/rp235x/src/bin/blinky_wifi.rs b/examples/rp235x/src/bin/blinky_wifi.rs index ef029867a..8c352ebc4 100644 --- a/examples/rp235x/src/bin/blinky_wifi.rs +++ b/examples/rp235x/src/bin/blinky_wifi.rs | |||
| @@ -18,7 +18,7 @@ use {defmt_rtt as _, panic_probe as _}; | |||
| 18 | 18 | ||
| 19 | // Program metadata for `picotool info`. | 19 | // Program metadata for `picotool info`. |
| 20 | // This isn't needed, but it's recommended to have these minimal entries. | 20 | // This isn't needed, but it's recommended to have these minimal entries. |
| 21 | #[link_section = ".bi_entries"] | 21 | #[unsafe(link_section = ".bi_entries")] |
| 22 | #[used] | 22 | #[used] |
| 23 | pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ | 23 | pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ |
| 24 | embassy_rp::binary_info::rp_program_name!(c"Blinky Example"), | 24 | embassy_rp::binary_info::rp_program_name!(c"Blinky Example"), |
diff --git a/examples/rp235x/src/bin/blinky_wifi_pico_plus_2.rs b/examples/rp235x/src/bin/blinky_wifi_pico_plus_2.rs index 2a919a1ea..0a5bccfb3 100644 --- a/examples/rp235x/src/bin/blinky_wifi_pico_plus_2.rs +++ b/examples/rp235x/src/bin/blinky_wifi_pico_plus_2.rs | |||
| @@ -18,7 +18,7 @@ use {defmt_rtt as _, panic_probe as _}; | |||
| 18 | 18 | ||
| 19 | // Program metadata for `picotool info`. | 19 | // Program metadata for `picotool info`. |
| 20 | // This isn't needed, but it's recomended to have these minimal entries. | 20 | // This isn't needed, but it's recomended to have these minimal entries. |
| 21 | #[link_section = ".bi_entries"] | 21 | #[unsafe(link_section = ".bi_entries")] |
| 22 | #[used] | 22 | #[used] |
| 23 | pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ | 23 | pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ |
| 24 | embassy_rp::binary_info::rp_program_name!(c"Blinky Example"), | 24 | embassy_rp::binary_info::rp_program_name!(c"Blinky Example"), |
diff --git a/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs b/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs index ccc601661..0e3b4e5f9 100644 --- a/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs +++ b/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs | |||
| @@ -16,7 +16,7 @@ use pio::{Common, Config, FifoJoin, Instance, InterruptHandler, Pio, PioPin, Shi | |||
| 16 | use {defmt_rtt as _, panic_probe as _}; | 16 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 17 | ||
| 18 | // Program metadata for `picotool info` | 18 | // Program metadata for `picotool info` |
| 19 | #[link_section = ".bi_entries"] | 19 | #[unsafe(link_section = ".bi_entries")] |
| 20 | #[used] | 20 | #[used] |
| 21 | pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ | 21 | pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [ |
| 22 | embassy_rp::binary_info::rp_program_name!(c"example_pio_rotary_encoder_rxf"), | 22 | embassy_rp::binary_info::rp_program_name!(c"example_pio_rotary_encoder_rxf"), |
diff --git a/examples/stm32h7/src/bin/adc_dma.rs b/examples/stm32h7/src/bin/adc_dma.rs index dc775f18a..f06b5d06e 100644 --- a/examples/stm32h7/src/bin/adc_dma.rs +++ b/examples/stm32h7/src/bin/adc_dma.rs | |||
| @@ -8,7 +8,7 @@ use embassy_stm32::Config; | |||
| 8 | use embassy_time::Timer; | 8 | use embassy_time::Timer; |
| 9 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 10 | 10 | ||
| 11 | #[link_section = ".ram_d3"] | 11 | #[unsafe(link_section = ".ram_d3")] |
| 12 | static mut DMA_BUF: [u16; 2] = [0; 2]; | 12 | static mut DMA_BUF: [u16; 2] = [0; 2]; |
| 13 | 13 | ||
| 14 | #[embassy_executor::main] | 14 | #[embassy_executor::main] |
diff --git a/examples/stm32h7/src/bin/sai.rs b/examples/stm32h7/src/bin/sai.rs index 95ffe257a..c2bf7d6f2 100644 --- a/examples/stm32h7/src/bin/sai.rs +++ b/examples/stm32h7/src/bin/sai.rs | |||
| @@ -16,9 +16,9 @@ const DMA_BUFFER_LENGTH: usize = HALF_DMA_BUFFER_LENGTH * 2; // 2 half-blocks | |||
| 16 | const SAMPLE_RATE: u32 = 48000; | 16 | const SAMPLE_RATE: u32 = 48000; |
| 17 | 17 | ||
| 18 | //DMA buffer must be in special region. Refer https://embassy.dev/book/#_stm32_bdma_only_working_out_of_some_ram_regions | 18 | //DMA buffer must be in special region. Refer https://embassy.dev/book/#_stm32_bdma_only_working_out_of_some_ram_regions |
| 19 | #[link_section = ".sram1_bss"] | 19 | #[unsafe(link_section = ".sram1_bss")] |
| 20 | static mut TX_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); | 20 | static mut TX_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); |
| 21 | #[link_section = ".sram1_bss"] | 21 | #[unsafe(link_section = ".sram1_bss")] |
| 22 | static mut RX_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); | 22 | static mut RX_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); |
| 23 | 23 | ||
| 24 | #[embassy_executor::main] | 24 | #[embassy_executor::main] |
diff --git a/examples/stm32h7/src/bin/spi_bdma.rs b/examples/stm32h7/src/bin/spi_bdma.rs index 9166fe9b6..5a7dff572 100644 --- a/examples/stm32h7/src/bin/spi_bdma.rs +++ b/examples/stm32h7/src/bin/spi_bdma.rs | |||
| @@ -16,7 +16,7 @@ use static_cell::StaticCell; | |||
| 16 | use {defmt_rtt as _, panic_probe as _}; | 16 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 17 | ||
| 18 | // Defined in memory.x | 18 | // Defined in memory.x |
| 19 | #[link_section = ".ram_d3"] | 19 | #[unsafe(link_section = ".ram_d3")] |
| 20 | static mut RAM_D3: GroundedArrayCell<u8, 256> = GroundedArrayCell::uninit(); | 20 | static mut RAM_D3: GroundedArrayCell<u8, 256> = GroundedArrayCell::uninit(); |
| 21 | 21 | ||
| 22 | #[embassy_executor::task] | 22 | #[embassy_executor::task] |
diff --git a/examples/stm32h723/src/bin/spdifrx.rs b/examples/stm32h723/src/bin/spdifrx.rs index bc8249ced..a04d7cb34 100644 --- a/examples/stm32h723/src/bin/spdifrx.rs +++ b/examples/stm32h723/src/bin/spdifrx.rs | |||
| @@ -24,10 +24,10 @@ const HALF_DMA_BUFFER_LENGTH: usize = BLOCK_LENGTH * CHANNEL_COUNT; | |||
| 24 | const DMA_BUFFER_LENGTH: usize = HALF_DMA_BUFFER_LENGTH * 2; // 2 half-blocks | 24 | const DMA_BUFFER_LENGTH: usize = HALF_DMA_BUFFER_LENGTH * 2; // 2 half-blocks |
| 25 | 25 | ||
| 26 | // DMA buffers must be in special regions. Refer https://embassy.dev/book/#_stm32_bdma_only_working_out_of_some_ram_regions | 26 | // DMA buffers must be in special regions. Refer https://embassy.dev/book/#_stm32_bdma_only_working_out_of_some_ram_regions |
| 27 | #[link_section = ".sram1"] | 27 | #[unsafe(link_section = ".sram1")] |
| 28 | static mut SPDIFRX_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); | 28 | static mut SPDIFRX_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); |
| 29 | 29 | ||
| 30 | #[link_section = ".sram4"] | 30 | #[unsafe(link_section = ".sram4")] |
| 31 | static mut SAI_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); | 31 | static mut SAI_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); |
| 32 | 32 | ||
| 33 | #[embassy_executor::main] | 33 | #[embassy_executor::main] |
diff --git a/examples/stm32h755cm4/src/bin/blinky.rs b/examples/stm32h755cm4/src/bin/blinky.rs index b5c547839..39112c1f5 100644 --- a/examples/stm32h755cm4/src/bin/blinky.rs +++ b/examples/stm32h755cm4/src/bin/blinky.rs | |||
| @@ -10,7 +10,7 @@ use embassy_stm32::SharedData; | |||
| 10 | use embassy_time::Timer; | 10 | use embassy_time::Timer; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 12 | ||
| 13 | #[link_section = ".ram_d3.shared_data"] | 13 | #[unsafe(link_section = ".ram_d3.shared_data")] |
| 14 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 14 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 15 | 15 | ||
| 16 | #[embassy_executor::main] | 16 | #[embassy_executor::main] |
diff --git a/examples/stm32h755cm7/src/bin/blinky.rs b/examples/stm32h755cm7/src/bin/blinky.rs index 94d2226c0..b30bf4de8 100644 --- a/examples/stm32h755cm7/src/bin/blinky.rs +++ b/examples/stm32h755cm7/src/bin/blinky.rs | |||
| @@ -10,7 +10,7 @@ use embassy_stm32::SharedData; | |||
| 10 | use embassy_time::Timer; | 10 | use embassy_time::Timer; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 12 | ||
| 13 | #[link_section = ".ram_d3.shared_data"] | 13 | #[unsafe(link_section = ".ram_d3.shared_data")] |
| 14 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 14 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 15 | 15 | ||
| 16 | #[embassy_executor::main] | 16 | #[embassy_executor::main] |
diff --git a/examples/stm32wl/src/bin/blinky.rs b/examples/stm32wl/src/bin/blinky.rs index ce7d0ec58..a2a90871d 100644 --- a/examples/stm32wl/src/bin/blinky.rs +++ b/examples/stm32wl/src/bin/blinky.rs | |||
| @@ -10,7 +10,7 @@ use embassy_stm32::SharedData; | |||
| 10 | use embassy_time::Timer; | 10 | use embassy_time::Timer; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 12 | ||
| 13 | #[link_section = ".shared_data"] | 13 | #[unsafe(link_section = ".shared_data")] |
| 14 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 14 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 15 | 15 | ||
| 16 | #[embassy_executor::main] | 16 | #[embassy_executor::main] |
diff --git a/examples/stm32wl/src/bin/button.rs b/examples/stm32wl/src/bin/button.rs index 8b5204479..21bcd2ac6 100644 --- a/examples/stm32wl/src/bin/button.rs +++ b/examples/stm32wl/src/bin/button.rs | |||
| @@ -9,7 +9,7 @@ use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; | |||
| 9 | use embassy_stm32::SharedData; | 9 | use embassy_stm32::SharedData; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | #[link_section = ".shared_data"] | 12 | #[unsafe(link_section = ".shared_data")] |
| 13 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 13 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 14 | 14 | ||
| 15 | #[entry] | 15 | #[entry] |
diff --git a/examples/stm32wl/src/bin/button_exti.rs b/examples/stm32wl/src/bin/button_exti.rs index 8dd1a6a5e..0a8aece34 100644 --- a/examples/stm32wl/src/bin/button_exti.rs +++ b/examples/stm32wl/src/bin/button_exti.rs | |||
| @@ -10,7 +10,7 @@ use embassy_stm32::gpio::Pull; | |||
| 10 | use embassy_stm32::SharedData; | 10 | use embassy_stm32::SharedData; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 12 | ||
| 13 | #[link_section = ".shared_data"] | 13 | #[unsafe(link_section = ".shared_data")] |
| 14 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 14 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 15 | 15 | ||
| 16 | #[embassy_executor::main] | 16 | #[embassy_executor::main] |
diff --git a/examples/stm32wl/src/bin/flash.rs b/examples/stm32wl/src/bin/flash.rs index 147f5d293..320a9723a 100644 --- a/examples/stm32wl/src/bin/flash.rs +++ b/examples/stm32wl/src/bin/flash.rs | |||
| @@ -9,7 +9,7 @@ use embassy_stm32::flash::Flash; | |||
| 9 | use embassy_stm32::SharedData; | 9 | use embassy_stm32::SharedData; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | #[link_section = ".shared_data"] | 12 | #[unsafe(link_section = ".shared_data")] |
| 13 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 13 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 14 | 14 | ||
| 15 | #[embassy_executor::main] | 15 | #[embassy_executor::main] |
diff --git a/examples/stm32wl/src/bin/random.rs b/examples/stm32wl/src/bin/random.rs index df2ed0054..68b9d7d00 100644 --- a/examples/stm32wl/src/bin/random.rs +++ b/examples/stm32wl/src/bin/random.rs | |||
| @@ -14,7 +14,7 @@ bind_interrupts!(struct Irqs{ | |||
| 14 | RNG => rng::InterruptHandler<peripherals::RNG>; | 14 | RNG => rng::InterruptHandler<peripherals::RNG>; |
| 15 | }); | 15 | }); |
| 16 | 16 | ||
| 17 | #[link_section = ".shared_data"] | 17 | #[unsafe(link_section = ".shared_data")] |
| 18 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 18 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 19 | 19 | ||
| 20 | #[embassy_executor::main] | 20 | #[embassy_executor::main] |
diff --git a/examples/stm32wl/src/bin/rtc.rs b/examples/stm32wl/src/bin/rtc.rs index 69a9ddc4c..d3709120f 100644 --- a/examples/stm32wl/src/bin/rtc.rs +++ b/examples/stm32wl/src/bin/rtc.rs | |||
| @@ -12,7 +12,7 @@ use embassy_stm32::{Config, SharedData}; | |||
| 12 | use embassy_time::Timer; | 12 | use embassy_time::Timer; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 14 | ||
| 15 | #[link_section = ".shared_data"] | 15 | #[unsafe(link_section = ".shared_data")] |
| 16 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 16 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 17 | 17 | ||
| 18 | #[embassy_executor::main] | 18 | #[embassy_executor::main] |
diff --git a/examples/stm32wl/src/bin/uart_async.rs b/examples/stm32wl/src/bin/uart_async.rs index ece9b9201..505a85f47 100644 --- a/examples/stm32wl/src/bin/uart_async.rs +++ b/examples/stm32wl/src/bin/uart_async.rs | |||
| @@ -14,7 +14,7 @@ bind_interrupts!(struct Irqs{ | |||
| 14 | LPUART1 => InterruptHandler<peripherals::LPUART1>; | 14 | LPUART1 => InterruptHandler<peripherals::LPUART1>; |
| 15 | }); | 15 | }); |
| 16 | 16 | ||
| 17 | #[link_section = ".shared_data"] | 17 | #[unsafe(link_section = ".shared_data")] |
| 18 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 18 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 19 | 19 | ||
| 20 | /* | 20 | /* |
