This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

tconf output directory problem

Other Parts Discussed in Thread: OMAPL138

Hi All,

I got helloDSP 1.10 and compiled it. It works great.

I want to change folders, code and makefile for my project. I have been working on dsp makefile and I had a problem with tconf. I can't set output directory for tconf. I have debug and release directories and need to put *_c.c, *.s62, etc files under particular directory. I have checked the link http://processors.wiki.ti.com/index.php/DSP_BIOS_FAQ and tried -Dconfig.programName but I still have problem. Could you please give me a clear example for debug, release configuration?

Thanks

Serdar

 

 

 

#   ----------------------------------------------------------------------------

#  @file   Makefile

#

#  @path   

#

#  @desc   Makefile for helloDSP (Debug and Release versions)

#

#  @ver    1.10

#   ----------------------------------------------------------------------------

#  Copyright (c) Texas Instruments Incorporated 2002-2009

#

#  Use of this software is controlled by the terms and conditions found in the

#  license agreement under which this software has been supplied or provided.

#   ----------------------------------------------------------------------------

SHELL = /bin/sh

 

#   ----------------------------------------------------------------------------

#   Base for TI toolchain

#   This may change depending if you are using other versions of the compiler

#   ----------------------------------------------------------------------------

BASE_COMPILER := /opt/TI/C6000CGT6.1.9

BASE_SABIOS := /home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/bios_5_41_00_06

#BASE_BSL := $(BASE_TOOLCHAIN)/boards/evmomapl137_v1

XDCTOOLS := /home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/xdctools_3_20_00_41

 

#   ----------------------------------------------------------------------------

#   Name of the TI compiler and DSP/BIOS builder (Tconf)

#   This usually does not change

#   ----------------------------------------------------------------------------

CC := cl6x

TCONF := tconf

 

#   ----------------------------------------------------------------------------

#   Base for DSPLink

#   This may have to be changed depending on your installation paths 

#   and DSPLink version

#   ----------------------------------------------------------------------------

DSPLINK := /home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink

 

#   ----------------------------------------------------------------------------

#   Project name. 

#   This variable can be used to set all source/BIOS/object filenames

#   For clarity, in this example it sets only the .OUT .CMD and .MAP filenames

#   ----------------------------------------------------------------------------

PROJNAME := message

 

#   ----------------------------------------------------------------------------

#   Global variables for building helloDSP

#   Note that common debug, compiler and linker flags are already

#   set in the lower part of this Makefile

#   CSRCS are for C-source files, ASRCS for asm and BIOSTCF is the BIOS TCF file

#   ----------------------------------------------------------------------------

DEBUG :=

#CFLAGS := -I$(BASE_BSL)/dsp/include

#LDFLAGS := -i$(BASE_BSL)/dsp/lib

#CFLAGS := -I$(DSP_LINK)/dsp/export/INCLUDE/DspBios/OMAPL138

LDFLAGS := -i$(DSP_LINK)/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/RELEASE

CFLAGS := \

-I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/inc -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/inc/DspBios -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/inc/DspBios/5.XX -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/inc/DspBios/5.XX/OMAPL138GEM -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/inc/DA8XXGEM -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/inc/C64XX -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/src/samples/message -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/src/samples/message/DspBios -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/src/samples/message/DspBios/ -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/bios_5_41_00_06/packages/ti/bios/include -I/opt/TI/C6000CGT6.1.9/include -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/bios_5_41_00_06/packages/ti/rtdx/include/c6000 -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/bios_5_41_00_06/packages/ti/psl/include -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/BUILD/OMAPL138GEM_0/INCLUDE -I/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/export/INCLUDE/DspBios/OMAPL138/internal

 

CSRCS := main.c message_config.c swiMessage.c tskMessage.c

ASRCS :=

BIOSTCF := message.tcf

OBJS :=

LIBS := \

-l/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/RELEASE/dsplink.lib \

-l/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/RELEASE/dsplinkpool.lib \

-l/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/RELEASE/dsplinkmpcs.lib \

-l/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/RELEASE/dsplinkmplist.lib \

