Playground for experimentation with the esp32c3-rust board.
espflash
and cargo-espflash
are optional. We use the imac
target with emulated atomics.
rustup target add riscv32imac-unknown-none-elf
cargo install cargo-espflash espflash
We use probe-rs
for the debugging.
cargo install probe-rs --features=cli
The --features=cli
is optional, adding a gdb
like user interface.
For now we want to generate binaries executable from flash. This is achieved through the direct-boot
build feature enabled by default (in the Cargo.toml
).
The .cargo/config.toml
sets the runner:
runner = 'probe-rs run --chip esp32c3'
This allows you to use cargo run
to flash and run your program, e.g.:
cargo run --example blinky_rtt
panic
using thertt_target
andpanic_rtt_target
.gpio_interrupt
, using theboot
pin to trigger an interrupt, theled
blinks independently, software interrupts run in background.blinky_rtt
similar togpio_interrupt
(but only blinking)blinky_usart
blinks and traces over both RTT and usart (not validated)serial_interrupt
some sort of weird serial cmd receiver (not validated)software_interrupt
triggers software interrupts periodically.
The .vscode
folder provides launch.json
and tasks.json
configuration files for using probe-rs-debugger in a seamless fashion.
The Cargo.toml
and .cargo/config
are now distilled to a minimum for experimentation. We rely on emulated atomics for imac
target, allowing us to use the current rtt_target
.