forked from stm32-rs/stm32f3xx-hal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
214 lines (188 loc) · 6.12 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
[package]
edition = "2018"
authors = [
"Dylan Frankland <[email protected]>",
"Sh3Rm4n <[email protected]>",
"Jan Teske <[email protected]>"
]
categories = ["embedded", "hardware-support", "no-std"]
description = "Peripheral access API for STM32F3 series microcontrollers"
keywords = ["arm", "cortex-m", "stm32", "stm32f3", "hal"]
license = "MIT OR Apache-2.0"
name = "stm32f3xx-hal"
readme = "README.md"
repository = "https://github.com/stm32-rs/stm32f3xx-hal"
documentation = "https://docs.rs/stm32f3xx-hal"
version = "0.9.1"
exclude = [
"codegen",
".markdownlint.yml"
]
resolver = "2"
rust-version = "1.54"
[workspace]
members = [
".",
"testsuite",
"codegen"
]
[package.metadata.docs.rs]
features = ["stm32f303xc", "rt", "usb", "can", "enumset"]
targets = ["thumbv7em-none-eabihf"]
rustc-args = ["--cfg", "docsrs"]
[dependencies]
cfg-if = "1.0.0"
cortex-m = "0.7.4"
cortex-m-rt = "0.7"
defmt = { version = ">=0.2.3, <0.4.0", optional = true }
embedded-dma = "0.2.0"
embedded-hal = { version = "0.2.5", features = ["unproven"] }
embedded-time = "0.12.0"
nb = "1.0.0"
paste = "1.0.5"
rtcc = { version = "0.3.0", optional = true }
stm32f3 = { version = "0.14.0", default-features = false }
bxcan = { version = "0.6.2", optional = true }
stm32-usbd = { version = "0.6.0", optional = true }
void = { version = "1.0.2", default-features = false }
enumset = { version = "1.0.6", optional = true}
# NOTE: Workaround for build
# $ cargo +nightly update -Z minimal-versions
# as long cortex-m depends on bare-metal 0.2.1
bare-metal = "1.0.0"
[dev-dependencies]
cortex-m-semihosting = "0.3.7"
defmt = "0.3.0"
defmt-rtt = "0.3.0"
defmt-test = "0.3.0"
panic-probe = "0.3.0"
panic-semihosting = "0.5.6"
usbd-serial = "0.1.1"
usb-device = "0.2.8"
cortex-m-rtic = "1.0"
systick-monotonic = "1.0"
panic-rtt-target = { version = "0.1", features = ["cortex-m"] }
rtt-target = { version = "0.3.1", features = ["cortex-m"] }
[build-dependencies]
slice-group-by = "0.3.0"
[features]
default = ["rt", "ld", "usb", "can", "rtc", "enumset"]
device-selected = []
direct-call-deprecated = []
ld = []
rt = ["stm32f3/rt"]
can = ["bxcan"]
usb = ["stm32-usbd"]
rtc = ["rtcc"]
svd-f301 = ["stm32f3/stm32f301"]
svd-f302 = ["stm32f3/stm32f302"]
svd-f303 = ["stm32f3/stm32f303"]
svd-f373 = ["stm32f3/stm32f373"]
svd-f3x4 = ["stm32f3/stm32f3x4"]
mem-4 = []
mem-6 = []
mem-8 = []
mem-b = []
mem-c = []
mem-d = []
mem-e = []
gpio-f302 = []
gpio-f303 = []
gpio-f303e = []
gpio-f333 = []
gpio-f373 = []
# Any changes here should be mirrored in README.md, build.rs, src/lib.rs, and
# .github/workflows/ci.yml.
stm32f301 = ["svd-f301", "direct-call-deprecated"]
stm32f301x6 = ["stm32f301", "mem-6", "gpio-f302", "device-selected"]
stm32f301x8 = ["stm32f301", "mem-8", "gpio-f302", "device-selected"]
stm32f318 = ["svd-f301", "direct-call-deprecated"]
stm32f318x8 = ["stm32f318", "mem-8", "gpio-f302", "device-selected"]
stm32f302 = ["svd-f302", "direct-call-deprecated"]
stm32f302x6 = ["stm32f302", "mem-6", "gpio-f302", "device-selected"]
stm32f302x8 = ["stm32f302", "mem-8", "gpio-f302", "device-selected"]
stm32f302xb = ["stm32f302", "mem-b", "gpio-f303", "device-selected"]
stm32f302xc = ["stm32f302", "mem-c", "gpio-f303", "device-selected"]
stm32f302xd = ["stm32f302", "mem-d", "gpio-f303e", "device-selected"]
stm32f302xe = ["stm32f302", "mem-e", "gpio-f303e", "device-selected"]
stm32f303 = ["svd-f303", "direct-call-deprecated"]
stm32f303x6 = ["stm32f303", "mem-6", "gpio-f333", "device-selected"]
stm32f303x8 = ["stm32f303", "mem-8", "gpio-f333", "device-selected"]
stm32f303xb = ["stm32f303", "mem-b", "gpio-f303", "device-selected"]
stm32f303xc = ["stm32f303", "mem-c", "gpio-f303", "device-selected"]
stm32f303xd = ["stm32f303", "mem-d", "gpio-f303e", "device-selected"]
stm32f303xe = ["stm32f303", "mem-e", "gpio-f303e", "device-selected"]
stm32f328 = ["svd-f303", "direct-call-deprecated"]
stm32f328x8 = ["stm32f328", "mem-8", "gpio-f333", "device-selected"]
stm32f358 = ["svd-f303", "direct-call-deprecated"]
stm32f358xc = ["stm32f358", "mem-c", "gpio-f303", "device-selected"]
stm32f398 = ["svd-f303", "direct-call-deprecated"]
stm32f398xe = ["stm32f398", "mem-e", "gpio-f303e", "device-selected"]
stm32f373 = ["svd-f373", "direct-call-deprecated"]
stm32f373x8 = ["stm32f373", "mem-8", "gpio-f373", "device-selected"]
stm32f373xb = ["stm32f373", "mem-b", "gpio-f373", "device-selected"]
stm32f373xc = ["stm32f373", "mem-c", "gpio-f373", "device-selected"]
stm32f378 = ["svd-f373", "direct-call-deprecated"]
stm32f378xc = ["stm32f378", "mem-c", "gpio-f373", "device-selected"]
stm32f334 = ["svd-f3x4", "direct-call-deprecated"]
stm32f334x4 = ["stm32f334", "mem-4", "gpio-f333", "device-selected"]
stm32f334x6 = ["stm32f334", "mem-6", "gpio-f333", "device-selected"]
stm32f334x8 = ["stm32f334", "mem-8", "gpio-f333", "device-selected"]
defmt-default = ["defmt"]
defmt-trace = ["defmt"]
defmt-debug = ["defmt"]
defmt-info = ["defmt"]
defmt-warn = ["defmt"]
defmt-error = ["defmt"]
# cargo build/run
[profile.dev]
debug = 2
# Disabled until https://github.com/knurling-rs/defmt/issues/649 is fixed
# lto = true
# cargo test
[profile.test]
debug = 2
opt-level = 3 # <-
# cargo build/run --release
[profile.release]
debug = 2
# Disabled until https://github.com/knurling-rs/defmt/issues/649 is fixed
# lto = true
opt-level = "s"
# cargo test --release
[profile.bench]
debug = 2
opt-level = "s"
[[example]]
name = "pwm"
required-features = ["ld", "stm32f303xc"]
[[example]]
name = "toggle"
required-features = ["ld", "stm32f303xc"]
[[example]]
name = "usb_serial"
required-features = ["ld", "stm32f303xc", "usb"]
[[example]]
name = "spi"
required-features = ["ld", "stm32f303xc"]
[[example]]
name = "can"
required-features = ["ld", "rt", "can", "stm32f302xc"]
[[example]]
name = "serial_dma"
required-features = ["ld", "rt", "stm32f303xc"]
[[example]]
name = "serial_echo_rtic"
required-features = ["ld", "rt", "stm32f303xc", "enumset"]
[[example]]
name = "adc"
required-features = ["ld", "stm32f303xc"]
[[example]]
name = "i2c_scanner"
required-features = ["ld", "stm32f303xc"]
[[example]]
name = "gpio_erased"
required-features = ["ld", "stm32f303xc"]
[[example]]
name = "gpio_interrupts"
required-features = ["ld", "rt", "stm32f303xc"]