Skip to content

Commit 037b026

Browse files
committed
Updated with initial fs support
1 parent 467ed1d commit 037b026

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

bootloader.bin

0 Bytes
Binary file not shown.
Binary file not shown.

initial_fs.zip

306 KB
Binary file not shown.

tom_tool.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,20 @@
2525
for item in serial.tools.list_ports.comports():
2626
if item.manufacturer == "HackZone" and (result == "" or result == "Y" or result == "Yes" or result == "yes"):
2727
r = requests.get(url, allow_redirects=True)
28-
open('firmware.bin', 'wb').write(r.content)
29-
esptool.main(["-b", "115200", "-p", item.device, "erase_flash"])
30-
esptool.main(["--baud", "2000000", "--port", item.device, "--before", "default_reset", "--after", "hard_reset", "write_flash", "-z", "--flash_mode", "dio", "--flash_freq", "80m", "--flash_size", "detect", "0xd000", "ota_data_initial.bin", "0x1000", "bootloader.bin", "0x10000", "firmware.bin", "0x8000", "debug_4MB.bin"])
31-
28+
if r.ok:
29+
open('firmware.bin', 'wb').write(r.content)
30+
esptool.main(["-b", "115200", "-p", item.device, "erase_flash"])
31+
esptool.main(["--baud", "2000000", "--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"])
32+
print("""
33+
Flash succes!
34+
Further instructions:
35+
Initially 3 buttons light up, wait untill the whole display is dimly lit.
36+
Press diagonal from top left to bottom right afterwhich the buttons will turn green.
37+
Press the home button to reboot into you brand new badge!
38+
""")
39+
input("Press enter to exit")
40+
exit()
41+
else:
42+
input("Download failed ;(, press enter to exit")
43+
exit()
44+
input("Badge not detected :(, press enter to exit")

0 commit comments

Comments
 (0)