Hello, Board!
You're now ready to do a consistency check!
✅ Connect the USB-C port of the board to your computer and enter the hardware-check
directory in the workshop repository:
cd intro/hardware-check
To test Wi-Fi connectivity, you will have to provide your network name (SSID) and password (PSK). These credentials are stored in a dedicated cfg.toml
file (which is .gitignore
d) to prevent accidental disclosure by sharing source code or doing pull requests. An example is provided.
✅ Copy cfg.toml.example
to cfg.toml
(in the same directory) and edit it to reflect your actual credentials:
⚠️The 5 GHz band isn't supported in ESP32-C3, you need to ensure you are using a Wi-Fi with active 2.4 GHz band.
$ cp cfg.toml.example cfg.toml
$ $EDITOR cfg.toml
$ cat cfg.toml
[hardware-check]
wifi_ssid = "Your Wifi name"
wifi_psk = "Your Wifi password"
✅ Build, flash and monitor the project:
$ cargo run
Serial port: /dev/SERIAL_DEVICE
Connecting...
Chip type: ESP32-C3 (revision 3)
(...)
Compiling hardware-check v0.1.0
Finished release [optimized] target(s) in 1.78s
[00:00:45] ######################################## 418/418 segment 0x10000
Flashing has completed!
(...)
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
(...)
(...)
(...)
I (4427) wifi::wifi: Wifi connected!
🔎 If
cargo run
has been successful, you can exit withctrl+C
.
🔎
cargo run
is configured to useespflash
as custom runner. The same output can be achieved via:
- Using
cargo-espflash
:cargo espflash flash --release --monitor
- Building your project and flashing it with
espflash
:cargo build --release && espflash target/riscv32imc-esp-espidf/release/hardware-check
This modification is applied to all the projects in the training for convenience.
The board LED should turn yellow on startup, and then, depending on whether a Wi-Fi connection could be established, either turn red (error) or blink, alternating green and blue, in case of succeeding. In case of a Wi-Fi error, a diagnostic message will also show up at the bottom, e.g.:
Error: could not connect to Wi-Fi network: ESP_ERR_TIMEOUT
⚠️ You will get an
ESP_ERR_TIMEOUT
error also in case your network name or password are incorrect, so double-check those.
Extra Information About Building, Flashing and Monitoring
If you want to try to build without flashing, you can run:
cargo build
You can also monitor the device without flashing it with the following command:
espflash monitor
Simulation
This project is available for simulation through two methods:
- Wokwi project
- Wokwi VS Code extension:
- Press F1, select
Wokwi: Select Config File
, and chooseintro/hardware-check/wokwi.toml
. - Build your project.
- Press F1 again and select
Wokwi: Start Simulator
.
- Press F1, select
Troubleshooting
Build Errors
error[E0463]: can't find crate for `core`
= note: the `riscv32imc-esp-espidf` target may not be installed
You're trying to build with a stable
Rust - you need to use nightly
.
this error message is slightly misleading - this target cannot be installed. It needs to be built from source, using build-std
, which is a feature available on nightly only.
error: cannot find macro `llvm_asm` in this scope
You're using an incompatible version of nightly - configure a suitable one using rust-toolchain.toml
or cargo override
.
CMake Error at .../Modules/CMakeDetermineSystem.cmake:129 (message):
Your Espressif toolchain installation might be damaged. Delete it and rerun the build to trigger a fresh download:
rm -rf ~/.espressif
On Windows, delete %USERPROFILE%\.espressif
folder.
Serial port: /dev/tty.usbserial-110
Connecting...
Unable to connect, retrying with extra delay...
Unable to connect, retrying with default delay...
Unable to connect, retrying with extra delay...
Error: espflash::connection_failed
× Error while connecting to device
╰─▶ Failed to connect to the device
help: Ensure that the device is connected and the reset and boot pins are not being held down
The board isn't accessible with a USB-C cable. A typical connection error looks like this:
Workarounds:
- Press and hold boot button on the board, start flash command, release boot button after flashing process starts
- Use a hub.