-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
71 lines (53 loc) · 1.75 KB
/
Makefile
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
MPY_HOME = ~/micropython
MPY_CROSS = $(MPY_HOME)/mpy-cross/build/mpy-cross
#OPT = -march=armv7emsp -O3 -X emit=native
OPT = -march=armv7emsp -O3 -X emit=bytecode
MPREMOTE = $(MPY_HOME)/tools/mpremote/mpremote.py
RSHELL = rshell -p /dev/ttyACM0 -b 115200
all: mpy_edukit.mpy ucontrol.mpy uencoder.mpy uL6474.mpy urepl.mpy mpy_repl_example.mpy
mpy_edukit.mpy: mpy_edukit.py
$(MPY_CROSS) $(OPT) -- $<
ucontrol.mpy: ucontrol.py
$(MPY_CROSS) $(OPT) -- $<
uencoder.mpy: uencoder.py
$(MPY_CROSS) $(OPT) -- $<
uL6474.mpy: uL6474.py
$(MPY_CROSS) $(OPT) -- $<
urepl.mpy: urepl.py
$(MPY_CROSS) $(OPT) -- $<
mpy_repl_example.mpy: mpy_repl_example.py
$(MPY_CROSS) $(OPT) -- $<
deploy:
# $(MPREMOTE) fs cp edukit_mp.mpy :
# $(MPREMOTE) fs cp ucontrol.mpy :
# $(MPREMOTE) fs cp uencoder.mpy :
# $(MPREMOTE) fs cp uL6474.mpy :
# $(MPREMOTE) fs cp urepl.mpy :
$(RSHELL) cp mpy_edukit.mpy /flash/
$(RSHELL) cp ucontrol.mpy /flash/
$(RSHELL) cp uencoder.mpy /flash/
$(RSHELL) cp uL6474.mpy /flash/
$(RSHELL) cp urepl.mpy /flash/
erase:
# $(MPREMOTE) fs rm :edukit_mp.mpy
# $(MPREMOTE) fs rm :ucontrol.mpy
# $(MPREMOTE) fs rm :uencoder.mpy
# $(MPREMOTE) fs rm :uL6474.mpy
# $(MPREMOTE) fs rm :urepl.mpy
$(RSHELL) rm /flash/mpy_edukit.mpy
$(RSHELL) rm /flash/ucontrol.mpy
$(RSHELL) rm /flash/uencoder.mpy
$(RSHELL) rm /flash/uL6474.mpy
$(RSHELL) rm /flash/urepl.mpy
erase_default:
# $(MPREMOTE) fs rm :boot.mpy
# $(MPREMOTE) fs rm :main.mpy
$(RSHELL) rm /flash/boot.py
$(RSHELL) rm /flash/main.py
pikchr: architecture.svg control_flow.svg
architecture.svg: ./img/architecture.pikchr
pikchr-cli ./img/architecture.pikchr > ./img/architecture.svg
control_flow.svg: ./img/control_flow.pikchr
pikchr-cli ./img/control_flow.pikchr > ./img/control_flow.svg
clean:
rm *.mpy