diff --git a/examples/hello_debug.rs b/examples/hello_debug.rs new file mode 100644 index 0000000000000000000000000000000000000000..12b07ced455186b859d0baa69a854945bd0a1255 --- /dev/null +++ b/examples/hello_debug.rs @@ -0,0 +1,19 @@ +//! Using cortex-m-debug, for simple tracing + +#![deny(unsafe_code)] +#![deny(warnings)] +#![no_std] + +extern crate stm32f4x_hal; + +// Convenient tracing over semihosting and ITM +#[macro_use] +extern crate cortex_m_debug; + +fn main() { + ip!("ITM: Hello "); + ipln!("World! for the {} time", 50); + + sp!("Semihosting: Hello "); + spln!("World! for the {} time", 50); +}