view src/cs/layer1/tpu_drivers/source/makefile_p @ 275:79cfefc1e2b4

audio mode load: gracefully handle mode files of wrong AEC version Unfortunately our change of enabling L1_NEW_AEC (which is necessary in order to bring our Calypso ARM fw into match with the underlying DSP reality) brings along a change in the audio mode file binary format and file size - all those new tunable AEC parameters do need to be stored somewhere, after all. But we already have existing mode files in the old format, and setting AEC config to garbage when loading old audio modes (which is what would happen without the present change) is not an appealing proposition. The solution implemented in the present change is as follows: the audio mode loading code checks the file size, and if it differs from the active version of T_AUDIO_MODE, the T_AUDIO_AEC_CFG structure is cleared - set to the default (disabled AEC) for the compiled type of AEC. We got lucky in that this varying T_AUDIO_AEC_CFG structure sits at the end of T_AUDIO_MODE!
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 30 Jul 2021 02:55:48 +0000
parents 4e78acac3d88
children
line wrap: on
line source

#    Filename makefile_p                  
#        
#       Makefile for GSM TPU drivers - UNIX version
#
#       Copyright (c) Texas Instruments 2003
#      
#
.SUFFIXES: .obj $(SUFFIXES)


# Grab customer and rf id's
#--------------------------
CUST=$(cust)
RF=$(rf)
CHIPSET=$(bsb)
ANALOG=$(anl)
DSP=$(dsp)
BOARD=$(board)
LONG_JUMP=$(ljump)
TESTMODE=$(testmode)

# Call of external makefile to extract RF_FAM and ANLG_FAM
#---------------------------------------------------------
include ../../tools/define_split.mak


CL470_0 = cl470
CL470_3 = perl ../../tools/icl470.pl cl470

CL470 = $(CL470_$(LONG_JUMP))
AR470 = ar470

# Source code path
#-----------------
SOURCE=../source$(CUST)
PSOURCE=../p_source$(CUST)

# Include file source paths
#--------------------------
INCLUDE = -I../../include -I../../drivers1/common -I../source$(CUST) -I../../cust$(CUST) \
          -I../../tm_include -I../p_source$(CUST) -I../../audio_include \
          -I../../audio_cust$(CUST) -I../../hint -I../../gtt_include
           
DEPEND = $(SOURCE)/tpudrv$(RF_FAM).h ../../include/l1_time.h ../../drivers1/common/iq.h \
         ../../cust$(CUST)/l1_rf$(RF_FAM).h tpudrv.h ../../include/l1_sw.cfg ../../include/l1_hw.cfg \
         ../../include/l1_confg.h

# Object files path
#------------------
OBJ=$(SOURCE)/obj
OBJS=obj

# EXECUTION TARGET
#-----------------
all:	../lib/tpudrv_$(CUST)_$(RF_FAM)_$(CHIPSET)_$(ANLG_FAM)_$(DSP)_$(BOARD)_$(LONG_JUMP)_$(TESTMODE).lib 

clean:
	-rm obj/tpudrv.obj $(OBJ)/tpudrv$(RF_FAM).obj $(OBJ)/p_tpudrv$(RF_FAM).obj \
        -rm ../lib/tpudrv_$(CUST)_$(RF_FAM)_$(ANLG_FAM)_$(BOARD)_$(LONG_JUMP).lib

# How to...
#----------

#...generate the library
#-----------------------
../lib/tpudrv_$(CUST)_$(RF_FAM)_$(CHIPSET)_$(ANLG_FAM)_$(DSP)_$(BOARD)_$(LONG_JUMP)_$(TESTMODE).lib: obj/tpudrv.obj $(OBJ)/tpudrv$(RF_FAM).obj $(OBJ)/p_tpudr$(RF_FAM).obj
	$(AR470) r $@ obj/tpudrv.obj $(OBJ)/tpudrv$(RF_FAM).obj $(OBJ)/p_tpudr$(RF_FAM).obj

#...generate the common object file
#----------------------------------
obj/tpudrv.obj: $(DEPEND) tpudrv.c
	$(CL470) $(INCLUDE) -i$(ARMTOOLS)  -dCHIPSET=$(bsb) -dANALOG=$(anl) -dDSP=$(dsp) -dLONG_JUMP=$(LONG_JUMP) -dTESTMODE=$(TESTMODE) -c -g -me -mt -mw -o2 -pw2 -fr obj -eoobj tpudrv.c


#...generate the target dependant object file
#--------------------------------------------
$(OBJ)/tpudrv$(RF_FAM).obj: $(DEPEND) $(SOURCE)/tpudrv$(RF_FAM).c 
	$(CL470) $(INCLUDE) -i$(ARMTOOLS)  -dCHIPSET=$(bsb) -dANALOG=$(anl) -dDSP=$(dsp) -dBOARD=$(BOARD) -dLONG_JUMP=$(LONG_JUMP) -dTESTMODE=$(TESTMODE) -c -g -me -mt -mw -o2 -pw2 -fr$(OBJ) -eoobj $(SOURCE)/tpudrv$(RF_FAM).c 

#...generate the target dependant GPRS object file
#-------------------------------------------------
$(OBJ)/p_tpudr$(RF_FAM).obj: $(DEPEND) $(PSOURCE)/p_tpudr$(RF_FAM).c 
	$(CL470) $(INCLUDE) -i$(ARMTOOLS) -dCHIPSET=$(bsb) -dANALOG=$(anl) -dDSP=$(dsp) -dBOARD=$(BOARD) -dLONG_JUMP=$(LONG_JUMP) -dTESTMODE=$(TESTMODE) -c -g -me -mt -mw -o2 -pw2 -fr$(OBJ) -eoobj $(PSOURCE)/p_tpudr$(RF_FAM).c