bash scripts, such as for flashing & erasing micropython binaries to ESP32/8266.
- Python 3.5+
- esptools.py
- ampy
*.bin |
#!/usr/bin/env bash | |
esptool.py --port /dev/ttyUSB0 erase_flash |
#!/usr/bin/env bash | |
INPUT1=$1 | |
INPUT2=$2 | |
esptool.py --chip $INPUT1 --port /dev/ttyUSB0 write_flash --flash_size=detect 0 $INPUT2 |
MIT License | |
Copyright (c) 2020 Contributors of micropython-esp-utils | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all | |
copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
SOFTWARE. |
#!/usr/bin/env bash | |
ampy -p /dev/ttyUSB0 ls |
adafruit-ampy | |
esptool |
# | |
# This file is autogenerated by pip-compile | |
# To update, run: | |
# | |
# pip-compile | |
# | |
adafruit-ampy==1.0.7 # via -r requirements.in | |
click==7.1.2 # via adafruit-ampy | |
ecdsa==0.16.0 # via esptool | |
esptool==2.8 # via -r requirements.in | |
pyaes==1.6.1 # via esptool | |
pyserial==3.4 # via adafruit-ampy, esptool | |
python-dotenv==0.15.0 # via adafruit-ampy | |
six==1.15.0 # via ecdsa |
#!/usr/bin/env bash | |
picocom /dev/ttyUSB0 -b 115200 |