explore has quit [Quit: Connection closed for inactivity]
emerent has quit [Ping timeout: 264 seconds]
emerent has joined #rust-embedded
starblue has quit [Ping timeout: 265 seconds]
starblue has joined #rust-embedded
<re_irc>
<nihal.pasham> GrantM11235: yeah I get that. But I was wondering why it's included in the api, if the purpose of a"OnceCell" is to assign only once.
<re_irc>
<GrantM11235> The purpose isn't really "to assign only once", the purpose is to provide interior mutability. "assign only once through a shared reference" is just the way that it provides that interior mutability.
<re_irc>
<Imran K> Hello all, I am using 3 different boards of *stm32f4* series "stm32f411", "stm32f446" and "stm32f469", I want to write a single flash driver module, because the registers are same for all 3 boards so how can I do it?
<re_irc>
<Imran K> I tried but I am getting "error: Symbol "DEVICE_PERIPHERALS" is already defined"
<re_irc>
<Imran K> * > error: Symbol "DEVICE\_PERIPHERALS" is already defined
<re_irc>
<Imran K> * *error: Symbol "DEVICE\_PERIPHERALS" is already defined*
explore has quit [Quit: Connection closed for inactivity]
GenTooMan has joined #rust-embedded
<re_irc>
<Chris [pwnOrbitals]> Can I use Miri to check for complex embedded code with C dependencies ?
<re_irc>
<Chris [pwnOrbitals]> So in the meantime, are there any good static analysis tools to help me catch UB ? Besides Clippy
<re_irc>
<dirbaio> miri is not static analysis, you have to actually run the code with the actual inputs that trigger UB to catch it. I'm not aware of any static-analysis-only tools that do that, even for just Rust
<re_irc>
<dirbaio> would be too much magic if it iexisted
<re_irc>
<dirbaio> * existed
<re_irc>
<Chris [pwnOrbitals]> maybe something that could catch (LLVM) UB at LLVM-level during compilation ?
<re_irc>
<Chris [pwnOrbitals]> maybe ubsan could be adapted for Rust use :d
<re_irc>
<dirbaio> code can have UB or not depending on the inputs it's called with
<re_irc>
<dirbaio> youc can't tell by just looking at a piece of code alone
<re_irc>
<dirbaio> you'd have to ask "is this piece of code ever called with inputs that satisfy X condition?", analyzing the whole program
<re_irc>
<dirbaio> it's pretty much equivalent to the halting problem
<re_irc>
<GrantM11235> If you started with a template, you probably have something like "use panic_probe as _" which will link in the panic handler from that crate