Files
embedded-rs/examples/hello.rs
2017-04-10 09:34:37 -05:00

22 lines
425 B
Rust

//! Prints "Hello, world!" on the OpenOCD console using semihosting
#![feature(used)]
#![no_std]
#[macro_use]
extern crate cortex_m;
extern crate cortex_m_rt;
extern crate {{name}};
use {{name}}::interrupt;
fn main() {
hprintln!("Hello, world!");
}
#[allow(dead_code)]
#[used]
#[link_section = ".rodata.interrupts"]
static INTERRUPTS: interrupt::Handlers =
interrupt::Handlers { ..interrupt::DEFAULT_HANDLERS };