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.

Building a Standalone project using DVSDK3.10

H3750.Console.txtey guys:

One of the first things I do when working with a new dvsdk is to pull out the decode and encode directories into a separate project directory where I keep all of my old stuff and build from there to make sure that everything runs standalone and then piecewise remove and add code from this into a new project that is a merged version of this new dvsdk and my old stuff.  I have done this plenty of times over the years going through all the DVSDKs 1.3x, 1.4x and 2.1x with no issues – makefile was pretty easy to use and not much interdependencies to the original DVSDK to do this.  However this new dvsdk3.10 has been a major problem in preventing me from doing this and I have wasted a lot of time trying to figure this out. 

            I am attaching the console output, an example project showing the decode project being isolated and trying to build and the corresponding Makefile that goes with this project which was modified to run in a standalone mode and reference the dvsdk3.10.  The main issue here is that the Makefile is referring to a config.bld file that is defined in $(DMAI_INSTALL_DIR)/packages/config.bld file that has some variables in it that get defined by the big Makefile in the original dvsdk_3_10_00_16 directory, but when the decode is pulled out into a separate directory these variables don’t get defined properly because of the interdependencies of all the variables in the Makefiles and I get an error message of:

 Error: /home/user/CodeSourcery/Sourcery_G++_Lite/nullgcc cannot be found. Ensure that rootDir for the GCArmv5T target is set correctly in ./config.bld

 Now if I remove this statement from the Makefile, this error goes away, but the project doesn’t build – this is the 2nd block of output in the Console.txt file.

 $(VERBOSE) PLATFORM_XDC="$(PLATFORM_XDC)" XDCPATH="$(XDC_PATH)" $(CONFIGURO) -c $(MVTOOL_DIR) -o $(XDC_CFG) -t $(PLATFORM_XDC_TARGET) -p $(PLATFORM_XDC) -b $(DMAI_INSTALL_DIR)/packages/config.bld $(XDC_CFGFILE)

 So what is going on with this PLATFORM_XDC variable and the reference to the $(DMAI_INSTALL_DIR)/packages/config.bld? 

I need to build a standalone Makefile with a standalone project that references the dvsdk3.10, but there is a l7612.DemoProject.tar.gzot more to these Makefile in this new dvsdk that is making it difficult for me to understand what is causing the problem - mainly due to all these additional variables with all of the interdepencies that didn't used to be there in the previous DVSDKs.  Can you provide some guidance here?  See the attached tarball for an example of what I am trying to do – the corresponding main.c that is being built is about as simple as it gets, but I am not able to build it with this new dvsdk.

