File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,14 @@ usbd-serial = "0.1.0"
7070heapless = " 0.5"
7171cortex-m-rtic = " 0.5.5"
7272
73+ [dev-dependencies .panic-rtt-target ]
74+ version = " 0.1.1"
75+ features = [" cortex-m" ]
76+
77+ [dev-dependencies .rtt-target ]
78+ version = " 0.2.2"
79+ features = [" cortex-m" ]
80+
7381[profile .dev ]
7482incremental = false
7583codegen-units = 1
Original file line number Diff line number Diff line change 11#![ no_main]
22#![ no_std]
33
4- extern crate panic_halt ;
4+ extern crate panic_rtt_target ;
55
66use nb:: block;
7+ use rtt_target:: {
8+ rprint,
9+ rprintln,
10+ } ;
711use stm32l4xx_hal:: {
812 prelude:: * ,
913 pac:: {
@@ -26,6 +30,9 @@ const APP: () = {
2630
2731 #[ init]
2832 fn init ( _: init:: Context ) -> init:: LateResources {
33+ rtt_target:: rtt_init_print!( ) ;
34+ rprint ! ( "Initializing... " ) ;
35+
2936 let p = pac:: Peripherals :: take ( ) . unwrap ( ) ;
3037
3138 let mut rcc = p. RCC . constrain ( ) ;
@@ -49,6 +56,8 @@ const APP: () = {
4956 ) ;
5057 let ( tx, rx) = serial. split ( ) ;
5158
59+ rprintln ! ( "done." ) ;
60+
5261 init:: LateResources {
5362 rx,
5463 tx,
You can’t perform that action at this time.
0 commit comments