Skip to content

Commit 3104ee1

Browse files
committed
Update crate versions in 03-setup
Cargo.toml: * edition 2018 -> 2021 * cortex-m 0.7.3 -> 0.7.7, added feature `critical-section-single-core` * cortex-m-rt 0.7.0 -> 0.7.3 * rtt-target 0.3.1 -> 0.5.0, removed feature `cortex-m` * panic-rtt-target 0.1.2 -> 0.1.3, removed feature `cortex-m` src/main.rs: * To prevent a link error regarding undefined symbols (`_critical_section_1_0_acquire` and `_critical_section_1_0_release`) I have added `use cortex_m as _;` The code compiles, and I see the RTT output from cargo embed.
1 parent cbce12d commit 3104ee1

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

microbit/src/03-setup/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
name = "rtt-check"
33
version = "0.1.0"
44
authors = ["Henrik Böving <hargonix@gmail.com>"]
5-
edition = "2018"
5+
edition = "2021"
66

77
[dependencies]
8-
cortex-m = "0.7.3"
9-
cortex-m-rt = "0.7.0"
10-
rtt-target = { version = "0.3.1", features = ["cortex-m"] }
11-
panic-rtt-target = { version = "0.1.2", features = ["cortex-m"] }
8+
cortex-m = { version = "0.7.7", features = ["critical-section-single-core"] }
9+
cortex-m-rt = "0.7.3"
10+
rtt-target = "0.5.0"
11+
panic-rtt-target = "0.1.3"

microbit/src/03-setup/IDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ When editing the IntelliJ build configuration, here are a few non-default values
2828
You'll need to replace the default value `run` by the command `embed FLAGS`,
2929
* You should enable "Emulate terminal in output console". Otherwise, your program will fail to print text to a terminal
3030
* You should ensure that the working directory is `microbit/src/N-name`, with `N-name` being the directory of the chapter you
31-
are reading. You can not run from the `src` directory since it contains no cargo file.
31+
are reading. You can not run from the `src` directory since it contains no cargo file.

microbit/src/03-setup/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use panic_rtt_target as _;
55
use rtt_target::{rtt_init_print, rprintln};
66

7+
use cortex_m as _;
78
use cortex_m_rt::entry;
89

910
#[entry]

0 commit comments

Comments
 (0)