The esp32 is primarily made up of two chip architectures: RISC-V and Xtensa. RISC-V is typically a single-chip architecture, whereas the Xtensa is dual-core. When setting up a working environment with my esp32 in rust, I normally just use the espup tool kit because it makes it easier to install and maintain the components needed to develop Rust applications for the Xtensa and RISC-V architecture.
espup
To install espup
, run:
cargo install espup
Install all the necessary tools to develop Rust applications for all supported Espressif targets by running:
espup install
To setup environment varaibles checkout the Rust ESP book Part 3.
Using templates adds a layers of convienence because it generates a working project you all the dependencies you need to get started.
To generate a template first you will need to install esp-generate:
esp-generate is project generation tool that can be used to generate an application with all the required configurations and dependencies
cargo install esp-generate
Once it is done installing all you now need to do is to run it and specify the chip
esp-generate --chip=esp32c6 your-project
To learn more about esp-generate checkout Generating Projects from Templates The Rust on ESP Book