File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed
Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ # inside esp8266_deauther/esp8266_deauther
4+ # call this script
5+ # python3 ../utils/arduino-cli-compile.py 2.5.0
6+
7+ import subprocess
8+ import os
9+ import sys
10+
11+ boards = [
12+ "NODEMCU" ,
13+ "WEMOS_D1_MINI" ,
14+ "DEAUTHER" ,
15+ "DEAUTHER_V1" ,
16+ "DEAUTHER_V2" ,
17+ "DEAUTHER_V3" ,
18+ "DEAUTHER_V3_5" ,
19+ "D_DUINO_B_V5_LED_RING" ,
20+ "DEAUTHER_BOY" ,
21+ "NODEMCU_07" ,
22+ "NODEMCU_07_V2" ,
23+ "DEAUTHER_OLED" ,
24+ "DEAUTHER_OLED_V1_5_S" ,
25+ "DEAUTHER_OLED_V1_5" ,
26+ "DEAUTHER_OLED_V2" ,
27+ "DEAUTHER_OLED_V2_5" ,
28+ "DEAUTHER_OLED_V3" ,
29+ "DEAUTHER_OLED_V3_5" ,
30+ "DEAUTHER_OLED_V4" ,
31+ "DEAUTHER_OLED_V5" ,
32+ "DEAUTHER_OLED_V6" ,
33+ "DEAUTHER_MOSTER" ,
34+ "DEAUTHER_MOSTER_V2" ,
35+ "DEAUTHER_MOSTER_V3" ,
36+ "DEAUTHER_MOSTER_V4" ,
37+ "DEAUTHER_MOSTER_V5" ,
38+ "USB_DEAUTHER" ,
39+ "USB_DEAUTHER_V2" ,
40+ "DEAUTHER_WRISTBAND" ,
41+ "DEAUTHER_WATCH" ,
42+ "DEAUTHER_WATCH_V2" ,
43+ "DEAUTHER_MINI" ,
44+ "DEAUTHER_MINI_EVO" ,
45+ "LYASI_7W_E27_LAMP" ,
46+ "AVATAR_5W_E14_LAMP" ,
47+ ]
48+
49+ version = sys .argv [1 ]
50+
51+ folder = f"build_{ version } "
52+ os .system (f"mkdir { folder } " )
53+
54+ for board in boards :
55+ print (f"Compiling { board } ..." , end = "" , flush = True )
56+ os .system (f"arduino-cli cache clean" );
57+ command = f"arduino-cli compile --fqbn deauther:esp8266:d1_mini --build-properties \" build.extra_flags=-DESP8266 -D{ board } \" --output-dir { folder } "
58+ process = subprocess .Popen (command , shell = True , stdout = subprocess .PIPE )
59+ process .wait ()
60+ os .system (f"mv { folder } /esp8266_deauther.ino.bin { folder } /esp8266_deauther_{ version } _{ board } .bin" )
61+ print (f"OK" )
62+
63+ os .system ("rm build/*.elf && rm build/*.map" )
64+ print ("Finished :)" )
You can’t perform that action at this time.
0 commit comments