Drop postcard and serde dependencies entirely. All integers are now fixed-width little-endian on the wire — no varints, no zigzag encoding. A developer sending tx_power_dbm=14 sees 0x0E on the wire. No surprises. - RadioConfig: 10 bytes fixed (freq:4 LE, bw:1, sf:1, cr:1, sync:2 LE, pwr:1) - Commands/Responses: tag byte + fixed-size fields - Vec<u8>: 2-byte LE length prefix + raw bytes - Option<T>: 1-byte (0=None, 1=Some) + T - COBS framing preserved (just byte-stuffing, no encoding tricks) - Manual COBS decode replaces postcard's CobsAccumulator - Removes ~15KB from firmware binary (no serde monomorphization)
80 lines
2.3 KiB
TOML
80 lines
2.3 KiB
TOML
[package]
|
|
name = "donglora"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
build = "build.rs"
|
|
authors = ["Stephen Waits <steve@waits.net>"]
|
|
license = "MIT"
|
|
description = "Transparent LoRa radio over USB — plug in a board, talk LoRa from your host"
|
|
repository = "https://github.com/swaits/donglora"
|
|
readme = "README.md"
|
|
keywords = ["lora", "radio", "embedded", "usb", "firmware"]
|
|
categories = ["embedded", "hardware-support", "no-std"]
|
|
|
|
[dependencies]
|
|
cfg-if = "1.0"
|
|
critical-section = "1.2"
|
|
defmt = "0.3"
|
|
embassy-embedded-hal = "0.2"
|
|
embassy-executor = { version = "0.6", features = ["task-arena-size-32768"] }
|
|
embassy-sync = "0.6"
|
|
embassy-time = "0.3"
|
|
embassy-usb = { version = "0.3", features = ["defmt"] }
|
|
embassy-usb-driver = "0.1"
|
|
cobs = { version = "0.3", default-features = false }
|
|
heapless = "0.8"
|
|
lora-phy = "3.0"
|
|
static_cell = "2.1"
|
|
|
|
# Display rendering
|
|
display-interface = "0.5"
|
|
embedded-graphics = "0.8"
|
|
ssd1306 = { version = "0.10", features = ["async"] }
|
|
|
|
# Async IO traits and combinators
|
|
embedded-io-async = "0.6"
|
|
embassy-futures = "0.1"
|
|
|
|
# ESP32-S3 (Heltec V3) — requires esp toolchain (espup)
|
|
esp-backtrace = { version = "0.14", optional = true, features = ["esp32s3", "panic-handler", "exception-handler", "defmt"] }
|
|
esp-hal = { version = "0.22", optional = true, features = ["esp32s3"] }
|
|
esp-hal-embassy = { version = "0.5", optional = true, features = ["esp32s3"] }
|
|
esp-println = { version = "0.12", optional = true, features = ["esp32s3", "defmt-espflash"] }
|
|
|
|
# nRF52840 (RAK 4631)
|
|
cortex-m-rt = { version = "0.7", optional = true }
|
|
embassy-nrf = { version = "0.2", optional = true, features = ["nrf52840", "gpiote", "time-driver-rtc1", "defmt"] }
|
|
panic-probe = { version = "0.3", optional = true, features = ["print-defmt"] }
|
|
|
|
[build-dependencies]
|
|
minijinja = "2.0"
|
|
owo-colors = "4.0"
|
|
|
|
[features]
|
|
heltec_v3 = [
|
|
"dep:esp-backtrace",
|
|
"dep:esp-hal",
|
|
"dep:esp-hal-embassy",
|
|
"dep:esp-println",
|
|
"embassy-time/generic-queue-8",
|
|
]
|
|
heltec_v4 = [
|
|
"dep:esp-backtrace",
|
|
"dep:esp-hal",
|
|
"dep:esp-hal-embassy",
|
|
"dep:esp-println",
|
|
"embassy-time/generic-queue-8",
|
|
]
|
|
rak_wisblock_4631 = [
|
|
"dep:cortex-m-rt",
|
|
"dep:embassy-nrf",
|
|
"dep:panic-probe",
|
|
"embassy-executor/arch-cortex-m",
|
|
"embassy-executor/executor-thread",
|
|
]
|
|
|
|
[profile.release]
|
|
codegen-units = 1
|
|
lto = "fat"
|
|
opt-level = 3
|