Thanks,
Tim8535.Makefile.txt4188.DemoProject.tar.gz

  • Please find attached demo of encode with simple streaming configured for standalone compilation. You still need to configure compiler.

    Use this script configure compiler environment. Adjust some variables (MVTOOL_DIR, PATH) in need.

    cc_cross_env()
    {
            export CC=${CROSS}gcc
            export AR=${CROSS}ar
            export LD=${CROSS}ld
            export AS=${CROSS}as
            export CPP=${CROSS}cpp
            export CXX=${CROSS}c++
            export HOSTCC=gcc
            echo Using:
            which $CC
            which $LD
            which $AS
            which $CPP
            which $CXX
            which mkimage
    }

    armcs()
    {
            export PATH=/usr/sbin:/usr/bin:/sbin:/bin
            export MVTOOL_DIR=/opt/arm-2009q1/bin
            export CROSS=arm-none-linux-gnueabi-
            export CROSS_COMPILE=$CROSS
            export MVTOOL_PREFIX=$CROSS
            export PATH=$PATH:~/dvsdk_2_00_00_22/PSP_02_00_00_140/board_utilities/u-boot-1.2.0/tools/ # path to mkimage
            export LINUXKERNEL_INSTALL_DIR=/home/const/workdir/kernel.svn/linux-davinci-staging
            export LINUXLIBS_INSTALL_DIR=/opt/linuxlibs-2009.11-armv5te
            cc_cross_env
    }

    armcs

    encode-stream.tar.gz
  • I have the same problem, when I build the /dvsdk_3_10_00_16/dvsdk_demo_3_10_00_14/dm6467/decode

    I modify my decode_cfg, Makefile, and include ../../../Rule.make, but i still have the error

    ======== Building decode ========

    Configuring application using decode.cfg

    making package.mak (because of package.bld) ...

    js: "./package.bld", line 62: Error: template generation of 'compiler.opt' failed: Error: /opt/arm-2009q1/nullgcc cannot be found. Ensure that rootDir for the GCArmv5T target is set correctly in ./config.bld

    gmake: *** Deleting file `package.mak'

    gmake: *** No rule to make target `.configuro'.  Stop.

    Warning: directory "/home/peterpan/dvsdk_3_10/dvsdk_3_10_00_16/dsplink_linux_1_64/packages" on package path does not exist

    js: "/home/peterpan/dvsdk_3_10/dvsdk_3_10_00_16/xdctools_3_16_01_27/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.

    make: *** [decode_config/compiler.opt] Error 1

     

    Could you give me the correct define or path?

     

  • Hey Constantine:

    I downloaded the tar file you provided, untarred it into my standalone Projects directory, and changed the path in the Makefile to point to my Rules.make in my DVSDK3.10 and did a make clean followed by a make and I get the same result that I am getting with the project that I created from the decode directory of the demos directory of DVSDK3.10 - see below:

    From doing a  "make clean"
    user@user-desktop:~/dvsdk/CodeSourcery/Projects/Encoder/encode$ make clean
    Removing generated files..
    rm -f -rf encode_config capture.o codecs.o main.o video.o writer.o ctrl.o encode *~ *.d .dep

    From doing a "make"
    user@user-desktop:~/dvsdk/CodeSourcery/Projects/Encoder/encode$ make

    ======== Building encode ========
    Configuring application using encode.cfg

    PLATFORM_XDC="ti.platforms.evmDM365" XDCPATH=";/home/const/dvsdk/dvsdk_3_10_00_12/dvsdk_demos_3_10_00_10/packages;/home/user/dvsdk/dvsdk_3_10_00_16/dmai_2_10_00_10/packages;/home/user/dvsdk/dvsdk_3_10_00_16/codec_engine_2_25_01_06/packages;/home/user/dvsdk/dvsdk_3_10_00_16/framework_components_2_25_01_05/packages;/home/user/dvsdk/dvsdk_3_10_00_16/dsplink_linux_1_64/packages;/home/user/dvsdk/dvsdk_3_10_00_16/xdais_6_25_01_08/packages;/home/user/dvsdk/dvsdk_3_10_00_16/linuxutils_2_25_01_06/packages;/home/user/dvsdk/dvsdk_3_10_00_16/cs2dm6467_1_00_00_08/packages;/home/user/dvsdk/dvsdk_3_10_00_16/codec_engine_2_25_01_06/examples" /home/user/dvsdk/dvsdk_3_10_00_16/xdctools_3_16_01_27/xs xdc.tools.configuro -c /home/user/CodeSourcery/Sourcery_G++_Lite -o encode_config -t gnu.targets.arm.GCArmv5T -p ti.platforms.evmDM365 -b /home/user/dvsdk/dvsdk_3_10_00_16/dmai_2_10_00_10/packages/config.bld encode.cfg
    making package.mak (because of package.bld) ...
    js: "./package.bld", line 62: Error: template generation of 'compiler.opt' failed: Error: /home/user/CodeSourcery/Sourcery_G++_Lite/nullgcc cannot be found. Ensure that rootDir for the GCArmv5T target is set correctly in ./config.bld
    gmake: *** Deleting file `package.mak'
    making package.mak (because of package.bld) ...
    js: "./package.bld", line 62: Error: template generation of 'compiler.opt' failed: Error: /home/user/CodeSourcery/Sourcery_G++_Lite/nullgcc cannot be found. Ensure that rootDir for the GCArmv5T target is set correctly in ./config.bld
    gmake: *** Deleting file `package.mak'
    gmake: *** No rule to make target `.configuro'.  Stop.
    Warning: directory "/home/const/dvsdk/dvsdk_3_10_00_12/dvsdk_demos_3_10_00_10/packages" on package path does not exist
    Warning: directory "/home/user/dvsdk/dvsdk_3_10_00_16/dsplink_linux_1_64/packages" on package path does not exist
    js: "/home/user/dvsdk/dvsdk_3_10_00_16/xdctools_3_16_01_27/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    make: *** [encode_config/compiler.opt] Error 1

    What is going on with this config.bld file?  It seems like it is getting in the way and screwing up this make process.  Please explain how to build a simple standalone project that references the DVSDK like what is in the decode or encode directory of the demos directory of the DVSDK.  I can do this with DVSDK1.40, DVSDK2.00 and DVSK2.10 with no problems - but not so with DVSDK3.10, so what are the differences in this new DVSDK that prevent me from doing this?

    Thanks,
    Tim

  • Use this script configure compiler environment. Adjust some variables (MVTOOL_DIR, PATH) in need.

    cc_cross_env()
    {
            export CC=${CROSS}gcc
            export AR=${CROSS}ar
            export LD=${CROSS}ld
            export AS=${CROSS}as
            export CPP=${CROSS}cpp
            export CXX=${CROSS}c++
            export HOSTCC=gcc
            echo Using:
            which $CC
            which $LD
            which $AS
            which $CPP
            which $CXX
            which mkimage
    }

    armcs()
    {
            export PATH=/usr/sbin:/usr/bin:/sbin:/bin
            export MVTOOL_DIR=/opt/arm-2009q1/bin
            export CROSS=arm-none-linux-gnueabi-
            export CROSS_COMPILE=$CROSS
            export MVTOOL_PREFIX=$CROSS
            export PATH=$PATH:~/dvsdk_2_00_00_22/PSP_02_00_00_140/board_utilities/u-boot-1.2.0/tools/ # path to mkimage
            export LINUXKERNEL_INSTALL_DIR=/home/const/workdir/kernel.svn/linux-davinci-staging
            export LINUXLIBS_INSTALL_DIR=/opt/linuxlibs-2009.11-armv5te
            cc_cross_env
    }

    armcs

     

     

     

  • 8508.Makefile.txt

     

    Dear Tech Support:

    I have already done this - no problem building the DVSDK and any of the demos from their respective directories - encode, decode or encodedecode. 

    Please see the attached Makefile that was derived from a combination of the Makefile in the DVSDK3.10 directory and the Makefile that is in the decode directory under the demos directory for the DM365.

    I have built a pjoject that has only the following main.c file in it:

    int main( int argc, char *argv[] )
    {
            exit(1);
    }

    This is about as simple as it gets.  However using this Makefile, I cannot build this.  It generates the following message:

    user@user-desktop:~/dvsdk/CodeSourcery/Projects/DM365Server$ make clean
    Removing generated files..

     user@user-desktop:~/dvsdk/CodeSourcery/Projects/DM365Server$ make
    @echo Configuring application using DM365Server.cfg
    making package.mak (because of package.bld) ...
    js: "./package.bld", line 62: Error: template generation of 'compiler.opt' failed: Error: /home/user/CodeSourcery/Sourcery_G++_Lite/nullgcc cannot be found. Ensure that rootDir for the GCArmv5T target is set correctly in ./config.bld
    gmake: *** Deleting file `package.mak'
    making package.mak (because of package.bld) ...
    js: "./package.bld", line 62: Error: template generation of 'compiler.opt' failed: Error: /home/user/CodeSourcery/Sourcery_G++_Lite/nullgcc cannot be found. Ensure that rootDir for the GCArmv5T target is set correctly in ./config.bld
    gmake: *** Deleting file `package.mak'
    gmake: *** No rule to make target `.configuro'. Stop.
    js: "/home/user/dvsdk/dvsdk_3_10_00_16/xdctools_3_16_01_27/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    make: *** [DM365Server_config/compiler.opt] Error 1

    However if I comment out line #48 (XDC_LFILE = ...) and line #98 (      $(VERBOSE) PLATFORM_XDC=...) this builds just fine with no problems. 

    I have narrowed this down to the issue of the generation of the $(XDC_CFGFILE) in line #98 of this Makefile that has the parameter "-b $(DMAI_INSTALL_DIR)/packages/config.bld" which has some variables

    GCArmv5T

    that are not getting set correctly as is evidenced in the error report from the make above.  So what is going on with this config.bld file in the DMAI directory of the DVSDK?  Specifically it looks like the variables

    GCArmv5T.LONGNAME = longName;
    GCArmv5T.platform = java.lang.System.getenv("PLATFORM_XDC");
    GCArmv5T.rootDir = toolDir;

    are not getting set correctly.  Again it's not any of the variables that you indicated in the previous email - I know these are set correctly and can build target applications independent of the DVSDK and run them on the target with no problem.  It's when I try to use the stuff in the DVSDK which requires me to build a $(TARGET)_config directory that things are getting screwed up.  Please advise what is wrong. 

    Alternatively would you try to move the decode directory in the demos directory of DVSDK3.10 to a standalone project with its own directory and corresponding ../../packages directory reference in the DVSDK and build this with one common Makefile in this directory that builds a $(TARGET)_config directory with corresponding generated config.bld and package.bld directory as well as an executable and let me know if you were successful in doing so and if so then specifically how did you do this?

    Thanks,
    Tim

     

  • I modify the file (dvsdk_3_10_00_16/dmai_2_10_00_10/packages/config.bld ) 

    ....

    /* var crosscompile = "" + java.lang.System.getenv("CROSS_COMPILE"); */  

    var crosscompile = "bin/arm-none-linux-gnueabi-";

    ...

    and I can do configuring application using decode.cfg.

    but another issue is  happen. I don't know why? anyone can help?

    *******************  MSG in command line *****************   

    Configuring application using decode.cfg

    making package.mak (because of package.bld) ...

    generating interfaces for package decode_config (because package/package.xdc.inc is older than package.xdc) ...

    configuring decode.xv5T from package/cfg/decode_xv5T.cfg ...

    Info: Configuring engine named 'decode' from the info file for DSP server './bin/cs.x64P',

              located in package 'ti.sdo.server.cs':

          Target app will look for the DSP server image 'cs.x64P' in its current directory.

         ....

    Info: Reading DSP memory map from the info file for DSP server './bin/cs.x64P',

          located in package 'ti.sdo.server.cs':

        package ittiam.extensions.audio1 not found, skipping..

       ...

    will link with lib/release/rmm.a470MV;lib/release/smgr.a470MV;lib/release/rmmp.a470MV;lib/release/smgrmp.a470MV;lib/release/shm.a470MV

       ...

    clv5T package/cfg/decode_xv5T.c ...

    Compiling audio.o from audio.c..

    audio.c:1: error: bad value (armv5t) for -march= switch

    audio.c:1: error: bad value (armv5t) for -mtune= switch

    make: *** [audio.o] Error 1

  • Indeed instead dvsdk_3_10_00_16 I used dvsdk_3_10_00_12. It seems dvsdk_3_10_00_12 is configured better than dvsdk_3_10_00_16.

  • Well finally!  Thanks for the info - it indeed works and builds now.  So what spirit from on high or possibly down below possessed you to know to make this change?  I'm not clear on your question - is this problem in regards to this same stand alone project that you are trying to build?  I did not see this result in my build now that it works.  Is this above that you refer to a result of a make on this standalone project?

    Best regards,
    Tim

  • So why would you be using 12 in lieu of 16?  Are you saying that 12 builds ok without this change and 16 does not?  And if so, then what was the purpose of making whatever changes they did to break it.  And does it make sense that this recommendation provided fixes this problem?  And will this be resolved in future releases so things like this don't require me to waste time trying to figure out how to make it work again when all the previous DVSDKs worked with no issues?  In most cases for me, less abstraction is the preferred path to take.

    Thanks,
    Tim Simerly

  • So many questions!

  • Yes, I'm just perplexed why the Makefile got changed like this with this new DVSDK when all the others prior worked just fine.  This problem was like trying to find a needle in a haystack and was a major time sink for me to do something rather simple and mundane.  Hopefully this kind of abstraction and interdependency amongst other directories with java stuff in future Makefiles will be avoided.

    Thanks,
    Tim

  • Compiling capture.o from capture.c..capture.c:1:0: error: bad value (armv5t) for -march= switchmake: *** [capture.o] Error 1
    I have the same question,waiting for the solution,thanks.

     

  • you can edit the "Makefile" directly,change CC to arm_none_linux...

  • Hello, everybody,

    I have the same problem with compiling demo application, but I use 4.02 DVSDK! I got an error with no definition of rootDir in config.bld:

     

    Making all in subdirectory decode...

    ======== Building decode ========
    Configuring application using decode.cfg

    making package.mak (because of package.bld) ...
    js: "/opt/dvsdk/xdctools_3_16_03_36/packages/xdc/xdc.tci", line 546: XDCException: xdc.bld.ROOTDIR_NOT_SET: 'rootDir' has not been set for the target gnu.targets.arm.GCArmv5T; define 'rootDir' in ./config.bld
    making package.mak (because of package.bld) ...
    js: "/opt/dvsdk/xdctools_3_16_03_36/packages/xdc/xdc.tci", line 546: XDCException: xdc.bld.ROOTDIR_NOT_SET: 'rootDir' has not been set for the target gnu.targets.arm.GCArmv5T; define 'rootDir' in ./config.bld
    gmake: *** No recipe for the target `.configuro'. Stop.
    Warning: directory "/home/alyona.nikiforova/arm_projects/workplace/packages" on package path does not exist
    Warning: directory "/packages" on package path does not exist
    js: "/opt/dvsdk/xdctools_3_16_03_36/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    make[1]: *** [decode_config/compiler.opt] Error 1
    make: *** [decode] Error 2 

     

    Can anyone help me with this issue?