Skip to content

Commit 56616fe

Browse files
committed
Changed to full erase
1 parent 777e0f3 commit 56616fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tom_tool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323

2424
result = input("Reflash? [Y/n]")
2525
for item in serial.tools.list_ports.comports():
26-
if item.manufacturer == "HackZone" and (result == "" or result == "Y" or result == "Yes" or result == "yes"):
26+
if item.vid == 0xCAFE and (result == "" or result == "Y" or result == "Yes" or result == "yes"):
2727
r = requests.get(url, allow_redirects=True)
2828
if r.ok:
2929
open('firmware.bin', 'wb').write(r.content)
30-
esptool.main(["-b", "115200", "-p", item.device, "erase_flash"])
31-
esptool.main(["--baud", "1000000", "--port", item.device, "--before", "default_reset", "--after", "hard_reset", "write_flash", "-z", "--flash_mode", "dio", "--flash_freq", "80m", "--flash_size", "detect", "0x1e1000", "initial_fs.zip", "0xd000", "ota_data_initial.bin", "0x1000", "bootloader.bin", "0x10000", "firmware.bin", "0x8000", "campzone2020_16MB.bin"])
30+
esptool.main(["--baud", "115200", "--port", item.device, "erase_flash"])
31+
esptool.main(["--baud", "115200", "--port", item.device, "--before", "default_reset", "--after", "hard_reset", "write_flash", "-z", "--flash_mode", "dio", "--flash_freq", "80m", "--flash_size", "detect", "0x1e1000", "initial_fs.zip", "0xd000", "ota_data_initial.bin", "0x1000", "bootloader.bin", "0x10000", "firmware.bin", "0x8000", "campzone2020_16MB.bin"])
3232
print("""
3333
Flash succes!
3434
Further instructions:

0 commit comments

Comments
 (0)