Switch to panic-rtt-target
parent
3572e55b67
commit
5db28da7fb
|
@ -11,18 +11,19 @@ cortex-m = "0.6.2"
|
||||||
cortex-m-rt = "0.6.12"
|
cortex-m-rt = "0.6.12"
|
||||||
#cortex-m-semihosting = "0.3.5"
|
#cortex-m-semihosting = "0.3.5"
|
||||||
# alternate panic impls, choose only one!
|
# alternate panic impls, choose only one!
|
||||||
panic-halt = "0.2.0"
|
#panic-halt = "0.2.0"
|
||||||
#panic-semihosting = "0.5.3" # requires cortex-m-semihosting
|
#panic-semihosting = "0.5.3" # requires cortex-m-semihosting
|
||||||
#panic-itm = "0.4.1"
|
#panic-itm = "0.4.1"
|
||||||
#panic-abort = "0.3.2"
|
#panic-abort = "0.3.2"
|
||||||
#panic-ramdump = "0.1.1"
|
#panic-ramdump = "0.1.1"
|
||||||
#panic-persist = "0.2.1"
|
#panic-persist = "0.2.1"
|
||||||
embedded-hal = "0.2.3"
|
panic-rtt-target = { version = "0.1.0", features = ["cortex-m"] }
|
||||||
nb = "0.1.2"
|
embedded-hal = "0.2.4"
|
||||||
|
nb = "1.0.0"
|
||||||
rtt-target = { version = "0.2.0", features = ["cortex-m"] }
|
rtt-target = { version = "0.2.0", features = ["cortex-m"] }
|
||||||
|
|
||||||
[dependencies.stm32f1xx-hal]
|
[dependencies.stm32f1xx-hal]
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
features = ["rt", "stm32f103", "medium"]
|
features = ["rt", "stm32f103", "medium"]
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
|
10
src/main.rs
10
src/main.rs
|
@ -9,9 +9,8 @@
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![cfg_attr(not(doc), no_main)]
|
#![cfg_attr(not(doc), no_main)]
|
||||||
|
|
||||||
//use panic_halt as _;
|
|
||||||
use core::panic::PanicInfo;
|
|
||||||
use rtt_target::{rprintln, rtt_init_print};
|
use rtt_target::{rprintln, rtt_init_print};
|
||||||
|
use panic_rtt_target as _;
|
||||||
|
|
||||||
use nb::block;
|
use nb::block;
|
||||||
|
|
||||||
|
@ -65,10 +64,3 @@ fn main() -> ! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(never)]
|
|
||||||
#[panic_handler]
|
|
||||||
fn panic(info: &PanicInfo) -> ! {
|
|
||||||
rprintln!("{}", info);
|
|
||||||
loop {} // You might need a compiler fence in here.
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue