Skip to content

Commit 0a5d5e6

Browse files
Remove support for Raspberry Pi's internal UART peripherals (#585)
* feat: Remove raspberry feature * feat: Replace Interface types * feat: Remove interface mod * docs: Update changelog
1 parent fff36e4 commit 0a5d5e6

File tree

19 files changed

+105
-375
lines changed

19 files changed

+105
-375
lines changed

.github/actions/package/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ inputs:
44
required: false
55
github_token:
66
required: true
7-
features:
8-
required: false
97
target:
108
required: true
119
runs_on:
@@ -22,7 +20,7 @@ runs:
2220
- name: Build
2321
shell: bash
2422
run: |
25-
cargo build --release --all --target ${{ inputs.target }} ${{ inputs.features }}
23+
cargo build --release --all --target ${{ inputs.target }}
2624
2725
- name: Compress (Unix)
2826
if: ${{ inputs.runs_on != 'windows-2022' }}

.github/workflows/ci.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ jobs:
4343
- os: "ubuntu-22.04"
4444
target: "aarch64-unknown-linux-gnu"
4545
arch: "arm64"
46-
features: "--features=raspberry"
4746
- os: "ubuntu-22.04"
4847
target: "armv7-unknown-linux-gnueabihf"
4948
arch: "armhf"
50-
features: "--features=raspberry"
5149
runs-on: ${{ matrix.platform.os }}
5250

5351
steps:
@@ -59,7 +57,7 @@ jobs:
5957
arch: ${{ matrix.platform.arch }}
6058
target: ${{ matrix.platform.target }}
6159

62-
- run: cargo check ${{ matrix.platform.features }}
60+
- run: cargo check
6361

6462
check-lib:
6563
name: Check lib (${{ matrix.platform.target }})
@@ -71,10 +69,8 @@ jobs:
7169
arch: "x86_64"
7270
- target: "aarch64-unknown-linux-gnu"
7371
arch: "arm64"
74-
features: "--features=raspberry"
7572
- target: "armv7-unknown-linux-gnueabihf"
7673
arch: "armhf"
77-
features: "--features=raspberry"
7874
runs-on: ubuntu-22.04
7975

8076
steps:
@@ -86,7 +82,7 @@ jobs:
8682
arch: ${{ matrix.platform.arch }}
8783
target: ${{ matrix.platform.target }}
8884

89-
- run: cargo check -p espflash --lib --no-default-features ${{ matrix.platform.features }}
85+
- run: cargo check -p espflash --lib --no-default-features
9086

9187
msrv:
9288
name: Check MSRV (${{ matrix.platform.target }})
@@ -98,10 +94,8 @@ jobs:
9894
arch: "x86_64"
9995
- target: "aarch64-unknown-linux-gnu"
10096
arch: "arm64"
101-
features: "--features=raspberry"
10297
- target: "armv7-unknown-linux-gnueabihf"
10398
arch: "armhf"
104-
features: "--features=raspberry"
10599
runs-on: ubuntu-22.04
106100

107101
steps:
@@ -114,7 +108,7 @@ jobs:
114108
target: ${{ matrix.platform.target }}
115109
toolchain: "1.73"
116110

117-
- run: cargo check ${{ matrix.platform.features }}
111+
- run: cargo check
118112

119113
# --------------------------------------------------------------------------
120114
# Test
@@ -129,10 +123,8 @@ jobs:
129123
arch: "x86_64"
130124
- target: "aarch64-unknown-linux-gnu"
131125
arch: "arm64"
132-
features: "--features=raspberry"
133126
- target: "armv7-unknown-linux-gnueabihf"
134127
arch: "armhf"
135-
features: "--features=raspberry"
136128
runs-on: ubuntu-22.04
137129

138130
steps:
@@ -144,7 +136,7 @@ jobs:
144136
arch: ${{ matrix.platform.arch }}
145137
target: ${{ matrix.platform.target }}
146138

147-
- run: cargo test --lib ${{ matrix.platform.features }}
139+
- run: cargo test --lib
148140

149141
# --------------------------------------------------------------------------
150142
# Lint
@@ -159,10 +151,8 @@ jobs:
159151
arch: "x86_64"
160152
- target: "aarch64-unknown-linux-gnu"
161153
arch: "arm64"
162-
features: "--features=raspberry"
163154
- target: "armv7-unknown-linux-gnueabihf"
164155
arch: "armhf"
165-
features: "--features=raspberry"
166156
runs-on: ubuntu-22.04
167157

168158
steps:
@@ -175,7 +165,7 @@ jobs:
175165
target: ${{ matrix.platform.target }}
176166
components: clippy
177167

178-
- run: cargo clippy ${{ matrix.platform.features }} -- -D warnings -A clippy::too_many_arguments
168+
- run: cargo clippy -- -D warnings -A clippy::too_many_arguments
179169

180170
rustfmt:
181171
name: Rustfmt

.github/workflows/release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ jobs:
2424
- os: "ubuntu-20.04"
2525
target: "aarch64-unknown-linux-gnu"
2626
arch: "arm64"
27-
features: "--features=raspberry"
2827
- os: "ubuntu-20.04"
2928
target: "armv7-unknown-linux-gnueabihf"
3029
arch: "armhf"
31-
features: "--features=raspberry"
3230
# Windows
3331
- os: "windows-2022"
3432
target: "x86_64-pc-windows-msvc"
@@ -50,7 +48,6 @@ jobs:
5048
with:
5149
arch: ${{ matrix.platform.arch }}
5250
github_token: ${{ secrets.GITHUB_TOKEN }}
53-
features: ${{ matrix.platform.features }}
5451
target: ${{ matrix.platform.target }}
5552
runs_on: ${{ matrix.platform.os }}
5653

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4949

5050
- Remove support for the ESP8266 (#576)
5151
- Remove the direct boot image format (#577)
52+
- Remove support for Raspberry Pi's internal UART peripherals (#585)
5253

5354
## [2.1.0] - 2023-10-03
5455

Cargo.lock

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cargo-espflash/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ Alternatively, you can use [cargo-binstall] to download pre-compiled artifacts f
5050
cargo binstall cargo-espflash
5151
```
5252

53-
If you would like to flash from a Raspberry Pi using the built-in UART peripheral, you can enable the `raspberry` feature (note that this is not available if using [cargo-binstall]):
54-
55-
```bash
56-
cargo install cargo-espflash --features=raspberry
57-
```
58-
5953
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:
6054

6155
```

cargo-espflash/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ fn flash(args: FlashArgs, config: &Config) -> Result<()> {
352352
};
353353

354354
monitor(
355-
flasher.into_interface(),
355+
flasher.into_serial(),
356356
Some(&elf_data),
357357
pid,
358358
args.flash_args.monitor_baud.unwrap_or(default_baud),

espflash/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ md-5 = "0.10.6"
4747
miette = { version = "7.0.0", features = ["fancy"] }
4848
parse_int = { version = "0.6.0", optional = true }
4949
regex = { version = "1.10.3", optional = true }
50-
rppal = { version = "0.17.1", optional = true }
5150
serde = { version = "1.0.196", features = ["derive"] }
5251
serialport = { version = "4.3.0", optional = true }
5352
sha2 = "0.10.8"
@@ -85,4 +84,3 @@ cli = [
8584
]
8685
serialport = ["dep:serialport"]
8786

88-
raspberry = ["dep:rppal"]

espflash/README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ Alternatively, you can use [cargo-binstall] to download pre-compiled artifacts f
5252
cargo binstall espflash
5353
```
5454

55-
If you would like to flash from a Raspberry Pi using the built-in UART peripheral, you can enable the `raspberry` feature (note that this is not available if using [cargo-binstall]):
56-
57-
```bash
58-
cargo install espflash --features=raspberry
59-
```
60-
6155
[libuv]: https://libuv.org/
6256
[cargo-binstall]: https://github.com/cargo-bins/cargo-binstall
6357
[releases]: https://github.com/esp-rs/espflash/releases
@@ -129,12 +123,6 @@ or `cargo add espflash --no-default-features`
129123
130124
We disable the `default-features` to opt-out the `cli` feature, which is enabled by default; you likely will not need any of these types or functions in your application so there’s no use pulling in the extra dependencies.
131125

132-
Just like when using `espflash` as an application, you can enable the raspberry feature to allow your dependent application to use the Raspberry Pi’s built-in UART:
133-
134-
```toml
135-
espflash = { version = "2.1", default-features = false, features = ["raspberry"] }
136-
```
137-
138126
## Configuration File
139127

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

espflash/src/bin/espflash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ fn flash(args: FlashArgs, config: &Config) -> Result<()> {
287287
};
288288

289289
monitor(
290-
flasher.into_interface(),
290+
flasher.into_serial(),
291291
Some(&elf_data),
292292
pid,
293293
args.flash_args.monitor_baud.unwrap_or(default_baud),

0 commit comments

Comments
 (0)