Skip to content
Snippets Groups Projects
Commit f2025c07 authored by Per Lindgren's avatar Per Lindgren
Browse files

examples

parent 5b70cdca
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#![no_std] #![no_std]
extern crate cortex_m_semihosting as semihosting; extern crate cortex_m_semihosting as semihosting;
extern crate stm32f4xx_hal; extern crate stm32f4x_hal;
use core::fmt::Write; use core::fmt::Write;
......
//! Prints "Hello, world" on the ITM console
//! and Semihosting in the openocd console
//!
//! Using cortex-m-debug, for simple tracing
#![deny(unsafe_code)]
#![deny(warnings)]
#![no_std]
extern crate stm32f4xx_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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment