Skip to content
Snippets Groups Projects
Select Git revision
  • 598036dfcd9a92928312e36d6ee9eabbde63099d
  • master default protected
  • homeexam
  • stacked_borrows
  • generics_and_traits
  • crane_lift
  • spans
  • rust_syntax
  • type_check
  • expression
  • fallible
11 results

build.rs

Blame
  • Forked from Per Lindgren / D7050E_2020
    Source project has a limited visibility.
    _1_itm.rs 1.00 KiB
    //! Sends Hello and then World through the first ITM stimulus port
    //!
    //! You'll need to run `itmdump itm.fifo` (mind the file paths) to receive the
    //! message on the host. Read the [`itm`] crate documentation for details.
    //!
    //! [`itm`]: https://docs.rs/itm/0.1.1/itm/
    //!
    //! ```
    //! #![deny(unsafe_code)]
    //! #![deny(warnings)]
    //! #![feature(proc_macro)]
    //! #![no_std]
    //! 
    //! #[macro_use]
    //! extern crate cortex_m;
    //! extern crate cortex_m_rtfm as rtfm;
    //! extern crate f4;
    //! 
    //! use rtfm::{app, Threshold};
    //! 
    //! // TASK & RESOURCES
    //! app! {
    //!     device: f4::stm32f40x,
    //! 
    //!     idle: {
    //!         resources: [ITM],
    //!     },
    //! }
    //! 
    //! // INITIALIZATION PHASE
    //! fn init(p: init::Peripherals) {
    //!     iprintln!(&p.ITM.stim[0], "Hello");
    //! }
    //! 
    //! // IDLE LOOP
    //! fn idle(_t: &mut Threshold, r: idle::Resources) -> ! {
    //!     iprintln!(&r.ITM.stim[0], "World");
    //! 
    //!     // Sleep
    //!     loop {
    //!         rtfm::wfi();
    //!     }
    //! }
    //! ```
    // Auto-generated. Do not modify.