Skip to content

Commit 7faeedd

Browse files
committed
move out most of text
see rust-embedded/book#20
1 parent 77a0685 commit 7faeedd

14 files changed

+126
-657
lines changed

.cargo/config

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
[target.thumbv7m-none-eabi]
2+
# uncomment this to make `cargo run` execute programs on QEMU
3+
# runner = "qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel"
4+
15
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
6+
# uncomment this to make `cargo run` start a GDB session
7+
# NOTE: you may need to change `arm-none-eabi-gdb`
8+
# runner = "arm-none-eabi-gdb -x openocd.gdb"
9+
210
rustflags = [
311
# LLD (shipped with the Rust toolchain) is used as the default linker
412
"-C", "link-arg=-Tlink.x",
@@ -20,4 +28,4 @@ rustflags = [
2028
# target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+
2129
target = "thumbv7m-none-eabi" # Cortex-M3
2230
# target = "thumbv7em-none-eabi" # Cortex-M4 and Cortex-M7 (no FPU)
23-
# target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)
31+
# target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)

Cargo.toml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
# TODO remove
2+
cargo-features = ["edition"]
3+
14
[package]
5+
edition = "2018"
26
authors = ["{{authors}}"]
37
name = "{{project-name}}"
48
version = "0.1.0"
59

610
[dependencies]
7-
cortex-m = "0.5.6"
8-
cortex-m-rt = "0.5.3"
11+
cortex-m = "0.5.7"
12+
cortex-m-rt = "0.6.1"
913
cortex-m-semihosting = "0.3.1"
10-
panic-semihosting = "0.4.0"
14+
panic-halt = "0.1.3"
1115

1216
# Uncomment for the panic example.
1317
# panic-itm = "0.3.0"
@@ -16,11 +20,17 @@ panic-semihosting = "0.4.0"
1620
# alloc-cortex-m = "0.3.5"
1721

1822
# Uncomment for the device example.
19-
# [dependencies.stm32f103xx]
23+
# [dependencies.stm32f30x]
2024
# features = ["rt"]
21-
# version = "0.10.0"
25+
# version = "0.7.1"
26+
27+
# this lets you use `cargo fix`!
28+
[[bin]]
29+
name = "{{project-name}}"
30+
test = false
31+
bench = false
2232

2333
[profile.release]
2434
codegen-units = 1 # better optimizations
25-
debug = true
35+
debug = true # symbols are nice and they don't increase the size on Flash
2636
lto = true # better optimizations

0 commit comments

Comments
 (0)