forked from aeickho/md380tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (29 loc) · 892 Bytes
/
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
RELEASE=md380tools-`date "+%Y-%m-%d"`
all: applets
clean:
cd patches/2.032 && make clean
# cd firmware && make clean
cd applet && make clean
rm -f *~ *.pyc
patches: firmwares
cd patches/2.032 && make all
applets: patches
cd applet && make all
firmwares:
cd firmware && make all
flash:
cd applet && make flash
flashdb:
cd db && make clean update
cat db/users.csv | cut -d',' -f1-3,5-6 | sed 's/,\s+/,/g' > data.csv
wc -c < data.csv > data
cat data.csv >> data
./md380-tool spiflashwrite data 0x100000
dist: applets
rm -rf $(RELEASE)
mkdir -p $(RELEASE)/python
cp applet/experiment.bin $(RELEASE)/firmware-`date "+%Y-%m-%d"`.bin
cd $(RELEASE) && unzip ../firmware/D002.032.zip
mv $(RELEASE)/Firmware\ 2.32 $(RELEASE)/windows
rm $(RELEASE)/windows/MD-380-D2.32\(AD\).bin $(RELEASE)/windows/Operation.doc.pdf
cp DFU.py 99-md380.rules md380-dfu md380-tool $(RELEASE)/python/