/
deployall.py
47 lines (30 loc) · 987 Bytes
/
deployall.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/python
#mainPath = "./regimes/04_rainbow/main.py"
mainPath = None
from time import sleep
from six.moves import input
from config import putFile, resetBoard
from flash.retrieve import run as flashRetrieve
from flash.deploy import run as flashDeploy
from modules.deploy import run as modulesDeploy
from replserver.deploy import run as replserverDeploy
def runFlash():
print("Checking Micropython image retrieved")
flashRetrieve()
print("Deploying Micropython image")
flashDeploy()
sleep(4)
def runInstall():
print("Deploying Modules")
modulesDeploy()
print("Deploying REPLServer")
replserverDeploy()
if mainPath is not None:
print("Deploying Application main.py file")
putFile(mainPath, "main.py")
def run():
runFlash()
runInstall()
print('All modules, replserver boot and application main files deployed. Now unplug the cockle to ensure it resets \a\a\a')
if __name__ == "__main__":
run()