mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-06-26 17:10:39 +00:00
25 lines
378 B
Rust
25 lines
378 B
Rust
|
#![no_main]
|
||
|
#![no_std]
|
||
|
|
||
|
use cortex_m::asm;
|
||
|
use panic_log as _; // panic handler
|
||
|
|
||
|
#[rtfm::app(device = dk)]
|
||
|
const APP: () = {
|
||
|
#[init]
|
||
|
fn init(_cx: init::Context) {
|
||
|
dk::init().unwrap();
|
||
|
|
||
|
log::info!("Hello");
|
||
|
}
|
||
|
|
||
|
#[idle]
|
||
|
fn idle(_cx: idle::Context) -> ! {
|
||
|
log::info!("world!");
|
||
|
|
||
|
loop {
|
||
|
asm::bkpt();
|
||
|
}
|
||
|
}
|
||
|
};
|