Skip to content

Commit 52da13c

Browse files
committed
Update README and .gitignore, fix CI (again)
1 parent c0069cb commit 52da13c

File tree

4 files changed

+62
-58
lines changed

4 files changed

+62
-58
lines changed

.github/workflows/package.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919
runs-on: ${{ inputs.runs_on }}
2020

2121
steps:
22-
- name: build dependencies
22+
- name: Change apt mirror and install dependencies
2323
if: ${{ inputs.runs_on == 'ubuntu-latest' }}
2424
run: |
25+
sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
26+
sudo apt-get update
2527
sudo apt-get install musl-tools libudev-dev
2628
2729
- uses: actions/checkout@v2

.github/workflows/rust.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ jobs:
1212
name: Check
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: build dependencies
15+
- name: Change apt mirror and install dependencies
1616
run: |
17+
sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
18+
sudo apt-get update
1719
sudo apt-get install musl-tools libudev-dev
1820
- uses: actions/checkout@v2
1921
- uses: actions-rs/toolchain@v1
@@ -30,8 +32,10 @@ jobs:
3032
name: Check MSRV
3133
runs-on: ubuntu-latest
3234
steps:
33-
- name: build dependencies
35+
- name: Change apt mirror and install dependencies
3436
run: |
37+
sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
38+
sudo apt-get update
3539
sudo apt-get install musl-tools libudev-dev
3640
- uses: actions/checkout@v2
3741
- uses: actions-rs/toolchain@v1
@@ -48,8 +52,10 @@ jobs:
4852
name: Unit Test
4953
runs-on: ubuntu-latest
5054
steps:
51-
- name: build dependencies
55+
- name: Change apt mirror and install dependencies
5256
run: |
57+
sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
58+
sudo apt-get update
5359
sudo apt-get install musl-tools libudev-dev
5460
- uses: actions/checkout@v2
5561
- uses: actions-rs/toolchain@v1
@@ -84,8 +90,10 @@ jobs:
8490
name: Clippy
8591
runs-on: ubuntu-latest
8692
steps:
87-
- name: build dependencies
93+
- name: Change apt mirror and install dependencies
8894
run: |
95+
sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
96+
sudo apt-get update
8997
sudo apt-get install musl-tools libudev-dev
9098
- uses: actions/checkout@v2
9199
- uses: actions-rs/toolchain@v1

