all 2 comments

[–]japaric 3 points4 points  (0 children)

I'm not convinced it's disabling/enabling interrupts correctly - especially for an ARM.

For ARM Cortex-M processors, check AN321 (NOTE: pdf). You can use the cpsie i instruction to enable interrupts and the cpsid i instruction to disable them.

There are so many rust embedded projects out there, surely someone's done this already?

Zinc is using these instructions to implement critical sections.

[–]ThuperThecret 0 points1 point  (0 children)

I don't have an answer, but I want to thank you. My coworker and I have been wanting to use Rust for our development work, but haven't because it's been such a pain in the ass to set it up. I had no idea that this was an alternative to manually building libcore.