forked from adjih/schc-hackathon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (59 loc) · 2.47 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#---------------------------------------------------------------------------
#GITURL_PYCOM_MICROPYTHON?=https://gitlab.inria.fr/adjih/pycom-micropython -b module-libschic
#BOARD?=LOPY4
GITURL_MICROPYTHON?=https://github.com/micropython/micropython
M=micropython
#---------------------------------------------------------------------------
all: repos
#---------------------------------------------------------------------------
repos: schc-test schc-test-cedric ${M}
schc-test:
git clone --recursive https://github.com/dbarthel-ol/schc-test
schc-test-cedric:
git clone --recursive https://github.com/adjih/schc-test \
-b cedric-pycom schc-test-cedric
${M}:
git clone ${GITURL_MICROPYTHON}
cd ${M} && git submodule update --init
#---------------------------------------------------------------------------
native-build:
make ${M}
cd ${M}/ports/unix && make axtls
cd ${M}/ports/unix && make V=1
send: native-build
${M}/ports/unix/micropython test_schc.py send
recv: native-build
${M}/ports/unix/micropython test_schc.py recv
send_recv: native-build
${M}/ports/unix/micropython test_schc.py send_recv
run-upy:
${M}/ports/unix/micropython
#---------------------------------------------------------------------------
# S=schc-test-cedric
# SCHC_SOURCES = $(wildcard ${S}/schc*.py) \
# $(wildcard ${S}/micro_enum/[a-z]*.py) \
# $(wildcard ${S}/pybinutil/[a-z]*.py) \
# ${S}/debug_print.py
# PYFILELIST=test_schc.py
# LINKDIR=project/link
# link:
# test -e ${LINKDIR} || mkdir ${LINKDIR}
# for i in ${SCHC_SOURCES} ${PYFILELIST} ; do \
# (cd ${LINKDIR} && ln -vsf ../../$$i .) ; \
# done
#---------------------------------------------------------------------------
DEVICE1_TTY ?= /dev/ttyACM0
DEVICE2_TTY ?= /dev/ttyACM1
-include Makefile.local # override DEVICE1_TTY, DEVICE2_TTY here
link:
./gen-link-dir.sh sending ${DEVICE1_TTY} main-sending.py
./gen-link-dir.sh receiving ${DEVICE2_TYY} main-receiving.py
#---------------------------------------------------------------------------
link-send: native-build
cd project-sending && ../${M}/ports/unix/micropython test_schc.py send
link-recv: native-build
cd project-receiving && ../${M}/ports/unix/micropython test_schc.py recv
#---------------------------------------------------------------------------
cpy-send: ; python3 test_schc.py send
cpy-recv: ; python3 test_schc.py recv
#---------------------------------------------------------------------------