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"
70
70
heapless = " 0.5"
71
71
cortex-m-rtic = " 0.5.5"
72
72
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
+
73
81
[profile .dev ]
74
82
incremental = false
75
83
codegen-units = 1
Original file line number Diff line number Diff line change 1
1
#![ no_main]
2
2
#![ no_std]
3
3
4
- extern crate panic_halt ;
4
+ extern crate panic_rtt_target ;
5
5
6
6
use nb:: block;
7
+ use rtt_target:: {
8
+ rprint,
9
+ rprintln,
10
+ } ;
7
11
use stm32l4xx_hal:: {
8
12
prelude:: * ,
9
13
pac:: {
@@ -26,6 +30,9 @@ const APP: () = {
26
30
27
31
#[ init]
28
32
fn init ( _: init:: Context ) -> init:: LateResources {
33
+ rtt_target:: rtt_init_print!( ) ;
34
+ rprint ! ( "Initializing... " ) ;
35
+
29
36
let p = pac:: Peripherals :: take ( ) . unwrap ( ) ;
30
37
31
38
let mut rcc = p. RCC . constrain ( ) ;
@@ -49,6 +56,8 @@ const APP: () = {
49
56
) ;
50
57
let ( tx, rx) = serial. split ( ) ;
51
58
59
+ rprintln ! ( "done." ) ;
60
+
52
61
init:: LateResources {
53
62
rx,
54
63
tx,
You can’t perform that action at this time.
0 commit comments