Standalone bench program (src/bin/sd_fat.rs, `just flash-sd`) that mounts FAT over the EPD's shared SPI2 bus and proves the persistence module's atomic save: write .tmp, fsync, rename, read back and compare. Runs SD-only: the EPD's SpiBusDriver holds an exclusive bus lock for its lifetime, so an arbitrated SD device can't be live alongside it yet. Keeps CRC required and maps a card that rejects CMD59 to a clear "use a genuine card" message rather than running the user's notes over an unchecked bus. sdkconfig gains CONFIG_FATFS_LFN_HEAP (the atomic-save .tmp name isn't valid 8.3) and, temporarily, CONFIG_LOG_MAXIMUM_LEVEL_DEBUG to read the drivers' per-command R1 bytes during bring-up.
56 lines
1.8 KiB
TOML
56 lines
1.8 KiB
TOML
[package]
|
|
name = "firmware"
|
|
version = "0.1.0"
|
|
authors = ["Julien Calixte <juliencalixte@gmail.com>"]
|
|
edition = "2024"
|
|
resolver = "2"
|
|
rust-version = "1.85"
|
|
# Declare every binary explicitly so a spike program under src/bin/ doesn't get
|
|
# an auto-discovered target with the default test harness (which trips up
|
|
# rust-analyzer — see README "harness = false" note).
|
|
autobins = false
|
|
|
|
[[bin]]
|
|
name = "firmware"
|
|
path = "src/main.rs"
|
|
harness = false # do not use the built-in cargo test harness -> resolve rust-analyzer errors
|
|
|
|
# Spike 6 — Wi-Fi + TLS. Standalone bench program, kept separate from the
|
|
# editor firmware. Flash with `just flash-wifi`.
|
|
[[bin]]
|
|
name = "wifi_tls"
|
|
path = "src/bin/wifi_tls.rs"
|
|
harness = false
|
|
|
|
# Spike 3 — SD card (FAT) over the shared SPI2 bus. Standalone bench program.
|
|
# Flash with `just flash-sd`.
|
|
[[bin]]
|
|
name = "sd_fat"
|
|
path = "src/bin/sd_fat.rs"
|
|
harness = false
|
|
|
|
[profile.release]
|
|
opt-level = "s"
|
|
|
|
[profile.dev]
|
|
debug = true # Symbols are nice, and they don't increase the size on Flash
|
|
opt-level = "z"
|
|
[patch.crates-io]
|
|
esp-idf-sys = { git = "https://github.com/esp-rs/esp-idf-sys.git" }
|
|
esp-idf-hal = { git = "https://github.com/esp-rs/esp-idf-hal.git" }
|
|
esp-idf-svc = { git = "https://github.com/esp-rs/esp-idf-svc.git" }
|
|
|
|
[dependencies]
|
|
anyhow = "1"
|
|
log = "0.4"
|
|
esp-idf-svc = { version = "0.52.1", features = ["critical-section", "embassy-time-driver", "embassy-sync"] }
|
|
# Remove `generic-queue-8` if you plan to use `embassy-time` WITH `embassy-executor`
|
|
embassy-time = { version = "0.5", features = ["generic-queue-8"] }
|
|
embedded-graphics = "0.8"
|
|
# Traits shared with esp-idf-svc (Spike 6 uses `embedded_svc::http::Method`).
|
|
# Already in the tree via esp-idf-svc; pinned here so the spike names it directly.
|
|
embedded-svc = "0.29"
|
|
|
|
[build-dependencies]
|
|
embuild = "0.33"
|