Skip to content
Snippets Groups Projects
Select Git revision
  • ad53b3f70eac6e696e5d2d02c8584893f4543610
  • master default protected
2 results

_0_hello.rs

Blame
  • _0_hello.rs 711 B
    //! Prints "Hello, world" on the OpenOCD console
    //!
    //! ```
    //! #![deny(unsafe_code)]
    //! #![deny(warnings)]
    //! #![feature(proc_macro)]
    //! #![no_std]
    //!
    //! extern crate cortex_m_rtfm as rtfm;
    //! extern crate cortex_m_semihosting as semihosting;
    //! extern crate f4;
    //!
    //! use core::fmt::Write;
    //!
    //! use rtfm::app;
    //! use semihosting::hio;
    //!
    //! // TASKS & RESOURCES
    //! app! {
    //!     device: f4::stm32f40x,
    //! }
    //!
    //! // INITIALIZATION PHASE
    //! fn init(_p: init::Peripherals) {}
    //!
    //! // IDLE LOOP
    //! fn idle() -> ! {
    //!     writeln!(hio::hstdout().unwrap(), "Hello, world!").unwrap();
    //!
    //!     loop {
    //!         rtfm::wfi();
    //!     }
    //! }
    //! ```
    // Auto-generated. Do not modify.