forked from esp-rs/esp-flasher-stub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Miscellaneous cleanup and formatting
- Loading branch information
1 parent
a230ef8
commit 9fc6dad
Showing
6 changed files
with
91 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,48 @@ | ||
# esp-flasher-stub | ||
|
||
Rust implementation of flasher stub located in esptool. | ||
Currently only supports ESP32C3 through UART. | ||
Rust implementation of flasher stub located in [esptool](https://github.com/espressif/esptool/). | ||
|
||
Currently only supports ESP32-C3 through UART. | ||
|
||
## Build | ||
|
||
``` | ||
cargo build | ||
``` | ||
|
||
## Test | ||
|
||
``` | ||
cargo test --target=x86_64-unknown-linux-gnu | ||
``` | ||
|
||
## Run esptool test | ||
Since esptool uses precompiled stub binaries located in `stub_flasher.py`, | ||
|
||
Since esptool uses precompiled stub binaries located in `stub_flasher.py`, | ||
binary for ESP32C3 has to be replaced the one otained from `esp-flasher-stub`. | ||
|
||
In order to run `test_esptool.py` follow steps below: | ||
* Build `esp-flasher-stub` with `cargo build --release` | ||
* Clone esptool to the same directory where `esp-flasher-stub` resides. | ||
|
||
- Build `esp-flasher-stub` with `cargo build --release` | ||
- Clone esptool to the same directory where `esp-flasher-stub` resides. | ||
|
||
``` | ||
git clone https://github.com/espressif/esptool | ||
``` | ||
* Navigate to `esptool`, checkout version for which patch located in `esp-flasher-stub` directory was created and apply it. | ||
|
||
- Navigate to `esptool`, checkout version for which patch located in `esp-flasher-stub` directory was created and apply it. | ||
|
||
``` | ||
cd esptool | ||
git checkout 6488ebb | ||
git am ../../esp-flasher-stub/esptool.patch | ||
``` | ||
* Regenerate `stub_flasher.py` by running patched Makefile and run the tests | ||
|
||
- Regenerate `stub_flasher.py` by running patched Makefile and run the tests | ||
|
||
``` | ||
cd test | ||
make -C ../flasher_stub/ && python test_esptool.py /dev/ttyUSB0 esp32c3 115200 | ||
``` | ||
This last step requires IDF to be exported. | ||
|
||
This last step requires IDF to be exported. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters