Skip to content

Commit 27b2f32

Browse files
authored
Merge pull request #38 from jessebraham/clap
Use clap instead of pico-args for cargo-espflash
2 parents af5bf78 + 2869852 commit 27b2f32

File tree

6 files changed

+213
-136
lines changed

6 files changed

+213
-136
lines changed

cargo-espflash/Cargo.toml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
11
[package]
22
name = "cargo-espflash"
33
version = "0.1.4"
4-
description = "Cargo subcommand for flashing the ESP8266 and ESP32 over serial"
5-
license = "GPL-2.0"
64
authors = [
75
"Robin Appelman <[email protected]>",
86
"Jesse Braham <[email protected]>",
97
]
10-
repository = "https://github.com/esp-rs/espflash"
118
edition = "2018"
9+
description = "Cargo subcommand for flashing Espressif devices over serial"
10+
repository = "https://github.com/esp-rs/espflash"
11+
license = "GPL-2.0"
12+
keywords = [
13+
"cargo",
14+
"cli",
15+
"embedded",
16+
"esp",
17+
"xtensa",
18+
]
19+
categories = [
20+
"command-line-utilities",
21+
"development-tools",
22+
"development-tools::cargo-plugins",
23+
"embedded",
24+
]
1225

1326
[dependencies]
14-
espflash = { version = "0.1.3", path = "../espflash" }
15-
pico-args = "0.4.0"
27+
anyhow = "1.0"
28+
cargo_metadata = "0.14"
29+
clap = "2.33"
30+
espflash = { version = "*", path = "../espflash" }
31+
guess_host_triple = "0.1"
32+
serde = { version = "1.0", features = ["derive"] }
1633
serial = "0.4"
17-
serde = { version = "1", features = ["derive"] }
1834
toml = "0.5"
19-
cargo_metadata = "0.14.0"
20-
guess_host_triple = "0.1.2"
21-
anyhow = "1.0"

cargo-espflash/README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
11
# `cargo-espflash`
22

3-
_ESP8266_ and _ESP32_ cross-compiler and serial flasher cargo subcommand.
3+
Cross-compiler and serial flasher cargo subcommand for Espressif devices. Currently supports __ESP32__, __ESP32-C3__, and __ESP8266__.
44

55
Prior to flashing, the project is built using the `build-std` unstable cargo feature. Please refer to the [cargo documentation](https://doc.rust-lang.org/cargo/reference/unstable.html#build-std) for more information.
66

77
## Usage
88

9-
```bash
10-
$ cargo espflash [--board-info] [--ram] [--release] [--example EXAMPLE] [--chip {esp32,esp8266}] <serial>
9+
```text
10+
cargo-espflash 0.1.4
11+
Cargo subcommand for flashing Espressif devices over serial
12+
13+
USAGE:
14+
cargo espflash [FLAGS] [OPTIONS] [SERIAL]
15+
16+
FLAGS:
17+
--board-info Display the connected board's information
18+
-h, --help Prints help information
19+
--ram Load the application to RAM instead of Flash
20+
--release Build the application using the release profile
21+
-V, --version Prints version information
22+
23+
OPTIONS:
24+
--example <EXAMPLE> Example to build and flash
25+
--features <FEATURES> Comma delimited list of build features
26+
--speed <SPEED> Baud rate at which to flash target device
27+
28+
ARGS:
29+
<SERIAL> Serial port connected to target device
1130
```
1231

1332
When the `--ram` option is specified, the provided ELF image will be loaded into ram and executed without touching the flash.

0 commit comments

Comments
 (0)