-l/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/RELEASE/dsplinkmsg.lib \

-l/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/RELEASE/dsplinknotify.lib \

-l/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/RELEASE/dsplinkringio.lib \

-l/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/RELEASE/dsplinkdata.lib

 

#LIBS := -ldsplink.lib -ldsplinkpool.lib -ldsplinkmpcs.lib -ldsplinkmplist.lib -ldsplinkmsg.lib -#ldsplinknotify.lib -ldsplinkringio.lib -ldsplinkdata.lib

 

# If the DSP/Link was rebuilt by the user, add -ldsplinkdata.lib to the line above

CMDS := $(PROJNAME).cmd

MAPFILE := $(PROJNAME).map

BIN := $(PROJNAME).out

 

#   ----------------------------------------------------------------------------

#   DSP/BIOS generated files

#   ----------------------------------------------------------------------------

BIOSSRC := $(BIOSTCF:%.tcf=%cfg.s62) $(BIOSTCF:%.tcf=%cfg_c.c)

BIOSCMD := $(BIOSTCF:%.tcf=%cfg.cmd)

 

#   ----------------------------------------------------------------------------

#   Adding DSP/BIOS generated files to the sources and the linker variables

#   ----------------------------------------------------------------------------

CSRCS += $(BIOSTCF:%.tcf=%cfg_c.c)

ASRCS += $(BIOSTCF:%.tcf=%cfg.s62)

CMDS += $(BIOSCMD)

 

#   ----------------------------------------------------------------------------

#   DSP/BIOS common flags

#   ----------------------------------------------------------------------------

BFLAGS := -Dconfig.importPath="$(BASE_SABIOS)/packages; \

          $(BASE_SABIOS)/packages/ti/bios;              \

          $(DSPLINK)/dsp/inc/DspBios;                   \

          $(DSPLINK)/dsp/inc/DspBios/5.XX/OMAPL138GEM;  \

          $(DSPLINK)/dsp/inc/DspBios/5.XX;"

 

#   ----------------------------------------------------------------------------

#   All common compiler and linker flags

#   ----------------------------------------------------------------------------

ALL_CFLAGS := -q -pdr -pdv -pden -ml3 -mv6400+ --disable:sploop $(CFLAGS)

ALL_LDFLAGS := -z -c -q -x $(LDFLAGS)

 

#   ----------------------------------------------------------------------------

#   Compiler and Linker options for Debug

#   ----------------------------------------------------------------------------

CFLAGS_D := -g -d"_DEBUG" --no_compress $(DEBUG) $(ALL_CFLAGS)

OBJDIR_D := Debug

BINDIR_D := $(OBJDIR_D)

OBJS_D := $(CSRCS:%.c=$(OBJDIR_D)/%.obj) $(ASRCS:%.s62=$(OBJDIR_D)/%.obj)

LIBS_D := $(LIBS)

MAPFILE_D := $(OBJDIR_D)/$(MAPFILE)

 

#   ----------------------------------------------------------------------------

#   Compiler and Linker options for Release

#   ----------------------------------------------------------------------------

CFLAGS_R := -o3 $(ALL_CFLAGS)

OBJDIR_R := Release

BINDIR_R := $(OBJDIR_R)

OBJS_R := $(CSRCS:%.c=$(OBJDIR_R)/%.obj) $(ASRCS:%.s62=$(OBJDIR_R)/%.obj)

LIBS_R := $(LIBS)

MAPFILE_R := $(OBJDIR_R)/$(MAPFILE)

 

#   ----------------------------------------------------------------------------

#   Compiler common include directories 

#   ----------------------------------------------------------------------------

CINCLUDES := -I$(DSPLINK)/dsp/inc                             \

             -I$(DSPLINK)/dsp/inc/DspBios                     \

             -I$(DSPLINK)/dsp/inc/DspBios/5.XX                \

             -I$(DSPLINK)/dsp/inc/DspBios/5.XX/OMAPL138GEM    \

             -I$(DSPLINK)/dsp/inc/C64XX                       \

             -I$(BASE_SABIOS)/packages/ti/bios/include        \

             -I$(BASE_COMPILER)/include                       \

             -I$(BASE_SABIOS)/packages/ti/rtdx/include/c6000  \

             -I$(BASE_SABIOS)/packages/ti/psl/include         \

             -I$(DSPLINK)/dsp/export/INCLUDE/DspBios/OMAPL138 \

             -Isrc                                            \

             -I../common                                      \

             -I./

 

