Building & Testing ================== Commands for building the firmware, flashing it, and running the host-side tests and linters. For an end-user flashing guide see :doc:`../firmware/index`. Toolchain setup --------------- The Rust toolchain is pinned to ``channel = "esp"`` in ``rust-toolchain.toml``. The target is ``xtensa-esp32-espidf`` with ESP-IDF v5.5. Install the toolchain with `espup `_: .. code-block:: bash cargo install espup --locked espup install cat $HOME/export-esp.sh >> ~/.bashrc source ~/.bashrc cargo install cargo-generate espflash ldproxy Build & flash ------------- .. code-block:: bash cargo build # debug build cargo build --release # release build cargo run # flash + monitor (espflash runner in .cargo/config.toml) cargo espflash flash --monitor # alternative Unit tests ---------- The platform-independent modules are tested on the host (x86), **not** on the ESP32: .. code-block:: bash cargo test --lib --no-default-features --target x86_64-unknown-linux-gnu Linting ------- .. code-block:: bash cargo fmt --all -- --check cargo clippy --all-targets --all-features --workspace -- -D warnings