Merge pull request #59 from rust-embedded/loop_crash_fix

Workaround for loop {} until it is fixed
This commit is contained in:
Emil Fresk
2018-11-20 15:33:23 +01:00
committed by GitHub

View File

@@ -7,10 +7,13 @@ extern crate panic_halt; // you can put a breakpoint on `rust_begin_unwind` to c
// extern crate panic_itm; // logs messages over ITM; requires ITM support // extern crate panic_itm; // logs messages over ITM; requires ITM support
// extern crate panic_semihosting; // logs messages to the host stderr; requires a debugger // extern crate panic_semihosting; // logs messages to the host stderr; requires a debugger
use cortex_m::asm;
use cortex_m_rt::entry; use cortex_m_rt::entry;
#[entry] #[entry]
fn main() -> ! { fn main() -> ! {
asm::nop(); // To not have main optimize to abort in release mode, remove when you add code
loop { loop {
// your code goes here // your code goes here
} }