diff --git a/qemu/examples/1-rtfm.rs b/qemu/examples/1-rtic.rs similarity index 100% rename from qemu/examples/1-rtfm.rs rename to qemu/examples/1-rtic.rs diff --git a/qemu/examples/1-yield.rs b/qemu/examples/1-yield.rs index 2f2f53412f45f3c5536a2bf4b8761883c22c5bb5..4e168f7b40ec2c0f70f2af686d849efe66295dd0 100644 --- a/qemu/examples/1-yield.rs +++ b/qemu/examples/1-yield.rs @@ -17,9 +17,9 @@ use async_cortex_m::task; use cortex_m_rt::entry; -use cortex_m_semihosting::hprintln; -use nrf52 as _; // memory layout -use panic_udf as _; // panic handler +use cortex_m_semihosting::{debug, hprintln}; +use lm3s6965 as _; +use panic_halt as _; // panic handler // vector table #[entry] fn main() -> ! { @@ -34,7 +34,12 @@ fn main() -> ! { // task B task::block_on(async { + let mut i: u8 = 0; loop { + i += 1; + if i == 3 { + debug::exit(debug::EXIT_SUCCESS); + } hprintln!("B1: yield").ok(); // context switch to A