Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for the ESP8266 #576

Merged
merged 3 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Windows: Update RST/DTR order to avoid issues.

### Changed

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

### Removed

- Remove support for the ESP8266 (#576)

## [2.1.0] - 2023-10-03

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down
6 changes: 5 additions & 1 deletion cargo-espflash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Cross-compiler and Cargo extension for flashing Espressif devices.

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

<!-- omit in toc -->
## Table of Contents
Expand Down Expand Up @@ -57,6 +57,7 @@ cargo install cargo-espflash --features=raspberry
```

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:

```
OPENSSL_NO_VENDOR=1 cargo install cargo-espflash
```
Expand Down Expand Up @@ -117,6 +118,7 @@ If the `--bootloader` and/or `--partition-table` options are provided then these
## Configuration File

The configuration file allows you to define various parameters for your application:

- Serial port:
- By name:
```toml
Expand All @@ -143,6 +145,7 @@ The configuration file allows you to define various parameters for your applicat
```

You can have a local and/or a global configuration file:

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

`cargo-espflash` `flash` and `monitor` subcommands support several logging formats using the `-L/--log-format` argument:

- `serial`: Default logging format
- `defmt`: Uses [`defmt`] logging framework. With logging format, logging strings have framing bytes to indicate that they are `defmt` messages.
- See [`defmt` section] of `esp-println` readme.
Expand Down
13 changes: 7 additions & 6 deletions cargo-espflash/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ pub struct ErasePartsArgs {
/// Input partition table
#[arg(long, value_name = "FILE")]
pub partition_table: Option<PathBuf>,
/// Specify a (binary) package within a workspace which may provide a partition table
/// Specify a (binary) package within a workspace which may provide a
/// partition table
#[arg(long)]
pub package: Option<String>,
}
Expand Down Expand Up @@ -244,18 +245,18 @@ pub fn erase_parts(args: ErasePartsArgs, config: &Config) -> Result<()> {
.as_deref()
.or(config.partition_table.as_deref());

let mut flash = connect(&args.connect_args, config, false, false)?;
let mut flasher = connect(&args.connect_args, config, false, false)?;
let partition_table = match partition_table {
Some(path) => Some(parse_partition_table(path)?),
None => None,
};

info!("Erasing the following partitions: {:?}", args.erase_parts);
let chip: Chip = flash.chip();
erase_partitions(&mut flash, partition_table, Some(args.erase_parts), None)?;
flash

erase_partitions(&mut flasher, partition_table, Some(args.erase_parts), None)?;
flasher
.connection()
.reset_after(!args.connect_args.no_stub, chip)?;
.reset_after(!args.connect_args.no_stub)?;

Ok(())
}
Expand Down
7 changes: 6 additions & 1 deletion espflash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

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

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

`espflash` can be used as a library in other applications:

```toml
espflash = { version = "2.1", default-features = false }
```

or `cargo add espflash --no-default-features`

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

The configuration file allows you to define various parameters for your application:

- Serial port:
- By name:
```toml
Expand All @@ -162,6 +165,7 @@ The configuration file allows you to define various parameters for your applicat
```

You can have a local and/or a global configuration file:

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

`espflash` `flash` and `monitor` subcommands support several logging formats using the `-L/--log-format` argument:

- `serial`: Default logging format
- `defmt`: Uses [`defmt`] logging framework. With logging format, logging strings have framing bytes to indicate that they are `defmt` messages.
- See [`defmt` section] of `esp-println` readme.
Expand Down
2 changes: 0 additions & 2 deletions espflash/resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ https://github.com/espressif/esp-idf/tree/release/v5.1

The ESP32s flasher stubs are taken from the **esp-rs/esp-flasher-stub** repository:
https://github.com/esp-rs/esp-flasher-stub/releases/latest
The ESP8266 flasher stub is taken from the **espressif/esptool** repository:
https://github.com/espressif/esptool/tree/master/esptool/targets/stub_flasher
5 changes: 0 additions & 5 deletions espflash/resources/stubs/stub_flasher_8266.toml

This file was deleted.

10 changes: 5 additions & 5 deletions espflash/src/bin/espflash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,18 @@ pub fn erase_parts(args: ErasePartsArgs, config: &Config) -> Result<()> {
return Err(Error::StubRequired.into());
}

let mut flash = connect(&args.connect_args, config, false, false)?;
let mut flasher = connect(&args.connect_args, config, false, false)?;
let partition_table = match args.partition_table {
Some(path) => Some(parse_partition_table(&path)?),
None => None,
};

info!("Erasing the following partitions: {:?}", args.erase_parts);
let chip = flash.chip();
erase_partitions(&mut flash, partition_table, Some(args.erase_parts), None)?;
flash

erase_partitions(&mut flasher, partition_table, Some(args.erase_parts), None)?;
flasher
.connection()
.reset_after(!args.connect_args.no_stub, chip)?;
.reset_after(!args.connect_args.no_stub)?;

Ok(())
}
Expand Down
Loading
Loading