File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ Whenever you see the word "app" you should replace it with the name you selected
84
84
for your project. Or, you could also name your project "app" and avoid the
85
85
substitutions.
86
86
87
- For convenience here's the source code of ` src/main.rs ` :
87
+ For convenience here are the most important parts of the source code in ` src/main.rs ` :
88
88
89
89
``` console
90
90
$ cat src/main.rs
@@ -94,11 +94,7 @@ $ cat src/main.rs
94
94
#![no_std]
95
95
#![no_main]
96
96
97
- // pick a panicking behavior
98
- extern crate panic_halt; // you can put a breakpoint on `rust_begin_unwind` to catch panics
99
- // extern crate panic_abort; // requires nightly
100
- // extern crate panic_itm; // logs messages over ITM; requires ITM support
101
- // extern crate panic_semihosting; // logs messages to the host stderr; requires a debugger
97
+ extern crate panic_halt;
102
98
103
99
use cortex_m_rt :: entry;
104
100
@@ -122,7 +118,8 @@ with `no_main` is that using the `main` interface in `no_std` context requires
122
118
nightly.
123
119
124
120
` extern crate panic_halt; ` . This crate provides a ` panic_handler ` that defines
125
- the panicking behavior of the program. More on this later on.
121
+ the panicking behavior of the program. We will cover this in more detail in the
122
+ [ Panicking] ( panicking.md ) chapter of the book.
126
123
127
124
[ ` #[entry] ` ] is an attribute provided by the [ ` cortex-m-rt ` ] crate that's used
128
125
to mark the entry point of the program. As we are not using the standard ` main `
You can’t perform that action at this time.
0 commit comments