toys/esp32/rust
anjingyu 8aae745bad chore: update 2024-10-16 13:32:47 +08:00
..
web chore: update 2024-10-16 13:32:47 +08:00
README.md feat: esp32 rust 2024-10-15 16:55:19 +08:00

README.md

Setup

[!NOTE] Reference: https://docs.esp-rs.org/book/installation/riscv.html

# For no_std(bare-metal)
rustup toolchain install stable --component rust-src
rustup target add riscv32imc-unknown-none-elf # For ESP32-C2 and ESP32-C3
rustup target add riscv32imac-unknown-none-elf # For ESP32-C6 and ESP32-H2

# For std
rustup toolchain install nightly --component rust-src
cargo install ldproxy

cargo install cargo-generate
cargo install espflash

# cargo generate esp-rs/esp-template
cargo generate esp-rs/esp-idf-template cargo

Run the web example to print Hello, World:

# Load ESP-IDF environment
getidf
cargo build
cargo run