33 lines
669 B
Markdown
33 lines
669 B
Markdown
# Setup
|
|
|
|
> [!NOTE]
|
|
> Reference: https://docs.esp-rs.org/book/installation/riscv.html
|
|
|
|
|
|
``` bash
|
|
# 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`:
|
|
|
|
``` bash
|
|
# Load ESP-IDF environment
|
|
getidf
|
|
cargo build
|
|
cargo run
|
|
```
|
|
|