<cesnel[m]>
I just checked the asm code, so I think the logical way would be to use #[pre_init] to initialise it.
<cesnel[m]>
JamesMunns[m]: Thanks!
RobertJrdens[m] has joined #rust-embedded
<RobertJrdens[m]>
depends. either custom init procedure, runtime init with MaybeUninit/cortex_m::singleton() (soon), or piggy back on the existing mechanisms by placing your new sections such that they fall into the .data load mechanism or .bss zeroing.
<JamesMunns[m]>
cesnel[m]: Yeah, depends when you need it! You could initialize it in Rust if you don't need it until runtime, it gets a little harder if it needs to be a `static` or something, like Robert said.
<JamesMunns[m]>
but since it's considered uninit at boot, you can do the initialization in main, then (unsafely) make a `&'static` or `&'mut static` out of it.
badyjoke[m] has quit [Quit: Idle timeout reached: 172800s]
MichaelMaitland[ has quit [Quit: Idle timeout reached: 172800s]
paumanok[m] has quit [Quit: Idle timeout reached: 172800s]
bpye has quit [Quit: Ping timeout (120 seconds)]
bpye has joined #rust-embedded
ingo[m] has joined #rust-embedded
<ingo[m]>
Hey, i'm working on some code for a stm32f103 which requires a division and modulo operation. I'm wondering if a simple division and subsequent modulo operation translates to arms `udiv` operation or if it results in some expensive code. Is there anything special i have to watch out for?