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.

How to set the c/c++ build option --abi=eabi in the Davinci DM3730 DVSDK4_03?

Other Parts Discussed in Thread: DM3730

We use the Davinci DM3730,the software package is DVSDK4_03.

We use the C6000 compiler v 6.1.14(in the path:/home/davinci/dm3730/dvsdk4_03/cgt6x_6_1_14).

Then we install the compiler v7.3.4(ti_cgt_c6000_7.3.4_setup_linux_x86.bin) in the same path(/home/davinci/dm3730/dvsdk4_03/cgt6x_6_1_14).

Our code is in the path:

/home/davinci/dm3730/dvsdk4_03/codecs-omap3530_4_02_00_00/packages/ti/sdo/codecs.

In the path:/home/davinci/dm3730/dvsdk4_03, there is a xdctools_3_16_03_36. I know it's a compile tools,it generates the file:/home/davinci/dm3730/dvsdk4_03/codecs-omap3530_4_02_00_00/packages/ti/sdo/server/cs/pacakge.mak.We should add the build option --abi=eabi in the file package.mak. But int the file package.mak I saw that:

#
# Do not edit this file. This file is generated from
# package.bld. Any modifications to this file will be
# overwritten whenever makefiles are re-generated.
#

In the file package.bld :

/*
* ======== package.bld ========
*/

Pkg.attrs.exportAll = true;
Pkg.attrs.exportExe = true;

/* Uncomment this to build the server with debug support */
//Pkg.attrs.profile = "debug";

/* bin/ is a generated directory that 'xdc clean' should remove */
Pkg.generatedFiles.$add("bin/");

var fullName = Pkg.name;
var serverName = fullName.substring(fullName.lastIndexOf('.')+ 1);

Pkg.uses = ["ti/bios/include"];

for (var i = 0; i < Build.targets.length; i++) {
var targ = Build.targets[i];

print("building for target " + targ.name + " ...");

Pkg.addExecutable("bin/" + serverName, targ, "ti.platforms.evm3530",
{
// tcopts: "-Dxdc.cfg.check.fatal=false",
cfgScript: "server.tcf",
lopts: "-l link.cmd",
}).
addObjects( [
"main.c",
] );
}

I can't get useful information to add the build option.

All above is the detail,please help me to add the build option.

  • In the file : /home/davinci/dm3730/dvsdk4_03/xdctools_3_16_03_36/packages/ti/targets/elf/C64P.xdc

    there is:

    override readonly config ti.targets.ITarget.Command asm = {

    cmd: "cl6x -c",

    opts: "-mv64P --abi=elfabi"

    };

    override readonly config ti.targets.ITarget.Command lnk = {

    cmd: "lnk6x",

    opts: "--abi=elfabi"

    };

    That is what I need,but how to use make the xdctools_3_16_03_36 use the elf option to generates makefile?

  • Hi Yuxin,

    Which version of BIOS are you building against?

    Best,
    Alexander
  • dspbios_5_41_03_17
  • Yuxin Li,

    I think you are asking how to change the compiler 'abi' option, not the assembler? However, the method is the same for both.

    This type of setting is typically performed in your build script. Find this file in your SDK and then make the following changes. The target has a compiler option property which is a JavaScript string. Once you have a reference to this option, you can use JavaScript to change the value.

    Add the following to your config.bld script.

    var C64P = xdc.useModule('ti.targets.elf.C64P');
    C64P.cc.opts = C64P.cc.opts.replace(/--abi=elfabi/, "--abi=eabi");

    Having said all that, I'm not sure you will be able to use such a new compiler with your old software installation. You cannot mix ABI formats, and I don't think you will be able to rebuild all the libraries with the new compiler. I'm guessing you will get some linker errors.

    Also, it is not a good idea to "over-install" the new compiler in the old compiler directory. I recommend you install the new compiler in a new directory and then modify your SDK top-level makefile to use the new compiler.

    ~Ramsey