diff options
22 files changed, 26 insertions, 26 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/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 33499babb..61af94560 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 79a856b3b..01937593a 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 | /* |
