added RTT example app

This commit is contained in:
Robin Müller 2021-11-08 10:03:10 +01:00
parent 8e53678d11
commit e2df601d66
2 changed files with 22 additions and 0 deletions

View File

@ -10,5 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.1.0]
### Added
- First version of the HAL which adds the GPIO implementation and timer implementation.
- Also adds some examples and helper files to set up new binary crates
- RTT example application

19
examples/rtt-log.rs Normal file
View File

@ -0,0 +1,19 @@
//! 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 va108xx as _;
#[entry]
fn main() -> ! {
rtt_init_print!();
let mut counter = 0;
loop {
rprintln!("{}: Hello, world!", counter);
counter += 1;
cortex_m::asm::delay(25_000_000);
}
}