Merge pull request #7 from robamu-org/mueller/rtt-example

added RTT example app
This commit is contained in:
Robin Mueller 2021-11-08 10:19:36 +01:00 committed by GitHub
commit cedff3b26a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -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
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);
}
}