embedded-trainings-2020/beginner/apps/src/bin/hello.rs

21 lines
379 B
Rust
Raw Normal View History

2020-06-09 09:52:27 +00:00
#![no_main]
#![no_std]
use cortex_m::asm;
use cortex_m_rt::entry;
2021-04-08 09:27:00 +00:00
use defmt_rtt as _; // global logger
use panic_probe as _; // the panicking behavior
2020-06-09 09:52:27 +00:00
#[entry]
fn main() -> ! {
// initializes the peripherals
dk::init().unwrap();
2021-04-08 09:27:00 +00:00
defmt::info!("Hello, world!"); // :wave:
2020-06-09 09:52:27 +00:00
loop {
// breakpoint: halts the program's execution
asm::bkpt();
}
}