Skip to content

Commit a0b2435

Browse files
committed
Restructure the READMEs a bit to (hopefully) make information more discoverable
1 parent 06259e9 commit a0b2435

File tree

3 files changed

+65
-35
lines changed

3 files changed

+65
-35
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Serial flasher utilities for Espressif devices, based loosely on [esptool.py](https://github.com/espressif/esptool/).
88

9-
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-S2/S3**, **ESP32-H2** and **ESP8266**.
9+
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-H2**, **ESP32-S2/S3**, and **ESP8266**.
1010

1111
## [cargo-espflash](./cargo-espflash/)
1212

cargo-espflash/README.md

+35-20
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@
44
![MSRV](https://img.shields.io/badge/MSRV-1.65-blue?labelColor=1C2C2E&logo=Rust&style=flat-square)
55
![Crates.io](https://img.shields.io/crates/l/cargo-espflash?labelColor=1C2C2E&style=flat-square)
66

7-
Cross-compiler and Cargo extension for flashing Espressif devices over serial.
7+
Cross-compiler and Cargo extension for flashing Espressif devices.
88

9-
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-S2/S3**, **ESP32-H2** and **ESP8266**.
9+
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-H2**, **ESP32-S2/S3**, and **ESP8266**.
10+
11+
## Table of Contents
12+
13+
- [Installation](#installation)
14+
- [Usage](#usage)
15+
- [Permissions on Linux](#permissions-on-linux)
16+
- [Windows Subsystem for Linux](#windows-subsystem-for-linux)
17+
- [Bootloader and Partition Table](#bootloader-and-partition-table)
18+
- [Package Metadata](#package-metadata)
19+
- [Configuration File](#configuration-file)
1020

1121
## Installation
1222

@@ -48,28 +58,37 @@ cargo install cargo-espflash --features=raspberry
4858
## Usage
4959

5060
```text
51-
Cargo subcommand for flashing Espressif devices over serial
61+
Cargo subcommand for flashing Espressif devices
5262
53-
Usage: cargo espflash <COMMAND>
63+
Usage: cargo-espflash espflash <COMMAND>
5464
5565
Commands:
56-
board-info Display information about the connected board and exit without flashing
57-
completions Generate completions for the given shell. Resulting completions have to be appended to cargo's completions
58-
flash Flash an application to a target device
66+
board-info Establish a connection with a target device
67+
completions Generate completions for the given shell
68+
flash Build and flash an application to a target device
5969
monitor Open the serial monitor without flashing
6070
partition-table Operations for partitions tables
6171
save-image Save the image to disk instead of flashing to device
6272
help Print this message or the help of the given subcommand(s)
6373
6474
Options:
65-
-h, --help Print help information
66-
-V, --version Print version information
75+
-h, --help Print help
76+
-V, --version Print version
6777
```
6878

69-
> **Note**
70-
>
71-
> #### Permissions on Linux
72-
> In Linux, when using any of the commands that requires using a serial port, the current user may not have access to serial ports and a “Permission Denied” or “Port doesn’t exist” errors may appear. On most Linux distributions, the solution is to add the user to the `dialout` group (check e.g. `ls -l /dev/ttyUSB0` to find the group) with a command like `sudo usermod -a -G dialout $USER`. You can call `su - $USER` to enable read and write permissions for the serial port without having to log out and back in again. Check your Linux distribution’s documentation for more information.
79+
### Permissions on Linux
80+
81+
In Linux, when using any of the commands that requires using a serial port, the current user may not have access to serial ports and a "Permission Denied" or "Port doesn’t exist" errors may appear.
82+
83+
On most Linux distributions, the solution is to add the user to the `dialout` group (check e.g. `ls -l /dev/ttyUSB0` to find the group) with a command like `sudo usermod -a -G dialout $USER`. You can call `su - $USER` to enable read and write permissions for the serial port without having to log out and back in again.
84+
85+
Check your Linux distribution’s documentation for more information.
86+
87+
### Windows Subsystem for Linux
88+
89+
It is _not_ currently possible to use `cargo-espflash` from within WSL1. There are no plans to add support for WSL1 at this time.
90+
91+
It is also _not_ possible to flash chips using the built-in `USB_SERIAL_JTAG` peripheral when using WSL2, because resetting also resets `USB_SERIAL_JTAG` peripheral, which then disconnects the chip from WSL2. Chips _can_ be flashed via UART using WSL2, however.
7392

7493
## Bootloader and Partition Table
7594

@@ -90,7 +109,7 @@ partition_table = "partitions.csv" # Supports CSV and binary formats
90109
format = "direct-boot" # Can be 'esp-bootloader' or 'direct-boot'
91110
```
92111

93-
## Configuration
112+
## Configuration File
94113

95114
It's possible to specify a serial port and/or USB VID/PID values by setting them in a configuration file. The location of this file differs based on your operating system:
96115

@@ -103,24 +122,20 @@ It's possible to specify a serial port and/or USB VID/PID values by setting them
103122
### Configuration examples
104123

105124
You can either configure the serial port name like so:
125+
106126
```
107127
[connection]
108128
serial = "/dev/ttyUSB0"
109129
```
110130

111131
Or specify one or more USB `vid`/`pid` couple:
132+
112133
```
113134
[[usb_device]]
114135
vid = "303a"
115136
pid = "1001"
116137
```
117138

118-
## Windows Subsystem for Linux
119-
120-
It is not currently possible to use `cargo-espflash` from within WSL1.
121-
122-
It is not possible to flash chips using the built-in `USB_SERIAL_JTAG` when using WSL2, because the reset also resets `USB_SERIAL_JTAG` peripheral which then disconnects the chip from WSL2. Chips _can_ be flashed via UART using WSL2, however.
123-
124139
## License
125140

126141
Licensed under either of:

espflash/README.md

+29-14
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,19 @@
55
![MSRV](https://img.shields.io/badge/MSRV-1.65-blue?labelColor=1C2C2E&logo=Rust&style=flat-square)
66
![Crates.io](https://img.shields.io/crates/l/espflash?labelColor=1C2C2E&style=flat-square)
77

8-
A library and command-line tool for flashing Espressif devices over serial.
8+
A library and command-line tool for flashing Espressif devices.
99

10-
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-S2/S3**, **ESP32-H2** and **ESP8266**.
10+
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-H2**, **ESP32-S2/S3**, and **ESP8266**.
11+
12+
## Table of Contents
13+
14+
- [Installation](#installation)
15+
- [Usage](#usage)
16+
- [Permissions on Linux](#permissions-on-linux)
17+
- [Windows Subsystem for Linux](#windows-subsystem-for-linux)
18+
- [Cargo Runner](#cargo-runner)
19+
- [Bootloader and Partition Table](#bootloader-and-partition-table)
20+
- [Configuration File](#configuration-file)
1121

1222
## Installation
1323

@@ -49,7 +59,7 @@ cargo install espflash --features=raspberry
4959
## Usage
5060

5161
```text
52-
A command-line tool for flashing Espressif devices over serial
62+
A command-line tool for flashing Espressif devices
5363
5464
Usage: espflash <COMMAND>
5565
@@ -68,10 +78,19 @@ Options:
6878
-V, --version Print version
6979
```
7080

71-
> **Note**
72-
>
73-
> #### Permissions on Linux
74-
> In Linux, when using any of the commands that requires using a serial port, the current user may not have access to serial ports and a “Permission Denied” or “Port doesn’t exist” errors may appear. On most Linux distributions, the solution is to add the user to the `dialout` group (check e.g. `ls -l /dev/ttyUSB0` to find the group) with a command like `sudo usermod -a -G dialout $USER`. You can call `su - $USER` to enable read and write permissions for the serial port without having to log out and back in again. Check your Linux distribution’s documentation for more information.
81+
### Permissions on Linux
82+
83+
In Linux, when using any of the commands that requires using a serial port, the current user may not have access to serial ports and a "Permission Denied" or "Port doesn’t exist" errors may appear.
84+
85+
On most Linux distributions, the solution is to add the user to the `dialout` group (check e.g. `ls -l /dev/ttyUSB0` to find the group) with a command like `sudo usermod -a -G dialout $USER`. You can call `su - $USER` to enable read and write permissions for the serial port without having to log out and back in again.
86+
87+
Check your Linux distribution’s documentation for more information.
88+
89+
### Windows Subsystem for Linux
90+
91+
It is _not_ currently possible to use `cargo-espflash` from within WSL1. There are no plans to add support for WSL1 at this time.
92+
93+
It is also _not_ possible to flash chips using the built-in `USB_SERIAL_JTAG` peripheral when using WSL2, because resetting also resets `USB_SERIAL_JTAG` peripheral, which then disconnects the chip from WSL2. Chips _can_ be flashed via UART using WSL2, however.
7594

7695
### Cargo Runner
7796

@@ -84,7 +103,7 @@ runner = "espflash flash --baud=921600 --monitor /dev/ttyUSB0"
84103

85104
With this configuration you can flash and monitor you application using `cargo run`.
86105

87-
## Configuration
106+
## Configuration File
88107

89108
It's possible to specify a serial port and/or USB VID/PID values by setting them in a configuration file. The location of this file differs based on your operating system:
90109

@@ -97,24 +116,20 @@ It's possible to specify a serial port and/or USB VID/PID values by setting them
97116
### Configuration examples
98117

99118
You can either configure the serial port name like so:
119+
100120
```
101121
[connection]
102122
serial = "/dev/ttyUSB0"
103123
```
104124

105125
Or specify one or more USB `vid`/`pid` couple:
126+
106127
```
107128
[[usb_device]]
108129
vid = "303a"
109130
pid = "1001"
110131
```
111132

112-
## Windows Subsystem for Linux
113-
114-
It is not currently possible to use `espflash` from within WSL1.
115-
116-
It is not possible to flash chips using the built-in `USB_SERIAL_JTAG` when using WSL2, because the reset also resets `USB_SERIAL_JTAG` peripheral which then disconnects the chip from WSL2. Chips _can_ be flashed via UART using WSL2, however.
117-
118133
## License
119134

120135
Licensed under either of:

0 commit comments

Comments
 (0)