espressif/rust-esp32-example

Error when building: invalid toolchain name: 'esp'

gpanders opened this issue · 2 comments

I'm trying to build this example for an esp32c3. I've followed the instructions in the README to install the riscv32i-unknown-none-elf target. When I run idf.py build I get the following error:

[577/986] Performing configure step for 'rustlib_project'
FAILED: esp-idf/rustlib/stamp/rustlib_project-configure /Users/andg/src/esp/rust-esp32-example/build/esp-idf/rustlib/stamp/rustlib_project-configure
cd /Users/andg/src/esp/rust-esp32-example/components/rustlib && /opt/homebrew/Cellar/cmake/3.21.3_1/bin/cmake -E env CARGO_BUILD_TARGET=riscv32imc-esp-espidf CARGO_BUILD_TARGET_DIR=/Users/andg/src/esp/rust-esp32-example/build/esp-idf/rustlib/target cargo clean && /opt/homebrew/Cellar/cmake/3.21.3_1/bin/cmake -E touch /Users/andg/src/esp/rust-esp32-example/build/esp-idf/rustlib/stamp/rustlib_project-configure
error: invalid toolchain name: 'esp'

Are there further steps I need to perform for the ESP32c3?

I fixed it by changing

channel = "esp"

to

channel = "nightly"

in components/rustlib/rust-toolchain.toml.

Kxuan commented

I got the same problem. Maybe the solution should be written in README.md or somewhere else.