1234567891011121314151617181920 |
- //! Prints "Hello, world!" on the host console using semihosting
- use panic_halt as _;
- use cortex_m_rt::entry;
- use cortex_m_semihosting::{debug, hprintln};
- fn main() -> ! {
- hprintln!("Hello, world!").unwrap();
- // exit QEMU
- // NOTE do not run this on hardware; it can corrupt OpenOCD state
- debug::exit(debug::EXIT_SUCCESS);
- loop {}
- }
|