Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
125 lines (106 loc) · 2.79 KB
/
Copy pathCargo.toml
File metadata and controls
125 lines (106 loc) · 2.79 KB
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
[package]
name = "fc-rusty"
version = "0.0.1"
rust-version= "1.85.0"
edition = "2024"
license = "MIT"
[lib]
name = "fc_rusty"
path = "src/lib.rs"
[[bin]]
name = "fc-firmware"
path = "src/main.rs"
required-features = ["firmware"]
[[example]]
name = "sim_hover"
path = "examples/sim_hover.rs"
required-features = []
[[example]]
name = "sim_mpc_hover"
path = "examples/sim_mpc_hover.rs"
required-features = []
[[example]]
name = "sim_kf_hover"
path = "examples/sim_kf_hover.rs"
required-features = []
[[example]]
name = "sim_gps_rescue"
path = "examples/sim_gps_rescue.rs"
required-features = []
# ---- Features ----
# "firmware" pulls in all Embassy/Cortex-M/defmt deps for the embedded binary.
# Disable it (--no-default-features) to build the library and sim examples
# on the host for desktop simulation.
[features]
default = ["firmware"]
firmware = [
"dep:embassy-executor",
"dep:embassy-stm32",
"dep:embassy-time",
"dep:embassy-sync",
"dep:embassy-futures",
"dep:cortex-m",
"dep:cortex-m-rt",
"dep:defmt",
"dep:defmt-rtt",
"dep:panic-probe",
"dep:static_cell",
]
# ---- Always-available dependencies ----
# These compile for both embedded (no_std) and host (std) targets.
[dependencies]
# Math
nalgebra = { version = "0.34", default-features = false, features = ["libm"] }
libm = "0.2"
# MPC solver
tinympc-rs = { path = "src/control/tinympc-rs", default-features = false }
# ---- Firmware-only dependencies (optional) ----
# Pulled in by the "firmware" feature. All marked optional = true.
# Embassy executor — runs our async tasks
embassy-executor = { version = "0.9", optional = true, features = [
"arch-cortex-m",
"executor-thread",
"executor-interrupt",
"defmt",
] }
# Embassy STM32 HAL
embassy-stm32 = { version = "0.4", optional = true, features = [
"stm32f407ve",
"memory-x",
"time-driver-tim5",
"exti",
"defmt",
] }
# Embassy time
embassy-time = { version = "0.5", optional = true, features = [
"defmt",
"defmt-timestamp-uptime",
"tick-hz-32_768",
] }
# Embassy sync
embassy-sync = { version = "0.7", optional = true, features = ["defmt"] }
# Embassy futures
embassy-futures = { version = "0.1", optional = true }
# Cortex-M support
cortex-m = { version = "0.7", optional = true, features = [
"inline-asm",
"critical-section-single-core",
] }
cortex-m-rt = { version = "0.7", optional = true }
# Debugging / logging
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.4", optional = true }
panic-probe = { version = "0.3", optional = true, features = ["print-defmt"] }
# Static allocation
static_cell = { version = "2", optional = true }
# ---- Build profiles ----
[profile.dev]
opt-level = "s"
debug = 2
strip="debuginfo"
lto="fat"
[profile.release]
opt-level = "z"
debug = 2
lto = "fat"
codegen-units = 1