mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-25 07:18:08 +00:00
wip
This commit is contained in:
parent
5502aff6dd
commit
ceb2e25199
2 changed files with 21 additions and 3 deletions
|
@ -10,8 +10,10 @@ cortex-m = "0.6.4"
|
|||
cortex-m-rt = "0.6.13"
|
||||
dk = { path = "../../boards/dk", features = ["beginner"] }
|
||||
heapless = "0.5.5"
|
||||
log = "0.4.8"
|
||||
panic-log = { path = "../../common/panic-log" }
|
||||
panic-probe = { version = "0.2.0", features = ["print-defmt"] }
|
||||
defmt = "0.2.0"
|
||||
defmt-rtt = "0.2.0"
|
||||
|
||||
# optimize code in both profiles
|
||||
[profile.dev]
|
||||
|
@ -31,3 +33,18 @@ incremental = false
|
|||
lto = "fat"
|
||||
opt-level = 3
|
||||
overflow-checks = false
|
||||
|
||||
[features]
|
||||
# set logging levels here
|
||||
default = [
|
||||
"defmt-default",
|
||||
# "dependency-a/defmt-trace",
|
||||
]
|
||||
|
||||
# do NOT modify these features
|
||||
defmt-default = []
|
||||
defmt-trace = []
|
||||
defmt-debug = []
|
||||
defmt-info = []
|
||||
defmt-warn = []
|
||||
defmt-error = []
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
use cortex_m::asm;
|
||||
use cortex_m_rt::entry;
|
||||
use panic_log as _; // the panicking behavior
|
||||
use defmt_rtt as _; // global logger
|
||||
use panic_probe as _; // the panicking behavior
|
||||
|
||||
// the custom entry point
|
||||
// vvvvv
|
||||
|
@ -18,7 +19,7 @@ fn main() -> ! {
|
|||
// initializes the peripherals
|
||||
dk::init().unwrap();
|
||||
|
||||
log::info!("Hello, world!"); // :wave:
|
||||
defmt::info!("Hello, world!"); // :wave:
|
||||
|
||||
loop {
|
||||
// breakpoint: halts the program's execution
|
||||
|
|
Loading…
Reference in a new issue