opinionated bare-metal async Rust template for the ESP32-C3/C6, or about 450 lines of code I was going to write anyway.
this template can be built for both the C3 and C6:
- use
just r3to flash on C3, andjust r6to flash on C6. - use
just b3to build for C3, andjust b6to build for C6. - use
just c3to run Clippy for C3, andjust c6to run Clippy for C6.
the Justfile recipes automatically set the required build target and crate features.
the Nix flake exports 4 outputs: a dev shell, some checks, and 2 packages, one for each chip.
the dev shell contains common utilities for development: the Rust toolchain,
cargo-binutils, cargo-bloat, espflash, and just.
building the package generates an ELF binary, which can be converted into a
flat firmware image using espflash and flashed onto a module.
due to an issue with
espflash, the package doesn't generate this flat firmware image automatically.
this will be done in the future, once the issue is resolved.