start tutorial
This commit is contained in:
17
tutorial/04-embedded-no-std-hello/solution/src/main.rs
Normal file
17
tutorial/04-embedded-no-std-hello/solution/src/main.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use cortex_m::asm;
|
||||
use cortex_m_rt::entry;
|
||||
use defmt::info;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
info!("step04: boot ok");
|
||||
|
||||
loop {
|
||||
asm::delay(8_000_000);
|
||||
info!("step04: alive");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user