-
Notifications
You must be signed in to change notification settings - Fork 0
/
link.sh
executable file
·60 lines (53 loc) · 1.01 KB
/
link.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
#/!bin/bash
if [ $# -ne 2 ]
then
echo "Usage: $0 {dir-name} {lib-name}"
exit 1
fi
DIR=$1
LIB=$2
if [ -d "../$DIR" ]
then
echo $DIR OK
else
echo "$DIR directory not found!"
exit 1
fi
FILE=../$1/target/armv5te-unknown-linux-gnueabi/release/lib$LIB.a
if [ -f "$FILE" ]
then
echo $LIB OK
else
echo "$FILE file not found!"
exit 1
fi
cp $FILE base-objs/app.a && \
arm-none-eabi-gcc \
-Wl,-nmagic -nostdlib -pie \
-T base-objs/app.ld \
-o app \
base-objs/module_cfg.o \
base-objs/t_perror.o \
base-objs/strerror.o \
base-objs/vasyslog.o \
base-objs/tlsf.o \
base-objs/app.a \
base-objs/bluetooth-agent.o \
base-objs/ev3api.o \
base-objs/ev3api_cfg.o \
base-objs/ev3api_battery.o \
base-objs/ev3api_brick.o \
base-objs/ev3api_fs.o \
base-objs/ev3api_speaker.o \
base-objs/ev3api_lcd.o \
base-objs/ev3api_motor.o \
base-objs/ev3api_newlib.o \
base-objs/ev3api_sensor.o \
-lm -lc -lgcc
if [ -f app ]
then
file app
else
echo "app file not found!"
exit 1
fi