Skip to content

Instantly share code, notes, and snippets.

@tommyjtl
Last active July 28, 2018 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommyjtl/18335fa4debab222fea14747c067754b to your computer and use it in GitHub Desktop.
Save tommyjtl/18335fa4debab222fea14747c067754b to your computer and use it in GitHub Desktop.
function esp() {
python $[esptool.py] --port=$[espPort]"$@" write_flash -fm=dio -fs=32m 0x00000 $[esptoolFirmware]
}
function esptest() {
$esptool -vv -cd nodemcu -cb 460800 -cp $[espPort] -ca 0x00000 -cf $[testCode]
sleep 0.5
echo ""
echo "entering serial monitor..."
screen $[espPort] 115200
}
function esplist() {
while true
do
echo ""
ls /dev | grep cu.SLAB
sleep 0.5
done
}
@tommyjtl
Copy link
Author

tommyjtl commented Jul 28, 2018

test env: Python 2.7, macOS Sierra.

$[esptool.py]: /Users/tommyjtl/Documents/CocoRobo/esptool/esptool.py
$[esptoolFirmware]: /Users/tommyjtl/Documents/CocoRobo/esptool/nodemcu_integer_0.9.6-dev_20150704.bin
$[esptool]: your esptool script location, e.g. /Users/tommyjtl/Library/Arduino15/packages/esp8266/tools/esptool/0.4.9/esptool
$[testCode]: /Users/tommyjtl/Documents/CocoRobo/esptool/wifi-upload-test.ino.bin
$[espPort]: /dev/cu.SLAB_USBtoUART

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment