changeset 620:76f09f1bea5d

config system: generalized mechanism for overriding Calypso chip version
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 07 Oct 2019 02:09:53 +0000
parents 5a0ddb29c58e
children 0d66718e5f33
files configure.sh targets/dsample.conf targets/dsp34test.conf targets/dsp34test.h
diffstat 4 files changed, 36 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/configure.sh	Sun Oct 06 22:25:10 2019 +0000
+++ b/configure.sh	Mon Oct 07 02:09:53 2019 +0000
@@ -30,9 +30,20 @@
 	exit 1
 fi
 
-TARGET="$1"
+TARGET_FULL="$1"
 CONFIG="$2"
 
+case "$TARGET_FULL" in
+	*-*)
+		TARGET=`echo $TARGET_FULL | sed -e 's/-.*$//'`
+		CHIP_OVERRIDE=`echo $TARGET_FULL | sed -e 's/^.*-//'`
+		;;
+	*)
+		TARGET="$TARGET_FULL"
+		CHIP_OVERRIDE=
+		;;
+esac
+
 if [ ! -f "targets/$TARGET.conf" -o ! -f "targets/$TARGET.h" ]
 then
 	echo "Error: target $TARGET not known" 1>&2
@@ -47,8 +58,7 @@
 
 # target defaults that can be overridden by $TARGET.conf
 
-CHIPSET=10
-DSP=36
+CALYPSO_VER=dsp36
 RF=12
 DISABLE_SLEEP=0
 RVTMUX_ON_MODEM=0
@@ -56,24 +66,37 @@
 
 . "targets/$TARGET.conf"
 
-# settings derived from the target-defined DSP version
+# possible Calypso chip version override
+
+if [ -n "$CHIP_OVERRIDE" ]
+then
+	CALYPSO_VER="$CHIP_OVERRIDE"
+fi
 
-case "$DSP" in
-	33)
+# settings derived from the Calypso chip version
+
+case "$CALYPSO_VER" in
+	c05b)
+		CHIPSET=8
+		DSP=33
 		AMR=0
 		L1_DYN_DSP_DWNLD=0
 		L1_VOICE_MEMO_AMR=0
 		MELODY_E2=0
 		SPEECH_RECO=0
 		;;
-	34)
+	dsp34)
+		CHIPSET=10
+		DSP=34
 		AMR=1
 		L1_DYN_DSP_DWNLD=0
 		L1_VOICE_MEMO_AMR=0
 		MELODY_E2=0
 		SPEECH_RECO=0
 		;;
-	36)
+	dsp36)
+		CHIPSET=10
+		DSP=36
 		AMR=1
 		L1_DYN_DSP_DWNLD=1
 		L1_VOICE_MEMO_AMR=1
@@ -81,7 +104,7 @@
 		SPEECH_RECO=1
 		;;
 	*)
-		echo "Error: DSP=$DSP setting not understood" 1>&2
+	     echo "Error: CALYPSO_VER=$CALYPSO_VER setting not understood" 1>&2
 		exit 1
 esac
 
@@ -109,9 +132,9 @@
 	shift
 done
 
-BUILD_DIR="build-$TARGET-$CONFIG$SUFFIX"
+BUILD_DIR="build-$TARGET_FULL-$CONFIG$SUFFIX"
 
-echo "Building configuration $CONFIG for target $TARGET in $BUILD_DIR"
+echo "Building configuration $CONFIG for target $TARGET_FULL in $BUILD_DIR"
 
 if [ "$clean_flag" = 1 ]
 then
@@ -236,7 +259,7 @@
 
 helpers/makeline def CONFIG_NAME "$CONFIG$SUFFIX" > $BUILD_DIR/Makefile
 echo >> $BUILD_DIR/Makefile
-helpers/makeline def TARGET $TARGET >> $BUILD_DIR/Makefile
+helpers/makeline def TARGET $TARGET_FULL >> $BUILD_DIR/Makefile
 echo >> $BUILD_DIR/Makefile
 helpers/makeline def SUBDIR $SUBDIR >> $BUILD_DIR/Makefile
 echo >> $BUILD_DIR/Makefile
--- a/targets/dsample.conf	Sun Oct 06 22:25:10 2019 +0000
+++ b/targets/dsample.conf	Mon Oct 07 02:09:53 2019 +0000
@@ -1,5 +1,4 @@
-CHIPSET=8
-DSP=33
+CALYPSO_VER=c05b
 RF=10
 LINK_SCRIPT_SRC=src/cs/system/template/gsm_ds_int8_compact.template
 FLASH_BASE_ADDR=0
--- a/targets/dsp34test.conf	Sun Oct 06 22:25:10 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# TI's TCS211 program supported 3 different Calypso silicon versions on their
-# D-Sample and Leonardo boards: C05B (CHIPSET 8, DSP 33), early C035
-# (CHIPSET 10, DSP 34) and final C035 (CHIPSET 10, DSP 36).  In FreeCalypso
-# we generally work only with the last chipset (final C035), but we would like
-# to support the two earlier ones as well, if possible.  C05B has been partially
-# exercised on the Mother's D-Sample board (non-functional Clara RF, no genuine
-# tpudrv10.c source and too many unknowns), but the early C035 version with
-# DSP 34 has not been tested at all yet.
-#
-# The Mother plans on testing the early C035 version of Calypso by populating
-# a D751774A chip on an FCDEV3B and trying out the resulting combination;
-# the present dsp34test fw build is to be flashed into those modified FCDEV3B
-# boards.
-
-CHIPSET=10
-DSP=34
-RF=12
-LINK_SCRIPT_SRC=src/cs/system/template/gsm_ds_pirelli_flash.template
-RAM_LINK_SCRIPT_SRC=src/cs/system/template/gsm_ds_pirelli_ram.template
-FLASH_BASE_ADDR=0
-FLASH_SECTOR_SIZE=0x40000
--- a/targets/dsp34test.h	Sun Oct 06 22:25:10 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-fcdev3b.h
\ No newline at end of file