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.

XDC error: Cannot read property "target" from undefined

Other Parts Discussed in Thread: TMS320C6657

Hi

I am trying to incorporate the XDC configuration from the NDK example "client.cfg" into my own configuration file called app.cfg.

But when I add the line  

var Global = xdc.useModule('ti.ndk.config.Global');

to my configuration I get two errors when I compile.

Cannot read property "target" from undefined

Description Resource Path Location Type
Cannot read property "target" from undefined (C:/ti/ndk_2_21_02_43/packages/ti/ndk/config/package.xs#47).

There is no problems compiling the client example project.

I am using the following versions in both projects
MCSDK 2.1.2.6
MCSDK PDK TMS320C6657
NDK 2.21.2.43
SYS/BIOS 6.33.6.50
XDCtools 3.23.4.60
CCS 5.4

Target ti.targets.elf.C66
Platform ti.platform.evm6657

I ahve attached the two cfg files so hopefully someone can tell me what the problem is.

Best

Jens Biltoft

6215.1777.app.cfg

4657.3173.client.cfg

  • Hi Jens Biltoft,

    Moved this thread to TI-RTOS Forum.

    Thanks.

  • OK, that is probably better, do you have any idea what the problem is?

    If I use the command line to run the xs tool The out put is:

    making package.mak (because of package.bld) configuring app.xe66 from package/cfg/app_pe66.cfg 
    js: "C:/ti/ndk_2_21_02_43/packages/ti/ndk/config/package.xs", line 47: TypeError: Cannot read property "target" from undefined (C:/ti/ndk_2_21_02_43/packages/ti/ndk/config/package.xs#47)
    "app.cfg", line 45
    "./package/cfg/app_pe66.cfg", line 201
    "./package/cfg/app_pe66.cfg", line 280
    "./package/cfg/app_pe66.cfg", line 188
    gmake.exe: *** [package/cfg/app_pe66.xdl] Error 1

    Which is pretty much the same as when I compile from CCS

    Best

    Jens

  • Jens,

    XDCtools 3.23 is not compatible with CCS 5.4. You need to used XDCtools 3.25 or later.

    http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/

  • Hi Tom

    I have tried changing to XDC 3.25.0.48 but I  still get excactly the same error. There are no probems when compiling the NDK client example eventhough it uses the XDC version 3.23.

    The error points to the file C:/ti/ndk_2_22_03_20/packages/ti/ndk/config/package.xs line 47

    that have the following content

    function init()
    {
        // Only process during "cfg" phase
        if (xdc.om.$name != "cfg") {
            return;
        }
    
        // use the modules required by the NDK OSAL
        if (prog.build.target.name == "C64P"            || // Line 47
            prog.build.target.name == "C64P_big_endian" ||
            prog.build.target.name == "C674"            ||
            prog.build.target.name == "C66"             ||
            prog.build.target.name == "C66_big_endian") {
    
            var Ecm       = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
        }
        var Hwi       = xdc.useModule('ti.sysbios.hal.Hwi'); 
        var Error     = xdc.useModule('xdc.runtime.Error');
        var Clock     = xdc.useModule('ti.sysbios.knl.Clock');
        var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
        var Cache     = xdc.useModule('ti.sysbios.hal.Cache');
        var Ndk       = xdc.useModule('ti.ndk.rov.Ndk');
    }
    


    Any ideas how to set target in the prog.build?

    Best

    Jens

  • Jens,

    can you please check which version of NDK you are actually using? I see a 1.21 and 1.22 beginning referenced here.

    Also, please remove:

    xdc.loadPackage("ti.bios.tconf");
    var SEM = xdc.useModule("ti.bios.SEM");
    var CLK = xdc.useModule("ti.bios.CLK");
    var TSK = xdc.useModule("ti.bios.TSK");
    var LOG = xdc.useModule("ti.bios.LOG");
    var PRD = xdc.useModule("ti.bios.PRD");
    var QUE = xdc.useModule("ti.bios.QUE");
    var STS = xdc.useModule("ti.bios.STS");
    var MBX = xdc.useModule("ti.bios.MBX");
    var SWI = xdc.useModule("ti.bios.SWI");
    var MEM = xdc.useModule("ti.bios.MEM");

    from your app.cfg. These are DSP/BIOS API wrappers for SYS/BIOS. As of NDK 2.22 no longer supports DSP/BIOS and the DSP/BIOS APIs should not be used anymore.

  • Tom

    I have been trying different versions of NDK both 1.21 and 1.22 but it does not change the result.

    Going forward I will use 1.21 since I cannot do without the DSP/BIOS API wrappers at the moment.

    Jens

  • Tom

    I tried adding the DSP/BIOS wrapper

    var Global       = xdc.useModule('ti.ndk.config.Global');

    to the client example project, and then I get the same error, eventhough I am using NDK version 1.21

    So it seems that there is an issue with compatibility here???

    Jens

  • Jens,

    I'm a little bit confused here. var Global = xdc.useModule('ti.ndk.config.Global'); was already in the client.cfg when it worked? What was added to the  client.cfg example? Can you repost the broken client.cfg?

    On another note, NDK 2.21 doesn't support DSP/BIOS either, so I don't know if the DSP/BIOS wrappers are causing some issues here. You can perhaps try NDK 2.20, but I don't know if these products will work with it.

    MCSDK 2.1.2.6
    MCSDK PDK TMS320C6657

    Where did you get the client application from? Was it from some SDK?

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ndk/2_21_00_32/exports/ndk_2_21_00_32/ndk_2_21_00_32_ReleaseNotes.html

  • Tom

    It seems that I have made a copy and paste error in my previous post.

    The line I added in the beginning of the client.cfg file was

    xdc.loadPackage("ti.bios.tconf");

    And after adding this I get the same errors as in my own app.cfg.

    Other than that it should not be that confusing, I use the example that comes with the NDK 2.21

    I would like to try with version 2.20, can you tell me where I can download this version?

    Jens

  • Hi Jens,

    Please download the NDK (2.20.00.19) package from below link.

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ndk/index.html

    Thanks.

  • Hi

    I tried installing version 2.20, but when I start CCS5.4 it complains that I have version 2.22 installed, so it will not install 2.20.

    I really doubt that it would Work though, since C66 is not mentioned before version 2.21. This leds me to conclude that I will have to update my legacy DSP/BIOS code to SYS/BIOS.....bugger!