hello.rs 292 B

123456789101112131415161718
  1. //! Prints "Hello, world" on the OpenOCD console
  2. #![deny(unsafe_code)]
  3. #![no_main]
  4. #![no_std]
  5. use panic_semihosting as _;
  6. use cortex_m_semihosting::hprintln;
  7. use stm32f1xx_hal as _;
  8. use cortex_m_rt::entry;
  9. #[entry]
  10. fn main() -> ! {
  11. hprintln!("Hello, world!").unwrap();
  12. loop {}
  13. }