#   ----------------------------------------------------------------------------

#   Compiler common symbol definitions 

#   ----------------------------------------------------------------------------

#DEFS :=        -dMAX_DSPS=1          \

#               -dMAX_PROCESSORS=2    \

#               -dID_GPP=1            \

#               -dOMAPL138            \

#               -dPROC_COMPONENT      \

#               -dPOOL_COMPONENT      \

#               -dNOTIFY_COMPONENT    \

#               -dMPCS_COMPONENT      \

#               -dRINGIO_COMPONENT    \

#              -dMPLIST_COMPONENT    \

#               -dMSGQ_COMPONENT      \

#               -dMSGQ_ZCPY_LINK      \

#               -dCHNL_COMPONENT      \

#               -dCHNL_ZCPY_LINK      \

#               -dZCPY_LINK           \

#               -dPROCID=0            \

#               -dDA8XXGEM            \

#               -DOS_LINUX            \

#               -dDA8XXGEM_INTERFACE=SHMEM_INTERFACE \

#               -dPHYINTERFACE=SHMEM_INTERFACE \

# -dTSK_MODE \

# -DDDSP_DEBUG \

# -dDSP_TSK_MODE

 

DEFS := \

-dTSK_MODE \

-DDDSP_DEBUG \

-dMAX_DSPS=1 \

-dMAX_PROCESSORS=2 \

-dID_GPP=1 \

-dOMAPL138 \

-dPROC_COMPONENT \

-dPOOL_COMPONENT \

-dNOTIFY_COMPONENT \

-dMPCS_COMPONENT \

-dRINGIO_COMPONENT \

-dMPLIST_COMPONENT \

-dMSGQ_COMPONENT \

-dMSGQ_ZCPY_LINK \

-dCHNL_COMPONENT \

-dCHNL_ZCPY_LINK \

-dZCPY_LINK \

-dPROCID=0 \

-dDA8XXGEM \

-dDA8XXGEM_INTERFACE=SHMEM_INTERFACE \

-dPHYINTERFACE=SHMEM_INTERFACE \

-dDSP_TSK_MODE

 

#   ----------------------------------------------------------------------------

#   Linker common library search path

#   ----------------------------------------------------------------------------

LDINCLUDES := -i$(BASE_COMPILER)/lib                      \

              -i$(BASE_SABIOS)/packages/ti/bios/lib       \

              -i$(BASE_SABIOS)/packages/ti/rtdx/lib/c6000 \

              -i$(BASE_SABIOS)/packages/ti/psl/lib

 

#   ----------------------------------------------------------------------------

#   Linker library search path for Debug

#   ----------------------------------------------------------------------------

LDINCLUDES_D := $(LDINCLUDES) -i$(DSPLINK)/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/DEBUG/

# If the DSP/Link was rebuilt by the user, replace the line above 

# with the one below to use the updated libraries

#LDINCLUDES_D := $(LDINCLUDES) -i$(DSPLINK)/dsp/BUILD/OMAPL1XXGEM_0/EXPORT/DEBUG/

 

#   ----------------------------------------------------------------------------

#   Linker library search path for Release

#   ----------------------------------------------------------------------------

LDINCLUDES_R := $(LDINCLUDES) -i$(DSPLINK)/dsp/export/BIN/DspBios/OMAPL138/OMAPL138GEM_0/RELEASE/

# If the DSP/Link was rebuilt by the user, replace the line above 

# with the one below to use the updated libraries

#LDINCLUDES_R := $(LDINCLUDES) -i$(DSPLINK)/dsp/BUILD/OMAPL1XXGEM_0/EXPORT/RELEASE/

 

#   ----------------------------------------------------------------------------

#   Compiler and Linker procedure

