initial commit
This commit is contained in:
23
examples/hello.rs
Normal file
23
examples/hello.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
//! Prints "Hello, world!" on the OpenOCD console using semihosting
|
||||
|
||||
#![no_std]
|
||||
|
||||
#[macro_use]
|
||||
extern crate cortex_m;
|
||||
extern crate cortex_m_rt;
|
||||
extern crate {{name}};
|
||||
|
||||
use cortex_m::exception;
|
||||
use {{name}}::interrupt;
|
||||
|
||||
fn main() {
|
||||
hprintln!("Hello, world!");
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub static _INTERRUPTS: interrupt::Handlers =
|
||||
interrupt::Handlers { ..interrupt::DEFAULT_HANDLERS };
|
||||
|
||||
#[no_mangle]
|
||||
pub static _EXCEPTIONS: exception::Handlers =
|
||||
exception::Handlers { ..exception::DEFAULT_HANDLERS };
|
||||
Reference in New Issue
Block a user