You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to fork and run cargo build --features stm32l476 but got like 5 similar errors
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
--> src/spi.rs:271:34
|
271 | unsafe { ptr::write_volatile(&self.spi.dr as *const _ as *mut u8, byte) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I'm new to embedded rust so maybe I'm missing some steps before building. Any help appreciated thank you!!
The text was updated successfully, but these errors were encountered:
Hi,
Rust 1.73 rules made this cast "illegal".
Use instead in spi.rs, qspi.rs and serial.rs unsafe { ptr::write_volatile(UnsafeCell::raw_get(&self.spi.dr as *const _ as *mut _), byte) }
don't forget to import core::cell::UnsafeCell
I tried to fork and run cargo
build --features stm32l476
but got like 5 similar errorsI'm new to embedded rust so maybe I'm missing some steps before building. Any help appreciated thank you!!
The text was updated successfully, but these errors were encountered: