diff options
| author | Hiroaki Yutani <[email protected]> | 2025-05-07 22:59:41 +0900 |
|---|---|---|
| committer | Hiroaki Yutani <[email protected]> | 2025-05-07 22:59:41 +0900 |
| commit | 9d9ae7c5d5bf3371a7bec2fa69a9c27415277fc0 (patch) | |
| tree | 7e12f881c18c6fbe0e6e537c2596d3959f959b4b | |
| parent | b1d37cbf22cedc926eb9f61a39ec02715530f63e (diff) | |
Revert
| -rw-r--r-- | embassy-rp/Cargo.toml | 7 | ||||
| -rw-r--r-- | embassy-rp/src/bootsel.rs | 2 | ||||
| -rw-r--r-- | embassy-rp/src/flash.rs | 6 | ||||
| -rw-r--r-- | embassy-rp/src/lib.rs | 8 | ||||
| -rw-r--r-- | embassy-rp/src/multicore.rs | 4 | ||||
| -rw-r--r-- | embassy-stm32-wpan/src/tables.rs | 50 | ||||
| -rw-r--r-- | embassy-stm32/src/lib.rs | 2 | ||||
| -rw-r--r-- | tests/rp/Cargo.toml | 3 |
8 files changed, 38 insertions, 44 deletions
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index e8091a2a5..b440591cf 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 | ## #[unsafe(link_section = ".boot2")] | 89 | ## #[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 | ## #[unsafe(link_section = ".start_block")] | 112 | ## #[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 | ## ``` |
| @@ -174,6 +174,3 @@ smart-leds = "0.4.0" | |||
| 174 | [dev-dependencies] | 174 | [dev-dependencies] |
| 175 | embassy-executor = { version = "0.7.0", path = "../embassy-executor", features = ["arch-std", "executor-thread"] } | 175 | embassy-executor = { version = "0.7.0", path = "../embassy-executor", features = ["arch-std", "executor-thread"] } |
| 176 | static_cell = { version = "2" } | 176 | static_cell = { version = "2" } |
| 177 | |||
| 178 | [patch.crates-io] | ||
| 179 | cortex-m-rt = { git = "https://github.com/yutannihilation/cortex-m", branch = "fix/allow-unsafe-wrap-rust2024" } | ||
diff --git a/embassy-rp/src/bootsel.rs b/embassy-rp/src/bootsel.rs index 5f0bac248..14f9e46aa 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 | #[unsafe(link_section = ".data.ram_func")] | 39 | #[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 1ac15a677..ef1cd9212 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 | #[unsafe(link_section = ".data.ram_func")] | 626 | #[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 | #[unsafe(link_section = ".data.ram_func")] | 691 | #[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 | #[unsafe(link_section = ".data.ram_func")] | 810 | #[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 9b7c2b6ea..f549446bc 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 | #[unsafe(link_section = ".boot2")] | 437 | #[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 | #[unsafe(link_section = ".boot2")] | 443 | #[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 | #[unsafe(link_section = ".start_block")] | 466 | #[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 | #[unsafe(link_section = ".start_block")] | 472 | #[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 ec05bfdf5..d10b6837c 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 | #[unsafe(link_section = ".data.ram_func")] | 93 | #[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 | #[unsafe(link_section = ".data.ram_func")] | 118 | #[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 204790e6d..fe6fc47a3 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 | #[unsafe(link_section = "TL_REF_TABLE")] | 193 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 196 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 199 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 202 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 205 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 208 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 211 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 214 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 217 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 220 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 223 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 227 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 231 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 234 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 238 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 241 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 246 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 250 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 255 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 258 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 261 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 266 | #[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 | #[unsafe(link_section = "MB_MEM1")] | 271 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 275 | #[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 | #[unsafe(link_section = "MB_MEM2")] | 280 | #[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 8ba604830..226293a9d 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 | /// #[unsafe(link_section = ".ram_d3")] | 334 | /// #[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/tests/rp/Cargo.toml b/tests/rp/Cargo.toml index ed3a880a0..1335aa84b 100644 --- a/tests/rp/Cargo.toml +++ b/tests/rp/Cargo.toml | |||
| @@ -93,6 +93,3 @@ debug = false | |||
| 93 | debug-assertions = false | 93 | debug-assertions = false |
| 94 | opt-level = 0 | 94 | opt-level = 0 |
| 95 | overflow-checks = false | 95 | overflow-checks = false |
| 96 | |||
| 97 | [patch.crates-io] | ||
| 98 | cortex-m-rt = { git = "https://github.com/yutannihilation/cortex-m", branch = "fix/allow-unsafe-wrap-rust2024" } | ||
