Skip to content

Commit 4be5253

Browse files
author
Johannes Draaijer
committed
Add an RTIC example
1 parent 17b5d76 commit 4be5253

File tree

3 files changed

+473
-2
lines changed

3 files changed

+473
-2
lines changed

.cargo/config

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
[target.thumbv7em-none-eabihf]
2-
runner = 'gdb'
2+
runner = 'probe-run'
33
rustflags = [
44
"-C", "link-arg=-Tlink.x",
5+
"-C", "link-arg=-Tdefmt.x",
56
]
67

78
[target.thumbv7m-none-eabi]
8-
runner = 'gdb'
9+
runner = 'probe-run'
910
rustflags = [
1011
"-C", "link-arg=-Tlink.x",
12+
"-C", "link-arg=-Tdefmt.x"
1113
]
1214

1315
[build]

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ ieee802_3_miim = { version = "0.7", optional = true }
2727
cortex-m = "0.7"
2828
log = { version = "0.4", optional = true }
2929

30+
# For rtic-telnet
31+
cortex-m-rtic = { version = "1.0", optional = true }
32+
defmt = { version = "0.3", optional = true }
33+
defmt-rtt = { version = "0.3", optional = true }
34+
panic-probe = { version = "0.3", optional = true, features = [ "print-defmt" ] }
35+
systick-monotonic = { version = "1.0", optional = true }
36+
fugit = { version = "0.3", optional = true}
37+
3038
[dependencies.smoltcp]
3139
version = "0.8"
3240
default-features = false
@@ -94,6 +102,10 @@ required-features = ["stm32f407"]
94102
name = "arp-smoltcp"
95103
required-features = ["stm32f407", "smoltcp-phy", "smoltcp/socket-icmp"]
96104

105+
[[example]]
106+
name = "rtic-echo"
107+
required-features = [ "ieee802_3_miim", "cortex-m-rtic", "smoltcp-phy", "smoltcp/defmt", "smoltcp/medium-ethernet", "smoltcp/socket-tcp", "defmt", "defmt-rtt", "panic-probe", "systick-monotonic", "fugit" ]
108+
97109
[profile.release]
98110
debug = 2
99111
lto = true

0 commit comments

Comments
 (0)