11 releases (2 stable)
Uses new Rust 2024
| new 1.0.1 | Nov 5, 2025 |
|---|---|
| 0.6.0 | Oct 14, 2025 |
| 0.5.0 | Jul 16, 2025 |
| 0.3.1 | Mar 3, 2025 |
| 0.2.1 | Nov 26, 2024 |
#41 in Template engine
1,739 downloads per month
125KB
2K
SLoC
esp-generate
Template generation tool to create no_std applications targeting Espressif's line of SoCs and modules.
At present, this template supports the ESP32, ESP32-C2/C3/C6, ESP32-H2, and ESP32-S2/S3. Support for additional devices will be added as they become available.
Quickstart
To generate a project using this template:
- Install
esp-generate:
cargo install esp-generate --locked
You can also directly download pre-compiled release binaries or use cargo-binstall.
-
Generate a project. There are two options:
-
Using the Terminal User Interface (TUI):
esp-generateYou will be prompted to select a target chip and name for your project, after which you would use TUI to select the other options you need for your project.
-
Using the Command Line Interface (CLI), adding the options to the
esp-generatecommand:esp-generate --chip esp32 -o alloc -o wifi your-projectUse the
--headlessflag to avoid using the TUI.Replace the chip and project name accordingly, and select the desired options using the
-o/--optionflag. For a full list of available options, see Available Options section of this README.
-
Available Options
unstable-hal: Enables esp-hal features that may not be ready for general use yet.alloc: Enables allocations via theesp-alloccrate.wifi: Enables Wi-Fi via theesp-radiocrate; requiresalloc.ble-bleps: Enables BLE via theesp-radiocrate usingbleps; requiresalloc, mutually exclusive withble-trouble.ble-trouble: Enables BLE via theesp-radiocrate usingembassy-trouble; requiresalloc, mutually exclusive withble-bleps.embassy: Addsembassyframework support.stack-smashing-protection: Enables stack smashing protection. Requires nightly Rust.probe-rs: Replacesespflashwithprobe-rsand enables RTT-based options.flashing-probe-rs: Contains options that requireprobe-rs:defmt: Adds support fordefmtprinting. Usesrtt-targetas the RTT implementation.panic-rtt-target: Usespanic-rtt-targetas the panic handler.embedded-test: Enablesembedded-testsupport and generates a simple demo test case.
flashing-espflash: Contains options that requireespflash:log: Uses theloglibrary to print messages.defmt: Adds support fordefmtprinting. Usesesp-printlnand configuresespflashto decodedefmtlogs.esp-backtrace: Usesesp-backtraceas the panic handler.
optional: Enables the following set of options:wokwi: Adds support for Wokwi simulation using VS Code Wokwi extension.ciAdds GitHub Actions support with some basics checks.
editors: Select the editor integrations:helix: The Helix editorneovim: Neovimvscode: Visual Studio Codezed: The Zed editor
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~22–37MB
~523K SLoC