va416xx-rs/va416xx-hal/examples/rtt-log.rs

21 lines
413 B
Rust

//! Code to test RTT logger functionality
#![no_main]
#![no_std]
use cortex_m_rt::entry;
use panic_halt as _;
use rtt_target::{rprintln, rtt_init_print};
use va416xx as _;
#[entry]
fn main() -> ! {
rtt_init_print!();
rprintln!("-- RTT Demo --");
let mut counter = 0;
loop {
rprintln!("{}: Hello, world!", counter);
counter += 1;
cortex_m::asm::delay(75_000_000);
}
}