forked from m-labs/milkymist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_demo.sh
executable file
·85 lines (77 loc) · 1.65 KB
/
build_demo.sh
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
#!/bin/bash
BASEDIR=`pwd`
LOGFILEHOST=$BASEDIR/tools.log
LOGFILE=$BASEDIR/software.log
echo "================================================================================"
echo "Building Milkymist demo firmware"
echo ""
echo "Log file (host): $LOGFILEHOST"
echo "Log file (target): $LOGFILE"
echo "================================================================================"
echo ""
BASEDIR=`pwd`
echo -n "Building host utilities..."
cd $BASEDIR/tools
echo >> $LOGFILEHOST
date >> $LOGFILEHOST
make >> $LOGFILEHOST 2>&1
if [ "$?" != 0 ] ; then
echo "FAILED"
exit 1
else
echo "OK"
fi
echo -n "Building USB firmware..."
cd $BASEDIR/softusb-input
echo >> $LOGFILE
make >> $LOGFILE 2>&1
if [ "$?" != 0 ] ; then
echo "FAILED"
exit 1
else
echo "OK"
fi
echo "Building embedded software:"
echo -n " Base library..."
echo >> $LOGFILE
cd $BASEDIR/software/libbase && make >> $LOGFILE 2>&1
if [ "$?" != 0 ] ; then
echo "FAILED"
exit 1
else
echo "OK"
fi
echo -n " Math library..."
cd $BASEDIR/software/libmath && make >> $LOGFILE 2>&1
if [ "$?" != 0 ] ; then
echo "FAILED"
exit 1
else
echo "OK"
fi
echo -n " HAL..."
cd $BASEDIR/software/libhal && make >> $LOGFILE 2>&1
if [ "$?" != 0 ] ; then
echo "FAILED"
exit 1
else
echo "OK"
fi
echo -n " FPVM library..."
cd $BASEDIR/software/libfpvm && make >> $LOGFILE 2>&1
if [ "$?" != 0 ] ; then
echo "FAILED"
exit 1
else
echo "OK"
fi
echo -n " Demonstration firmware..."
cd $BASEDIR/software/demo && make >> $LOGFILE 2>&1
if [ "$?" != 0 ] ; then
echo "FAILED"
exit 1
else
echo "OK"
fi
cd $BASEDIR
echo "Build complete!"