-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCargo.toml
More file actions
147 lines (138 loc) · 5.63 KB
/
Copy pathCargo.toml
File metadata and controls
147 lines (138 loc) · 5.63 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
[package]
name = "esp-csi-cli-rs"
version = "0.8.0"
edition = "2024"
# This crate is firmware, not a library or a host application: the build product
# is an image flashed to an ESP32, so there is nothing for a crates.io consumer
# to depend on. It ships as source plus a git tag. The library it drives,
# `esp-csi-rs`, is the published artifact.
publish = false
[features]
default = ["no-std", "println", "auto", "statistics"]
## Build without the standard library.
no-std = []
## Enable logging via `println!()`.
println = ["esp-csi-rs/println", "esp-backtrace/println"]
## Automatically select the best available backend for the target.
auto = ["esp-csi-rs/auto"]
## Non-blocking async logging: packet serialization/output is delegated to an
## async driver so heavy I/O never blocks the executor. Keeping logging
## non-blocking is critical for collection throughput — it prevents dropped CSI
## packets under load. Enabled automatically by `jtag-serial` (see below). When
## set on its own it is unstable; combine it with `jtag-serial`, not `uart`.
async-print = ["esp-csi-rs/async-print"]
## Expose runtime PPS / rate / drop + ESP-NOW TX counters via the `show-stats` command.
statistics = ["esp-csi-rs/statistics"]
## Enable logging via defmt (lowest device-to-host transfer overhead).
##
## Combines with EVERY transport: `auto`, `jtag-serial` and `uart` all link.
##
## This note used to say the opposite — that `defmt` and `async-print` each register a defmt
## `#[global_logger]` and so fail to link with `_defmt_acquire` multiply defined, which ruled out
## `jtag-serial`. That is not what happened. There is one `#[global_logger]`, in `esp-csi-rs`, and
## `jtag-serial` pulling in `async-print` is what used to switch it on. The real failure was the
## reverse: `defmt` + `uart` reached neither `async-print` nor `auto`, so NO logger was registered
## and the link failed on three *undefined* `_defmt_*` symbols.
##
## It matters because `defmt` + `uart` is the only combination available on the ESP32, which has no
## USB-Serial-JTAG peripheral. Fixed in esp-csi-rs: the gate now asks whether defmt is on and any
## transport exists.
defmt = [
"esp-csi-rs/defmt",
"esp-backtrace/defmt",
]
## Force the JTAG backend for logging. Pulls in `async-print` (non-blocking
## logging), which is mandatory here: the JTAG backend can block under sustained
## CSI load, and a blocked log write stalls the collection hot path and drops
## packets. This is the recommended setup for maximum collection throughput with
## `println`/serialized output. The explicit `async-print` here keeps this
## crate's own feature flag in sync (esp-csi-rs 0.8.0 no longer auto-enables
## `async-print` from `jtag-serial`).
## Combines with `defmt` — see the `defmt` feature above, which used to claim otherwise.
jtag-serial = ["esp-csi-rs/jtag-serial", "async-print"]
## Force the UART backend for logging (not recommended, much slower than JTAG backend).
## Do NOT combine with `async-print`: UART is already blocking and slow, so the
## async path adds overhead without benefit (and risks unexpected behavior).
uart = ["esp-csi-rs/uart"]
## Support for the ESP32
esp32 = [
"esp-csi-rs/esp32"
]
## Support for the ESP32-C3
esp32c3 = [
"esp-csi-rs/esp32c3"
]
## Support for the ESP32-C5
esp32c5 = [
"esp-csi-rs/esp32c5"
]
## Support for the ESP32-C6
esp32c6 = [
"esp-csi-rs/esp32c6"
]
## Support for the ESP32-S3 (AIoT)
esp32s3 = [
"esp-csi-rs/esp32s3"
]
[dependencies]
esp-bootloader-esp-idf = "0.5.0"
esp-backtrace = { version = "0.19.0", features = [
"panic-handler",
# Call our `custom_halt` (which reboots) after printing a panic, instead
# of parking the CPU forever — a halted board is unreachable over serial
# and needs a physical button press, which defeats webserver automation.
"custom-halt",
] }
esp-hal = { version = "~1.1", default-features = false, features = [
"unstable",
] }
esp-rtos = { version = "0.3.0", optional = false, features = [
"embassy",
"esp-alloc",
"esp-radio",
] }
esp-println = { version = "0.17.0", default-features = false }
esp-alloc = { version = "0.10.0" }
embedded-io-async = "0.7.0"
# 0.7 version of embedded-io, exposed under an alias because the workspace
# also pulls in 0.6.1 for the `menu` crate (still on 0.6.x). Both crates need
# their own ErrorType/Write impls on `SerialInterface`.
embedded-io-07 = { package = "embedded-io", version = "0.7.1" }
esp-radio = { version = "0.18.0", default-features = false, optional = false, features = [
"wifi",
"sniffer",
"esp-alloc",
"unstable",
"esp-now",
"csi",
] }
heapless = { version = "0.9.3", default-features = false }
embassy-executor = { version = "0.10.0" }
embassy-time = { version = "0.5.1" }
static_cell = { version = "2.1.1" }
embassy-sync = { version = "0.8.0" }
embassy-futures = { version = "0.1.2" }
esp-csi-rs = { version = "0.11", default-features = false }
# `default-features = false` disables menu's per-keystroke echo. The CLI does
# its own echo in the byte-stream preprocessor (main.rs) so that quote chars
# and in-quote spaces render correctly — menu's echo would otherwise repaint
# the buffer with the 0x1F sentinel (invisible) where the user typed a space.
menu = { version = "0.6.1", default-features = false }
embedded-io = "0.6.1"
[profile.dev]
# Rust debug is too slow.
# For debug builds always builds with some optimization
incremental = true
debug = 2
opt-level = "s"
[profile.dev.package."*"]
opt-level = 3
[profile.release]
codegen-units = 1 # LLVM can perform better optimizations using a single thread
debug-assertions = false
incremental = false
lto = 'fat'
opt-level = 3
overflow-checks = false
[profile.release.package."*"]
opt-level = 3