Merge pull request #7 from robamu-org/mueller/rtt-example
added RTT example app
This commit is contained in:
commit
cedff3b26a
@ -10,6 +10,9 @@ 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
|
||||||
- Added basic test binary in form of an example
|
- Added basic test binary in form of an example
|
||||||
|
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