comparison 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
comparison
equal deleted inserted replaced
105:5c4db73d289a 106:5ba0bee90efa
44 DSP=36 44 DSP=36
45 RF=12 45 RF=12
46 DISABLE_SLEEP=0 46 DISABLE_SLEEP=0
47 47
48 . "targets/$TARGET.conf" 48 . "targets/$TARGET.conf"
49
50 BUILD_DIR="build-$TARGET-tms470"
51 49
52 # settings derived from the target-defined DSP version 50 # settings derived from the target-defined DSP version
53 51
54 case "$DSP" in 52 case "$DSP" in
55 33) 53 33)
83 ALLOW_CSIM_GSM=1 81 ALLOW_CSIM_GSM=1
84 MEMSUPER=0 82 MEMSUPER=0
85 SERIAL_DYNAMIC_SWITCH=0 83 SERIAL_DYNAMIC_SWITCH=0
86 TR_BAUD_CONFIG=TR_BAUD_115200 84 TR_BAUD_CONFIG=TR_BAUD_115200
87 85
86 SUFFIX=
87
88 # allow the user to override these defaults 88 # allow the user to override these defaults
89 89
90 shift 90 shift
91 while [ $# != 0 ] 91 while [ $# != 0 ]
92 do 92 do
93 eval "$1" 93 eval "$1"
94 shift 94 shift
95 done 95 done
96
97 # validate key settings and build configuration name
98
99 case "$SRVC" in
100 0)
101 CONFIG_NAME=vo
102 ;;
103 1)
104 CONFIG_NAME=fd
105 ;;
106 2)
107 CONFIG_NAME=da
108 ;;
109 *)
110 echo "Error: SRVC=$SRVC setting is invalid" 1>&2
111 exit 1
112 esac
113
114 case "$GPRS" in
115 0)
116 ;;
117 1)
118 CONFIG_NAME=gprs
119 ;;
120 *)
121 echo "Error: GPRS=$GPRS setting is invalid" 1>&2
122 exit 1
123 esac
124
125 case "$FCHG_STATE" in
126 0)
127 ;;
128 1)
129 CONFIG_NAME="$CONFIG_NAME-chg"
130 ;;
131 *)
132 echo "Error: FCHG_STATE=$FCHG_STATE setting is invalid" 1>&2
133 exit 1
134 esac
135
136 CONFIG_NAME="$CONFIG_NAME$SUFFIX-470"
137 BUILD_DIR="build-$TARGET-$CONFIG_NAME"
96 138
97 echo "Building firmware for target $TARGET in $BUILD_DIR" 139 echo "Building firmware for target $TARGET in $BUILD_DIR"
98 140
99 if [ "$clean_flag" = 1 ] 141 if [ "$clean_flag" = 1 ]
100 then 142 then
303 rts_blob_lib rts16le_int_ram 345 rts_blob_lib rts16le_int_ram
304 lib_link_magic '(BSS_LIBS (.bss))' 346 lib_link_magic '(BSS_LIBS (.bss))'
305 347
306 # generate the top level Makefile! 348 # generate the top level Makefile!
307 349
308 helpers/makeline def SUBDIR $SUBDIR > $BUILD_DIR/Makefile 350 helpers/makeline def CONFIG_NAME $CONFIG_NAME > $BUILD_DIR/Makefile
351 echo >> $BUILD_DIR/Makefile
352 helpers/makeline def SUBDIR $SUBDIR >> $BUILD_DIR/Makefile
309 echo >> $BUILD_DIR/Makefile 353 echo >> $BUILD_DIR/Makefile
310 helpers/makeline def LIBS $LIBS >> $BUILD_DIR/Makefile 354 helpers/makeline def LIBS $LIBS >> $BUILD_DIR/Makefile
311 echo >> $BUILD_DIR/Makefile 355 echo >> $BUILD_DIR/Makefile
312 helpers/makeline def SPECIAL_LINK_LIBS $SPECIAL_LINK_LIBS >> $BUILD_DIR/Makefile 356 helpers/makeline def SPECIAL_LINK_LIBS $SPECIAL_LINK_LIBS >> $BUILD_DIR/Makefile
313 echo >> $BUILD_DIR/Makefile 357 echo >> $BUILD_DIR/Makefile