cargo-espflash
Cross-compiler and serial flasher cargo subcommand for Espressif devices. Currently supports ESP32, ESP32-S3, ESP32-C3, and ESP8266.
Prior to flashing, the project is built using the build-std unstable cargo feature. Please refer to the cargo documentation for more information.
Usage
cargo-espflash 1.0.0
Cargo subcommand for flashing Espressif devices over serial
USAGE:
cargo espflash [FLAGS] [OPTIONS] [SERIAL]
FLAGS:
--board-info Display the connected board's information
-h, --help Prints help information
--monitor Open a serial monitor after flashing
--ram Load the application to RAM instead of Flash
--release Build the application using the release profile
-V, --version Prints version information
OPTIONS:
--bootloader <PATH> Path to a binary (.bin) bootloader file
--example <EXAMPLE> Example to build and flash
--features <FEATURES> Comma delimited list of build features
--partition-table <PATH> Path to a CSV file containing partition table
--speed <SPEED> Baud rate at which to flash target device
ARGS:
<SERIAL> Serial port connected to target device
When the --ram option is specified, the provided ELF image will be loaded into ram and executed without touching the flash.
Config
You can also specify the serial port by setting it in the config file located at ~/.config/espflash/espflash.toml or Linux
or %APPDATA%/esp/espflash/espflash.toml on Windows.
[]
= "/dev/ttyUSB0"
Package metadata
You can also specify the bootloader or partition table for a project in the package metadata in Cargo.toml
[]
= "partitions.csv"
= "bootloader.bin"
Example
License
Licensed under the GNU General Public License Version 2. See LICENSE for more details.