#   From this point and on changes are highly unlikely.

#   - Be careful if changing the order of the linker object and library files

#   - The DSP/BIOS TCONF build needs to come before everything else

#   - The clean rule also removes all DSP/BIOS generated files

#   ----------------------------------------------------------------------------

.PHONY: all

all: $(BIOSSRC) Debug Release

 

$(BIOSSRC): src/$(BIOSTCF)

@echo Building DSP/BIOS file...

$(XDCTOOLS)/$(TCONF) $(BFLAGS) $< 0

# /home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/xdctools_3_20_00_41/tconf -Dconfig.importPath="/home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/bios_5_41_00_06/packages; /home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/bios_5_41_00_06/packages/ti/bios; /home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/inc/DspBios; /home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/inc/DspBios/5.XX/OMAPL138GEM; /home/serdar/factory-20110711/build_armv5l-timesys-linux-uclibcgnueabi/DSPLink-1_65/DSPLink-1_65/dsplink/dsp/inc/DspBios/5.XX;./" src/message.tcf 0

 

#   ----------------------------------------------------------------------------

#   Building Debug... 

#   ----------------------------------------------------------------------------

.PHONY: Debug

Debug: $(BINDIR_D)/$(BIN)

 

$(BINDIR_D)/$(BIN) : $(OBJS_D)

@echo Compiling Debug...

@$(BASE_COMPILER)/bin/$(CC) $(ALL_LDFLAGS) $(LDINCLUDES_D) -o$@ $(OBJS_D) $(LIBS_D) -m$(MAPFILE_D) $(CMDS)

 

$(OBJDIR_D)/%.obj : %.c

@$(BASE_COMPILER)/bin/$(CC) $(ALL_DEBUG) $(DEFS) $(CFLAGS_D) $(CINCLUDES) -fr$(OBJDIR_D) $<

 

$(OBJDIR_D)/%.obj : %.s62

@$(BASE_COMPILER)/bin/$(CC) $(ALL_DEBUG) $(DEFS) $(CFLAGS_D) $(CINCLUDES) -fr$(OBJDIR_D) $<

 

#   ----------------------------------------------------------------------------

#   Building Release... 

#   ----------------------------------------------------------------------------

.PHONY: Release

Release: $(BINDIR_R)/$(BIN)

 

$(BINDIR_R)/$(BIN) : $(OBJS_R)

@echo Compiling Release...

$(BASE_COMPILER)/bin/$(CC) $(ALL_LDFLAGS) $(LDINCLUDES_R) -o$@ $(OBJS_R) $(LIBS_R) -m$(MAPFILE_R) src/message.cmd messagecfg.cmd

# $(CMDS)

$(OBJDIR_R)/%.obj : src/%.c

$(BASE_COMPILER)/bin/$(CC) $(DEFS) $(CFLAGS_R) $(CINCLUDES) -fr$(OBJDIR_R) $<

$(OBJDIR_R)/%.obj : %.c

$(BASE_COMPILER)/bin/$(CC) $(DEFS) $(CFLAGS_R) $(CINCLUDES) -fr$(OBJDIR_R) $<

 

$(OBJDIR_R)/%.obj : %.s62

$(BASE_COMPILER)/bin/$(CC) $(DEFS) $(CFLAGS_R) $(CINCLUDES) -fr$(OBJDIR_R) $<

 

.PHONY: clean

clean:

@rm -f *.cdb

@rm -f *cfg.*

@rm -f *cfg_c.*

@rm -f ./$(OBJDIR_D)/*

@rm -f ./$(OBJDIR_R)/*

 

 

 

  • Serdar,
    what was the problem with using -Dconfig.programName? If you set -Dconfig.programName to "Debug/message", all files generated by Tconf will end up in the directory 'Debug' under your current working directory. You can also use an absolute path, for example -Dconfig.programName="/home/serdar/appDir/Debug".

    You might need to create that directory before running Tconf, and then you'll have to adjust your compiler and linker command lines to look for the files in that directory.

  • Sasha,

    I typed only directory, not directory and program. It works.

     

    Thanks