Embedded Rust Setup #
For embedded development, once Rust itself is installed, you'll need to install the esp toolchain with
espup, then use it to install the esp toolchains. This will take a while.
# do this somewhere other than a rust project dir.
cargo install espup --locked
# add .cargo/bin to your path
export PATH="$PATH:/Users/username/.cargo/bin"
# then install the esp toolchains. This will take a while.
espup install
# source the env vars
. ~/export-esp.sh
# tool to generate new esp projects
cargo install esp-generate
# tool to flash the attached device
cargo install espflash --locked
# make a new esp project
esp-generate --chip=esp32s3 your-project
Leave the default options, hit 's', cd into the project, and build it! Make sure to enable 'log' so you can do the helloworld.
cd your-project
cargo build
cargo run
if you get a waiting for download message, press the RST button and run it again. Then you should see hello world printed.
switch power off press and hold the trackball switch power on have 2 seconds release the trackball
Also needed ESP-IDF
brew install cmake ninja dfu-util
T-Deck with Rust
I'm using the latest esp-hal, which is 1.0.0-beta.1 at the time of this writing (June 10st 2025) I can get the blinky example to compile, but since the t-deck doesn't have a user accessible GPIO pin that doesn't do anything.
I created a repo with examples for the Tdeck showing how to set up the display, connect to wifi, access the keyboard and trackball, and read the battery level.