experimenting with esp32 upload scripts

This commit is contained in:
proddy
2020-08-30 20:33:26 +02:00
parent d6c6c7183e
commit 8ddbe6a442
3 changed files with 2974 additions and 0 deletions

15
scripts/upload_esp32.py Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env python
import subprocess
import os, argparse
print("\n** Starting upload...")
ap = argparse.ArgumentParser()
ap.add_argument("-p", "--port", required=True, help="port")
args = vars(ap.parse_args())
# esptool.py --chip esp32 --port "COM4" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader_dio_40m.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 EMS-ESP-dev-esp32.bin
subprocess.call(["esptool.py", "--chip esp32", "-p", args['port'], "--baud", "921600", "--before", "default_reset", "--after", "hard_reset", "write_flash", "-z", "--flash_mode", "dio", "--flash_freq", "40m","--flash_size", "detect", "0x1000", "bootloader_dio_40m.bin", "0x8000", "partitions.bin","0xe000", "boot_app0.bin", "0x10000", "EMS-ESP-dev-esp32.bin"])
print("\n** Finished upload.")