systic example for qemu

This commit is contained in:
Per Lindgren 2020-09-29 23:10:50 +02:00
parent 43f11812a1
commit 6c2b02a937

View file

@ -6,7 +6,7 @@
#![no_std] #![no_std]
use cortex_m_semihosting::{debug, hprintln}; use cortex_m_semihosting::{debug, hprintln};
use lm3s6965::Interrupt; // use lm3s6965::Interrupt;
use panic_semihosting as _; use panic_semihosting as _;
#[rtic::app(device = lm3s6965)] #[rtic::app(device = lm3s6965)]
@ -34,7 +34,7 @@ const APP: () = {
static mut COUNTER: i32 = 0; static mut COUNTER: i32 = 0;
*COUNTER += 1; *COUNTER += 1;
hprintln!("SysTick #{}", COUNTER).unwrap(); hprintln!("SysTick #{}", COUNTER).unwrap();
if *C == 10 { if *COUNTER == 10 {
debug::exit(debug::EXIT_SUCCESS); debug::exit(debug::EXIT_SUCCESS);
} }
} }