rust-embedded / cortex-m-quickstart

Template to develop bare metal applications for Cortex-M microcontrollers
791 stars 164 forks source link

Release build crashes #50

Closed thejpster closed 5 years ago

thejpster commented 5 years ago

If I build this project with --release for thumbv7em-none-eabi, I end up in the Hardfault handler.

If I add an asm::nop(); to the loop { } in main, it works fine. It's fine as a debug either with or without the asm::nop().

I'm using a TM4C129 Launchpad, but haven't extern'd in a chip crate yet. I've attached the generated assembly.

test_app.txt

jonas-schievink commented 5 years ago

This is likely to be caused by https://github.com/rust-lang/rust/issues/28728