Skip to content

Commit 2279d3a

Browse files
authored
Remove support for the ESP8266 (#576)
* Remove support for the ESP8266 * Update `CHANGELOG.md` * Remove all remaining mentions of ESP8266
1 parent 8f43cc4 commit 2279d3a

File tree

23 files changed

+97
-639
lines changed

23 files changed

+97
-639
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3535
- Windows: Update RST/DTR order to avoid issues.
3636

3737
### Changed
38+
3839
- Created `FlashData`, `FlashDataBuilder` and `FlashSettings` structs to reduce number of input arguments in some functions (#512, #566)
3940
- `espflash` will now exit with an error if `defmt` is selected but not usable (#524)
4041
- Unify configuration methods (#551)
4142

4243
### Removed
4344

45+
- Remove support for the ESP8266 (#576)
46+
4447
## [2.1.0] - 2023-10-03
4548

4649
### Added

README.md

Lines changed: 1 addition & 1 deletion
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-H2**, **ESP32-P4**, **ESP32-S2/S3**, and **ESP8266**.
9+
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-H2**, **ESP32-P4**, and **ESP32-S2/S3**.
1010

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

cargo-espflash/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Cross-compiler and Cargo extension for flashing Espressif devices.
99

10-
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-H2**, **ESP32-P4**, **ESP32-S2/S3**, and **ESP8266**.
10+
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-H2**, **ESP32-P4**, and **ESP32-S2/S3**.
1111

1212
<!-- omit in toc -->
1313
## Table of Contents
@@ -57,6 +57,7 @@ cargo install cargo-espflash --features=raspberry
5757
```
5858

5959
By default, in Unix systems, we use the [`vendored-openssl` Cargo feature] which may require additional tools such as `perl` and `make`. To disable this feature, use:
60+
6061
```
6162
OPENSSL_NO_VENDOR=1 cargo install cargo-espflash
6263
```
@@ -117,6 +118,7 @@ If the `--bootloader` and/or `--partition-table` options are provided then these
117118
## Configuration File
118119

119120
The configuration file allows you to define various parameters for your application:
121+
120122
- Serial port:
121123
- By name:
122124
```toml
@@ -143,6 +145,7 @@ The configuration file allows you to define various parameters for your applicat
143145
```
144146

145147
You can have a local and/or a global configuration file:
148+
146149
- For local configurations, store the file under the current working directory with the name `espflash.toml`
147150
- Global file location differs based on your operating system:
148151
- Linux: `$HOME/.config/espflash/espflash.toml`
@@ -158,6 +161,7 @@ You can have a local and/or a global configuration file:
158161
## Logging Format
159162

160163
`cargo-espflash` `flash` and `monitor` subcommands support several logging formats using the `-L/--log-format` argument:
164+
161165
- `serial`: Default logging format
162166
- `defmt`: Uses [`defmt`] logging framework. With logging format, logging strings have framing bytes to indicate that they are `defmt` messages.
163167
- See [`defmt` section] of `esp-println` readme.

cargo-espflash/src/main.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ pub struct ErasePartsArgs {
164164
/// Input partition table
165165
#[arg(long, value_name = "FILE")]
166166
pub partition_table: Option<PathBuf>,
167-
/// Specify a (binary) package within a workspace which may provide a partition table
167+
/// Specify a (binary) package within a workspace which may provide a
168+
/// partition table
168169
#[arg(long)]
169170
pub package: Option<String>,
170171
}
@@ -244,18 +245,18 @@ pub fn erase_parts(args: ErasePartsArgs, config: &Config) -> Result<()> {
244245
.as_deref()
245246
.or(config.partition_table.as_deref());
246247

247-
let mut flash = connect(&args.connect_args, config, false, false)?;
248+
let mut flasher = connect(&args.connect_args, config, false, false)?;
248249
let partition_table = match partition_table {
249250
Some(path) => Some(parse_partition_table(path)?),
250251
None => None,
251252
};
252253

253254
info!("Erasing the following partitions: {:?}", args.erase_parts);
254-
let chip: Chip = flash.chip();
255-
erase_partitions(&mut flash, partition_table, Some(args.erase_parts), None)?;
256-
flash
255+
256+
erase_partitions(&mut flasher, partition_table, Some(args.erase_parts), None)?;
257+
flasher
257258
.connection()
258-
.reset_after(!args.connect_args.no_stub, chip)?;
259+
.reset_after(!args.connect_args.no_stub)?;
259260

260261
Ok(())
261262
}

espflash/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
A library and command-line tool for flashing Espressif devices.
1010

11-
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-H2**, **ESP32-P4**,**ESP32-S2/S3**, and **ESP8266**.
11+
Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-H2**, **ESP32-P4**, and **ESP32-S2/S3**.
1212

1313
<!-- omit in toc -->
1414
## Table of Contents
@@ -117,9 +117,11 @@ With this configuration you can flash and monitor you application using `cargo r
117117
## Using `espflash` as a Library
118118

119119
`espflash` can be used as a library in other applications:
120+
120121
```toml
121122
espflash = { version = "2.1", default-features = false }
122123
```
124+
123125
or `cargo add espflash --no-default-features`
124126

125127
> **Warning**
@@ -136,6 +138,7 @@ espflash = { version = "2.1", default-features = false, features = ["raspberry"]
136138
## Configuration File
137139

138140
The configuration file allows you to define various parameters for your application:
141+
139142
- Serial port:
140143
- By name:
141144
```toml
@@ -162,6 +165,7 @@ The configuration file allows you to define various parameters for your applicat
162165
```
163166

164167
You can have a local and/or a global configuration file:
168+
165169
- For local configurations, store the file under the current working directory with the name `espflash.toml`
166170
- Global file location differs based on your operating system:
167171
- Linux: `$HOME/.config/espflash/espflash.toml`
@@ -177,6 +181,7 @@ You can have a local and/or a global configuration file:
177181
## Logging Format
178182

179183
`espflash` `flash` and `monitor` subcommands support several logging formats using the `-L/--log-format` argument:
184+
180185
- `serial`: Default logging format
181186
- `defmt`: Uses [`defmt`] logging framework. With logging format, logging strings have framing bytes to indicate that they are `defmt` messages.
182187
- See [`defmt` section] of `esp-println` readme.

espflash/resources/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ https://github.com/espressif/esp-idf/tree/release/v5.1
55

66
The ESP32s flasher stubs are taken from the **esp-rs/esp-flasher-stub** repository:
77
https://github.com/esp-rs/esp-flasher-stub/releases/latest
8-
The ESP8266 flasher stub is taken from the **espressif/esptool** repository:
9-
https://github.com/espressif/esptool/tree/master/esptool/targets/stub_flasher

espflash/resources/stubs/stub_flasher_8266.toml

Lines changed: 0 additions & 5 deletions
This file was deleted.

espflash/src/bin/espflash.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,18 @@ pub fn erase_parts(args: ErasePartsArgs, config: &Config) -> Result<()> {
191191
return Err(Error::StubRequired.into());
192192
}
193193

194-
let mut flash = connect(&args.connect_args, config, false, false)?;
194+
let mut flasher = connect(&args.connect_args, config, false, false)?;
195195
let partition_table = match args.partition_table {
196196
Some(path) => Some(parse_partition_table(&path)?),
197197
None => None,
198198
};
199199

200200
info!("Erasing the following partitions: {:?}", args.erase_parts);
201-
let chip = flash.chip();
202-
erase_partitions(&mut flash, partition_table, Some(args.erase_parts), None)?;
203-
flash
201+
202+
erase_partitions(&mut flasher, partition_table, Some(args.erase_parts), None)?;
203+
flasher
204204
.connection()
205-
.reset_after(!args.connect_args.no_stub, chip)?;
205+
.reset_after(!args.connect_args.no_stub)?;
206206

207207
Ok(())
208208
}

0 commit comments

Comments
 (0)