Help with HardFault on arm

I'm trying to make a version of a HAL timer that uses async to sleep. I use a priority queue and it all works great in debug, but when I compile in release I get a hard fault. The assembly instruction that causes it is

10a8:      	strd	r5, r5, [r4, #72]

which is apparently a double word store. Can anyone help me debug this - I just don't know much about ARM assembly.

Whole code available on github. It's a firmware for the pinetime smartwatch, but at the moment I'm playing with sleeping the hf clock during downtime. I'm compiling it for thumbv7em-none-eabihf using cargo-embed.

In the end it turned out the problem was in a dependency "rust-embedded-community/async-on-embedded". The advice seems to be not to use that crate, since it is not actively maintained and there are known soundness issues.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.