Giter VIP home page Giter VIP logo

esp-flasher-stub's Introduction

esp-flasher-stub

GitHub Workflow Status MSRV

Rust implementation of flasher stub located in esptool.

Supports the ESP32, ESP32-C2/C3/C6, and ESP32-S2/S3. Currently UART is the only supported transport mode, however support for more is planned.

Quickstart

In order to build the flasher stub, you must provide a feature to cargo selecting the device, and additionally specify the target.

ESP32

 cargo +esp build --features=esp32 --target=xtensa-esp32-none-elf --release

ESP32-C2

 cargo build --features=esp32c2 --target=riscv32imc-unknown-none-elf --release

ESP32-C3

 cargo build --features=esp32c3 --target=riscv32imc-unknown-none-elf --release

ESP32-C6

 cargo build --features=esp32c6 --target=riscv32imac-unknown-none-elf --release

ESP32-S2

 cargo +esp build --features=esp32s2 --target=xtensa-esp32s2-none-elf --release

ESP32-S3

 cargo +esp build --features=esp32s3 --target=xtensa-esp32s3-none-elf --release

Testing

In order to run test_esptool.py follow steps below:

  • Build esp-flasher-stub as described in the build section above.
  • Clone esptool to the same directory where esp-flasher-stub resides.
git clone https://github.com/espressif/esptool
  • Run patched Makefile
cd esptool/flasher_stub/
git apply Makefile_patched.patch
make -C .
  • Run tests
cd ../test
pytest test_esptool.py --port /dev/ttyUSB0 --chip esp32 --baud 115200

Debug logs

In order to use debug logs you have to build the project with dprint feature, for example:
cargo build --release --target riscv32imc-unknown-none-elf --features esp32c3,dprint

and then you can view logs using, for example screen: sudo screen /dev/ttyUSB2 115200

Warning

For ESP32 and ESP32S2, please use baud rate 57600 instead: sudo screen /dev/ttyUSB2 57600

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

esp-flasher-stub's People

Contributors

jessebraham avatar jurajsadel avatar mavalki avatar playfulfence avatar sergiogasquez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.