.gitignore

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
/target
2-
/Cargo.lock
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug/
4+
target/
5+
6+
# These are backup files generated by rustfmt
7+
**/*.rs.bk
8+
9+
# MSVC Windows builds of rustc generate these, which store debugging information
10+
*.pdb
11+
12+
# Ignore any files used by text editors or operating systems.
13+
.vscode/
14+
.DS_Store
315
*.swp
4-
/.vscode

README.md

Lines changed: 33 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,95 +7,78 @@ Serial flasher utility for Espressif SoCs and modules based on [esptool.py].
77

88
Currently supports the **ESP32**, **ESP32-C3**, **ESP32-S2**, **ESP32-S3**, and **ESP8266**.
99

10-
This repository contains two applications:
10+
### cargo-espflash
1111

12-
| Application | Description |
13-
| :--------------- | :---------------------------------------------------------- |
14-
| [cargo-espflash] | Cargo subcommand for espflash |
15-
| [espflash] | Library and `espflash` binary (_without_ Cargo integration) |
12+
[cargo-espflash] is a subcommand for Cargo which utilizes the [espflash] library. This tool integrates with your Cargo projects and handles compilation, flashing, and monitoring of target devices.
1613

17-
> **NOTE:** requires `rustc >= 1.59.0` in order to build either application
14+
Please see the [cargo-espflash README] for more information.
1815

19-
## Installation
16+
#### Example
2017

2118
```shell
22-
$ cargo install cargo-espflash
23-
$ cargo install espflash
19+
$ cargo espflash --release --example=blinky /dev/ttyUSB0
2420
```
2521

26-
## cargo-espflash
22+
[cargo-espflash readme]: https://github.com/esp-rs/espflash/blob/master/cargo-espflash/README.md
2723

28-
[cargo-espflash] is a subcommand for Cargo which utilizes the [espflash] library. This tool integrates with your Cargo projects and handles compilation, flashing, and monitoring for target devices.
24+
### espflash
2925

30-
Please see the [cargo-espflash README] for more information.
26+
[espflash] is a standalone binary and library contained within the same crate. This tool does not integrate with Cargo, but supports all of the same features as [cargo-espflash] which are not related to compilation.
3127

32-
### Example
28+
Please see the [espflash README] for more information.
29+
30+
#### Example
3331

3432
```shell
35-
$ cargo espflash --release --example=blinky /dev/ttyUSB0
33+
$ espflash /dev/ttyUSB0 target/xtensa-esp32-none-elf/release/examples/blinky
3634
```
3735

38-
## espflash
36+
[espflash readme]: https://github.com/esp-rs/espflash/blob/master/espflash/README.md
37+
[esptool.py]: https://github.com/espressif/esptool
38+
[cargo-espflash]: https://github.com/esp-rs/espflash/tree/master/cargo-espflash
39+
[espflash]: https://github.com/esp-rs/espflash/tree/master/espflash
40+
41+
## Installation
3942

40-
[espflash] is a standalone binary and library contained within the same crate. This tool does not integrate with Cargo, but supports all of the same features as [cargo-espflash] which are not related to compilation.
43+
Either application can be installed using `cargo` as you normally would:
4144

42-
Please see the [espflash README] for more information.
45+
```shell
46+
$ cargo install cargo-espflash
47+
$ cargo install espflash
48+
```
4349

44-
### Example
50+
Alternatively, you can use [cargo-binstall] to install pre-compiled binaries on any supported system. Please check the [releases] to see which architectures and operating systems have pre-compiled binaries.
4551

4652
```shell
47-
$ espflash /dev/ttyUSB0 target/xtensa-esp32-none-elf/release/examples/blinky
53+
$ cargo binstall cargo-espflash
54+
$ cargo binstall espflash
4855
```
4956

57+
[cargo-binstall]: https://github.com/ryankurte/cargo-binstall
58+
[releases]: https://github.com/esp-rs/espflash/releases
59+
5060
## Notes on Building
5161

52-
In order to build from source, in addition to the Rust toolchain [libuv](https://libuv.org/) must be present on your system. This can be installed via most popular package managers.
62+
Requires `rustc >= 1.59.0` in order to build either application from source. In addition to the Rust toolchain [libuv](https://libuv.org/) must also be present on your system; this can be installed via most popular package managers.
5363

54-
### macOS
64+
#### macOS
5565

5666
```bash
5767
$ brew install libuv
5868
```
5969

60-
### Ubuntu
70+
#### Ubuntu
6171

6272
```bash
6373
$ sudo apt-get install libuv-dev
6474
```
6575

66-
### Fedora
76+
#### Fedora
6777

6878
```bash
6979
$ dnf install systemd-devel
7080
```
7181

72-
## Quickstart - Docker
73-
74-
The `esprs/espflash` Docker image contains all necessary toolchains and tooling (including espflash) to build an application and flash it to a target device.
75-
76-
To clone, build and flash the [esp32-hal] examples run the following:
77-
78-
```shell
79-
$ git clone https://github.com/esp-rs/esp32-hal
80-
$ cd esp32-hal
81-
$ docker run -v "$(pwd):/espflash" --device=/dev/ttyUSB0 -ti esprs/espflash --release --example=blinky /dev/ttyUSB0
82-
```
83-
84-
### Custom Docker Build
85-
86-
```shell
87-
$ git clone --depth 1 https://github.com/esp-rs/espflash.git
88-
$ cd espflash
89-
$ docker build -t esprs/espflash .
90-
```
91-
9282
## License
9383

9484
Licensed under the GNU General Public License Version 2. See [LICENSE](./espflash/LICENSE) for more details.
95-
96-
[esptool.py]: https://github.com/espressif/esptool
97-
[cargo-espflash]: https://github.com/esp-rs/espflash/tree/master/cargo-espflash
98-
[espflash]: https://github.com/esp-rs/espflash/tree/master/espflash
99-
[cargo-espflash readme]: https://github.com/esp-rs/espflash/blob/master/cargo-espflash/README.md
100-
[espflash readme]: https://github.com/esp-rs/espflash/blob/master/espflash/README.md
101-
[esp32-hal]: https://github.com/esp-rs/esp32-hal

0 commit comments

Comments
 (0)