added RTT example app
This commit is contained in:
parent
8e53678d11
commit
e2df601d66
@ -10,5 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## [0.1.0]
|
## [0.1.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
- First version of the HAL which adds the GPIO implementation and timer implementation.
|
- 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
|
- Also adds some examples and helper files to set up new binary crates
|
||||||
|
- RTT example application
|
||||||
|
19
examples/rtt-log.rs
Normal file
19
examples/rtt-log.rs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user