annotate configure-tms470.sh @ 106:5ba0bee90efa

build system: new configuration naming mechanism
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 23 Jul 2018 16:38:50 +0000
parents 5c4db73d289a
children 225e39652387
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
44
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 #!/bin/sh
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 set -e
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
98
5fe5853f4e63 old configure.sh script is now configure-tms470.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 45
diff changeset
5 if [ ! -f configure-tms470.sh ]
44
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 echo "This script needs to be run from the top of the source tree" 1>&2
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 exit 1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 if [ ! -f helpers/makeline ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 echo "Please run make in the helpers directory first" 1>&2
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 exit 1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 # start looking at our invokation line
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 if [ "$1" = --clean ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 clean_flag=1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 shift
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 else
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 clean_flag=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 if [ $# -lt 1 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 echo "usage: $0 [--clean] target [vars]" 1>&2
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 exit 1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 TARGET="$1"
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 if [ ! -f "targets/$TARGET.conf" -o ! -f "targets/$TARGET.h" ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 echo "Error: target $TARGET not known" 1>&2
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 exit 1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 # target defaults that can be overridden by $TARGET.conf
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 CHIPSET=10
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 DSP=36
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 RF=12
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 DISABLE_SLEEP=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 . "targets/$TARGET.conf"
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 # settings derived from the target-defined DSP version
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 case "$DSP" in
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 33)
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 AMR=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 L1_DYN_DSP_DWNLD=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 L1_VOICE_MEMO_AMR=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 MELODY_E2=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 SPEECH_RECO=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 ;;
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 34)
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 AMR=1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 L1_DYN_DSP_DWNLD=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 L1_VOICE_MEMO_AMR=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 MELODY_E2=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 SPEECH_RECO=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 ;;
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 36)
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 AMR=1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 L1_DYN_DSP_DWNLD=1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 L1_VOICE_MEMO_AMR=1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 MELODY_E2=1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 SPEECH_RECO=1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 ;;
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 *)
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 echo "Error: DSP=$DSP setting not understood" 1>&2
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 exit 1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 esac
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 # miscellaneous configurable feature settings
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 ALLOW_CSIM_GSM=1
105
5c4db73d289a build system support for memory supervision
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
82 MEMSUPER=0
44
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 SERIAL_DYNAMIC_SWITCH=0
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 TR_BAUD_CONFIG=TR_BAUD_115200
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85
106
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
86 SUFFIX=
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
87
44
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 # allow the user to override these defaults
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 shift
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 while [ $# != 0 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 do
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 eval "$1"
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 shift
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 done
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96
106
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
97 # validate key settings and build configuration name
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
98
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
99 case "$SRVC" in
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
100 0)
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
101 CONFIG_NAME=vo
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
102 ;;
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
103 1)
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
104 CONFIG_NAME=fd
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
105 ;;
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
106 2)
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
107 CONFIG_NAME=da
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
108 ;;
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
109 *)
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
110 echo "Error: SRVC=$SRVC setting is invalid" 1>&2
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
111 exit 1
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
112 esac
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
113
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
114 case "$GPRS" in
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
115 0)
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
116 ;;
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
117 1)
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
118 CONFIG_NAME=gprs
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
119 ;;
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
120 *)
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
121 echo "Error: GPRS=$GPRS setting is invalid" 1>&2
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
122 exit 1
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
123 esac
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
124
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
125 case "$FCHG_STATE" in
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
126 0)
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
127 ;;
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
128 1)
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
129 CONFIG_NAME="$CONFIG_NAME-chg"
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
130 ;;
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
131 *)
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
132 echo "Error: FCHG_STATE=$FCHG_STATE setting is invalid" 1>&2
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
133 exit 1
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
134 esac
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
135
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
136 CONFIG_NAME="$CONFIG_NAME$SUFFIX-470"
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
137 BUILD_DIR="build-$TARGET-$CONFIG_NAME"
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
138
44
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 echo "Building firmware for target $TARGET in $BUILD_DIR"
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 if [ "$clean_flag" = 1 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 rm -rf $BUILD_DIR
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 mkdir -p $BUILD_DIR
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 : > $BUILD_DIR/lcfgen
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 # shell functions to be used in the configuration recipe
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 build_lib() {
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 if [ $# != 1 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 echo "Error: build_lib takes 1 argument" 1>&2
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 exit 1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 scripts/mk-component.sh "$1"
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 SUBDIR="$SUBDIR $1"
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 current_lib=$1/$1.lib
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 LIBS="$LIBS $current_lib"
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 }
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 rts_blob_lib() {
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 if [ $# != 1 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 echo "Error: rts_blob_lib takes 1 argument" 1>&2
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 exit 1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 current_lib="../tms470/rts/$1.lib"
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 LIBS="$LIBS $current_lib"
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 }
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 lib_link_magic() {
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 if [ $# != 1 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 echo "Error: lib_link_magic takes 1 argument" 1>&2
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 exit 1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 if [ -z "$current_lib" ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 echo "Error: lib_link_magic called before build_lib or blob_lib" 1>&2
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 exit 1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 SPECIAL_LINK_LIBS="$SPECIAL_LINK_LIBS $current_lib"
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 echo "$1" >> $BUILD_DIR/lcfgen
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 }
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 # invoke the configuration recipe
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 export BUILD_DIR TARGET
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 export CHIPSET DSP RF
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 export AMR L1_DYN_DSP_DWNLD L1_VOICE_MEMO_AMR MELODY_E2 SPEECH_RECO
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 export DISABLE_SLEEP
105
5c4db73d289a build system support for memory supervision
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
194 export ALLOW_CSIM_GSM MEMSUPER SERIAL_DYNAMIC_SWITCH TR_BAUD_CONFIG
44
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 export GPRS SRVC FCHG_STATE
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 scripts/config-headers.sh
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 SUBDIR=
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 LIBS=
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 SPECIAL_LINK_LIBS=
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 current_lib=
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 build_lib ccddata
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 # ACI libs
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 build_lib aci
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 build_lib aciext
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 build_lib aci_dti_mng
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 build_lib atiext
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 build_lib comlib
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 if [ "$GPRS" = 1 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 build_lib config_gprs_fl
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 build_lib config_gprs_ir
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 else
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 build_lib config_gsm_fl
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 build_lib config_gsm_ir
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 # G23M protocol stack libs
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 build_lib alr
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 build_lib cc
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 build_lib dl
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 build_lib dti
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 build_lib l1_pei
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 build_lib mm
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 build_lib rr
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 build_lib sim_b_lib
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 build_lib sms
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 build_lib ss
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 build_lib uart_b_lib
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 # fax and data
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 if [ "$SRVC" != 0 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 build_lib l2r
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 build_lib ra
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 build_lib rlp
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 # fax specific
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 if [ "$SRVC" = 1 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 build_lib fad
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 build_lib t30
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 # GPRS specific
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 if [ "$GPRS" = 1 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 build_lib cci
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 build_lib cci_ir
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 build_lib cl
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258 build_lib gmm
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 build_lib grlc
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260 build_lib grlc_ir
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 build_lib grr
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263 build_lib llc
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264 build_lib sm
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265 build_lib sndcp
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 build_lib ppp
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 build_lib ppp_ir
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 build_lib upm
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272 # Condat drivers
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 build_lib gdi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275 # GPF
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 build_lib ccd_na7_db
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 build_lib frame_na7_db_fl
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 build_lib frame_na7_db_ir
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 build_lib misc_na7_db_fl
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 build_lib misc_na7_db_ir
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 build_lib osx_na7_db
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 build_lib tif_na7_db_fl
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 build_lib tif_na7_db_ir
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 # core drivers
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 build_lib drivers_flash
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 # Layer 1
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 build_lib tpudrv
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 build_lib l1_ext
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 lib_link_magic '(BSS_LIBS (.l1s_global))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 build_lib l1_int
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 build_lib l1_custom_ext
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 build_lib l1_custom_int
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 build_lib riviera_core_flash
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 build_lib riviera_cust_flash
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306 # services
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 build_lib audio
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 build_lib audio_bgd
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 build_lib cst
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 build_lib dar
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 build_lib dar_gbl_var
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 lib_link_magic '(BSS_DAR_LIB (.bss))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 build_lib etm
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314 build_lib lls
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 # app drivers
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 build_lib abb
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318 build_lib buzzer
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 if [ "$FCHG_STATE" = 1 ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 build_lib fchg
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 build_lib ffs
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 build_lib ffs_drv
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 build_lib ffs_pcm
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 build_lib kpd
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 build_lib power
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 build_lib rtc_drv
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 build_lib sim_drv
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 build_lib spi_drv
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 build_lib uart_drv
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 # system glue
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334 build_lib main
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 build_lib bootloader
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 lib_link_magic '(CONST_BOOT_LIB (.const, .text, .text:v$3) BSS_BOOT_LIB (.bss))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 # Nucleus
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 build_lib nucleus_flash
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 build_lib nucleus_intram
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 # TI's libc/libgcc equivalent
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 rts_blob_lib rts16le_flash
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 rts_blob_lib rts16le_int_ram
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 lib_link_magic '(BSS_LIBS (.bss))'
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348 # generate the top level Makefile!
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349
106
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
350 helpers/makeline def CONFIG_NAME $CONFIG_NAME > $BUILD_DIR/Makefile
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
351 echo >> $BUILD_DIR/Makefile
5ba0bee90efa build system: new configuration naming mechanism
Mychaela Falconia <falcon@freecalypso.org>
parents: 105
diff changeset
352 helpers/makeline def SUBDIR $SUBDIR >> $BUILD_DIR/Makefile
44
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 echo >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 helpers/makeline def LIBS $LIBS >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 echo >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 helpers/makeline def SPECIAL_LINK_LIBS $SPECIAL_LINK_LIBS >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 echo >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358 helpers/makeline def LINK_SCRIPT_SRC ../$LINK_SCRIPT_SRC >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 echo >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361 if [ -n "$RAM_LINK_SCRIPT_SRC" ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
362 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
363 helpers/makeline def RAM_LINK_SCRIPT_SRC ../$RAM_LINK_SCRIPT_SRC \
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
364 >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365 echo >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 helpers/makeline def FLASH_BASE_ADDR $FLASH_BASE_ADDR >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369 helpers/makeline def FLASH_SECTOR_SIZE $FLASH_SECTOR_SIZE >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370 echo >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 cat tms470/makefile-frags/first-part >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374 cat tms470/makefile-frags/link-steps >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 if [ "$TARGET" != c139 -a "$TARGET" != c11x ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 cat tms470/makefile-frags/m0-to-bin-std >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379 else
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380 cat tms470/makefile-frags/m0-to-bin-c139 >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 cat tms470/makefile-frags/flash-script-gen >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385 if [ -n "$RAM_LINK_SCRIPT_SRC" ]
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386 then
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387 cat tms470/makefile-frags/ram-link-steps >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388 fi
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390 cat tms470/makefile-frags/clean-always >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391 echo >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 echo 'FRC:' >> $BUILD_DIR/Makefile
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394 # All done!
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395
77b8d6bc6b31 configure.sh: putting it all together (TMS470)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 echo "Run make in $BUILD_DIR to compile the firmware"