First commit
Demo: programming an esp32 with embassy, the embedded async framework
This demo was tested on an esp32c3 devkitC. The esp32c3 is a risc-v processor.
Setup the rust toolchain for risc-v bare metal compilation:
rustup toolchain install stable --component rust-src --target riscv32imc-unknown-none-elf
Install espflash / cargo-espflash
Warning!! ubuntu users please read this before setting up espflash: installing libudev corrupts the ubuntu graphical desktop.
Connect an LED to GPIO7 of the esp32. Connect GPIO6 to ground through a momentary push button switch.
Clone this repo, build, flash and run the code:
git clone https://git.sr.ht/~pcein/rust-embassy-esp32-demo
cd rust-embassy-esp32-demo
cargo run --release
Press and release the button to toggle the blinking speed from fast to slow and vice versa.