Skip to content

Commit

Permalink
Remove esptool patches, describe how to copy JSON files
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr authored and jessebraham committed Sep 5, 2023
1 parent cabb6d7 commit 4d97c62
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 130 deletions.
65 changes: 0 additions & 65 deletions Makefile_patched.patch

This file was deleted.

26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,27 @@ cargo xtask wrap esp32c3
cargo xtask wrap esp32 esp32s2 esp32s3
```

JSON stub files will be generated in the project root directory.

## Testing

In order to run `test_esptool.py` follow steps below:

- Build `esp-flasher-stub` as described in the section above.
- Clone `esptool` to the same directory where `esp-flasher-stub` resides.
- Run patched Makefile
- Clone `esptool`, if you don't have it yet:
```
git clone https://github.com/espressif/esptool
```
- Copy the stub JSON files into esptool installation. You can use the following one-liner:
```bash
for n in esp*.json; do cp $n $ESPTOOL_PATH/esptool/targets/stub_flasher/stub_flasher_${n#esp}; done
```
where `ESPTOOL_PATH` is set to the location where you have cloned `esptool`.
- Run tests

```bash
git clone https://github.com/espressif/esptool
cd esptool/flasher_stub/
git apply Makefile_patched.patch
make -C .
cd ../test
pytest test_esptool.py --port /dev/ttyUSB0 --chip esp32 --baud 115200
```
```bash
cd $ESPTOOL_PATH/test
pytest test_esptool.py --port /dev/ttyUSB0 --chip esp32 --baud 115200
```

## Debug logs

Expand Down
54 changes: 0 additions & 54 deletions esptool.patch

This file was deleted.

0 comments on commit 4d97c62

Please sign in to comment.