Skip to content
Snippets Groups Projects
Unverified Commit 076b6bde authored by lucazulian's avatar lucazulian
Browse files

chore: try semihosting

parent 89f65afe
No related branches found
No related tags found
No related merge requests found
......@@ -8,13 +8,10 @@ authors = ["Luca Zulian <lucagiuggia@gmail.com>"]
[dependencies]
cortex-m = "0.5.8"
cortex-m-rt = "0.6.5"
cortex-m-semihosting = "0.3.2"
panic-halt = "0.2.0"
stm32l4xx-hal = { version = "0.5", features = ["rt", "stm32l4x2"] }
#[dependencies.stm32l4]
#version = "0.14.0"
#features = ["stm32l4x2", "rt"]
panic-semihosting = "0.5.0"
cortex-m-semihosting = "0.3.5"
stm32l4xx-hal = { version = "0.6.0", features = ["rt", "stm32l4x2"] }
[[bin]]
name = "stm"
......
......@@ -10,6 +10,7 @@ use cortex_m::peripheral::syst::SystClkSource;
use cortex_m_rt::entry;
use stm32l4xx_hal as hal;
use hal::prelude::*;
use cortex_m_semihosting::{hprintln};
#[entry]
fn main() -> ! {
......@@ -30,6 +31,8 @@ fn main() -> ! {
loop {
while !syst.has_wrapped() {};
let _ = ld4.set_high();
hprintln!("Hello, world!").unwrap();
while !syst.has_wrapped() {};
let _ = ld4.set_low();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment