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.

SYSBIOS 6 with Legacy DSP/BIOS APIs and NDK compilation

Other Parts Discussed in Thread: TCI6636K2H, SYSBIOS

Hi
I am working on EVM TCI6636K2H.
I upgraded my old project which worked with DSP/BIOS to SYS/BIOS in order to work with elf.

Therefore I am trying to create a project on C66XX with SYSBIOS 6 and NDK 2.22 but with legacy DSP/BIOS apis.

To the regular template I've added

LCK_Attrs attrs;

LCK_Handle lck = LCK_create(&attrs);

in the main

In order to link the legacy DSP/BIOS apis I added as the first line in the cfg file "xdc.loadPackage('ti.bios.tconf');"
When I try to add NDK with the following line in the cfg

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

I get the error:

js: "C:/ti/ndk_2_22_02_16/packages/ti/ndk/config/package.xs", line 47: TypeError: Cannot read property "target" from undefined (C:/ti/ndk_2_22_02_16/packages/ti/ndk/config/package.xs#47)
    "E:/Workspace/TestNetwork/TestNetwork/app.cfg", line 2
    "./package/cfg/app_pe66.cfg", line 191

How can i get it all to work together?

Attached is a project example

TestNetwork.zip
  • Thank you for attaching the project.  I looked at this and didn’t see any obvious issues. 

    I also searched our archives and see a similar problem reported early this year, but there wasn’t a resolution posted for that thread. 

    I will have to get setup and try to recreate this problem, and then get back to you.  Can you please describe your setup?  What version of CCS are you using, and what software components have you installed with it?

    Thanks,
    Scott

  • The setup is as follows:

    CCS - Version: 6.0.1.00040

    Compiler version 7.4.8

    Varient : Generic C66xx Device

    XDC: 3.30.3.47_core

    Keystone2 PDK - 3.0.4.18

    NDK 2.22.2.16 (i did try 2.20.6.35 as well as another post suggested but it didn't help)

    SYS/BIOS - 6.40.2.27

    I hope that is all of the information that is needed

  • Thanks for the details.

    We recreated the failure, and then traced it to a collision between global variables used in the backend configuration scripting code, when using both the legacy APIs and NDK together.  I filed a defect report for this: SDOCM00113848  

    There are two workarounds to get beyond this until a future product release incorporating a fix:

    1) Modifications to your application .cfg files.  
    After the loadPackage() for ti.bios.tconf, temporarily reassign “prog” to “Program”, before the call to useModule() of ti.ndk.config.Global.  Then after that useModule(), reassign “prog” to the value saved after the earlier loadPackage().  Then, at the very end of your .cfg file, again set “prog” to “Program”.  Like this:

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

    var myprog = prog;
    prog = Program;

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

    prog = myprog;

    <rest of config settings >

    prog = Program;

    Save the file, clean the project, and rebuild.

    2) Backup two NDK files, then edit them.  
    In your NDK release, in the <NDK install directory>/packages/ti/ndk/config directory, backup Global.xdt and package.xs.  Then edit these files, replacing usage of the variable “prog” with “Program”.  Save the files, clean the project, and rebuild.

    The first option should workaround the problem, and avoids needing to edit files in your NDK installation.  But you will need to do this in all your application .cfg files (if you have multiple). 

    The second option is preferred, but does require editing the NDK files directly.

    Sorry for the trouble that this caused.

    Scott

  • Both workarounds worked.

    Thanks