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.

XDM GenAlg Wizard Failure in CCS 4.2.3

Guru 10685 points
Other Parts Discussed in Thread: SYSBIOS

I am trying to create my own algorithm in CCS 4.

I have the default CCS installation which installs XDAIS for you. I use "Tools->XDAIS->GenAlg" to run the wizard. I enter the following settings:

When I click on "Finish" it comes up with this error:

"An error while creating package mycompany.mymodule:

TypeError: Cannot read property "cgTools" from null".

 

Anyone have any tips - I'd be grateful to hear them? Slightly surprised that this wizard doesn't just work out of the box.

Thanks,

Ralph

 

  • What is the XDCtools version being used by Code Composer? You can find out by selecting Windows->Preferences->CCS->RTSC. It will be shown under "RTSC support" in the right pane.

    Also, can you verify that the directory "Program Files\Texas Instruments\<XDCtools version>\packages\ti\targets\elf" is present?

    Joe

  • Hi,

    thanks for your reply.

    I do have "C:\Program Files\Texas Instruments\xdctools_3_20_08_88\packages\ti\targets\elf" present.

    In Windows->Preferences the XDC version is the same; 3.20.8.88.

     

    I can give you some useful information garnered from another thread of mine; choosing the COFF format successfully creates the packages but selecting ELF fails. How do I get ELF to work? It is the current format and COFF is meant to be deprecated ("legacy").

     

    Ralph

     

  • This is a bug. An incident report has been filed:  SDOCM-- IncidentReport SDOCM00081266

    The resolution will be available in the next XDAIS release. For immediate resolution, copy the two files in the attachment to your GenAlg install directory:

    "Program Files\Texas Instruments\<xdais install dir>\packages\ti\xdais\wizards\genalg"

     

    Regards,

    Joe

     

    GenAlg.zip
  • My third bug find for the EZSDK.... :-/

    Look forward to it being solved in the general release. Thanks for the temporary fix and for being so quick at sorting it out. I tried the fix and it appears to work.

    Ralph

  • Hmm, I'm not so sure about the effectiveness of the fix to GenAlg on CCS 4.2.3 now.

    I used it to create a basic IUNIVERSAL algorithm and then imported the created CCS project into CCS.

    When I tried to build it I get these errors:

    C:\Program Files\Texas Instruments\xdctools_3_20_08_88\gmake
    "C:/Program Files/Texas Instruments/xdctools_3_20_08_88/xdc" XDCOPTIONS= XDCARGS="CGTOOLS_C674=\"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000\"" --xdcpath="C:/Program Files/Texas Instruments/xdais_7_20_00_07/packages" release
    cygwin warning:
      MS-DOS style path detected: C:/DOCUME~1/ralphc/LOCALS~1/Temp/make4376-1.sh
      Preferred POSIX equivalent is: /cygdrive/c/DOCUME~1/ralphc/LOCALS~1/Temp/make4376-1.sh
      CYGWIN environment variable option "nodosfilewarning" turns off this warning.
      Consult the user's guide for more details about POSIX paths:
        http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
    making package.mak (because of package.bld) ...
    gmake.exe: *** No rule to make target `release
    '.  Stop.
    gmake: *** [all] Error 2

    I didn't do anything special when creating the project. What do I need to do to get it compiling? I was expecting it to build straight away, as the Linux version of the project created by the Linux GenAlg does....

    Thanks,
    Ralph

  • I have lot of problems including xdcpaths from folder names with spaces. I would try  "TexasI~1" instead of "Texas Instruments" and also do the same thing for program files in the makefile. Here is mine that works :

     

    # your various installation directories

    XDC_INSTALL_DIR=C:/TexasI~1/ccsv5/xdctools_3_20_08_88

    CE_INSTALL_DIR=C:/TexasI~1/ccsv5/codec_engine_3_21_00_13_eng

    XDAIS_INSTALL_DIR=C:/TexasI~1/ccsv5/xdais_7_21_00_01_eng

    CODEGEN_INSTALL_DIR=C:/TexasI~1/ccsv5/tools/compiler/c6000

    SYSBIOS_INSTALL_DIR=C:/TexasI~1/ccsv5/bios_6_31_04_27

    FC_INSTALL_DIR=C:/TexasI~1/ccsv5/framework_components_3_21_00_17_eng

    #uncomment this for verbose builds

    #XDCOPTIONS=v

     

    # If we're a subcomponent, allow larger product settings to override our

    # defaults.  The variable $(RULES_MAKE) can be overridden on the 'make'

    # command-line if the location below is not correct (for example, if you

    # want to use a Rules.make from some other location.

    RULES_MAKE := $(CE_INSTALL_DIR)/../Rules.make

    ifneq ($(wildcard $(RULES_MAKE)),)

    include $(RULES_MAKE)

    endif

    CGTOOLS_C64P=$(CODEGEN_INSTALL_DIR)

    XDCARGS=CGTOOLS_C64P=\"$(CGTOOLS_C64P)\"

     

    XDCPATH=$(CE_INSTALL_DIR)/packages;$(XDAIS_INSTALL_DIR)/packages;$(FC_INSTALL_DIR)/packages;$(SYSBIOS_INSTALL_DIR)/packages

     

    all:

    "$(XDC_INSTALL_DIR)/xdc" XDCOPTIONS=$(XDCOPTIONS) XDCARGS="$(XDCARGS)" --xdcpath="$(XDCPATH)" release

     

    clean:

    "$(XDC_INSTALL_DIR)/xdc" clean

  • Thanks for the tip. Now you mention it I've noticed other people on the forums have problems with spaces. I just never thought it would happen to me. :-/

    I've discovered that doing "Project->Build All" causes the project to build fine. It's when I do "Project->Rebuild All" that the errors listed above occur.

    Ralph

  • Here is what I did :

     

    I selected COFF c64 format to get it working, without the errror.  In generated folder, I set 

     

    var targ = xdc.useModule("ti.targets.elf.C674");

     

    in config.bld. It looks like this:

     

    /*

     *  ======== config.bld ========

     *  This script is run prior to all build scripts.  It initializes the

     *  rootDir configuration parameter of all supported targets.

     *

     *  There are more details about config.bld here:

     *  http://rtsc.eclipse.org/docs-tip/Glossary#config.bld

     */

     

    var Build = xdc.useModule("xdc.bld.BuildEnvironment");

    var Pkg = xdc.useModule("xdc.bld.PackageContents");

     

    var C64P_rootdir;

     

    /* initialize local vars with those set in rules.mak (via XDCARGS) */

    for (x = 0; x < arguments.length; x++) {

        if (arguments[x].match(/^CGTOOLS_C64P=/)) {

            C64P_rootdir = arguments[x].split("=")[1];

        }

    }

     

    /* should test here that cgRootDir is set! */

    var targ = xdc.useModule("ti.targets.elf.C674");

    targ.rootDir = C64P_rootdir;

    targ.ccOpts.suffix = "-mi10 -mo ";

    Build.targets.$add(targ);

     

    /* We remove a few profiles, just to cut down on build time */

    delete targ.profiles["coverage"];

    delete targ.profiles["profile"];

    delete targ.profiles["whole_program"];

    delete targ.profiles["whole_program_debug"];

     

     

    /* Create a .zip file for redistribution.  Remove this line if you prefer .tar */

    Pkg.attrs.archiver = 'zip';

    I do a make from command line.  

  • What do you mean when you say you selected COFF c64 as output? I'm confused as you then have "ti.targets.elf.C674" in your config.

    Ralph

  • COFF c64p to get the wizard to work, otherwise it errors out. But 8168  needs elf, so I set it manually after the wizard is done in config.bld.

  • Ah clever. I used the patch provided a few posts up in this thread which seems to do the trick.

    I tried changing the path names to the DOS equivalents and still no luck.

    And does the algorithm project you create with GenAlg build fine?

    Just checked and neither "Project->Build Active Project" nor "Project->Rebuild Active Project" work for me.

    Ralph

  • I checked. It works for me. When you did import the existing project into ccs, did you copy it to your workspace ? I had to leave the project where it was and uncheck workspace copy option. I still had to fix the makefile to include other folders , like framework components or cetools, sysbios,ipc,xdais to XDCPATH variable.

     

    CCS compiles  as follows:

     

     

    C:\Texas Instruments\ccsv5\xdctools_3_20_08_88\gmake 

    "C:/TexasI~1/ccsv5/xdctools_3_20_08_88/xdc" XDCOPTIONS= XDCARGS="CGTOOLS_C64P=\"C:/TexasI~1/ccsv5/tools/compiler/c6000\"" --xdcpath="C:/TexasI~1/ccsv5/codec_engine_3_21_00_13_eng/packages;C:/TexasI~1/ccsv5/xdais_7_21_00_01_eng/packages;C:/TexasI~1/ccsv5/framework_components_3_21_00_17_eng/packages;C:/TexasI~1/ccsv5/bios_6_31_04_27/packages" release

     

     

  • Hi,

    in CCS 5.0.3 (the latest) I created my algorithm using GenAlg to be a C674 COFF. Then I edited the config.bld file and changed

    var targ = xdc.useModule("ti.targets.C674");

    to

    var targ = xdc.useModule("ti.targets.elf.C674");

    It is now identical to yours as posted above.

    Then I used "Project->Import Existing CCS/CCE Eclipse Project" to import the project without copying the project to the workspace.

    I noticed that I had the error:

    making package.mak (because of package.bld) ...
    gmake.exe: *** No rule to make target `release

    as before so I replaced all references to "Program Files/Texas Instruments" with "PROGRA~1/TEXASI~1". I reimported the project but still got the same error.

    I noticed that although CE_INSTALL_DIR was used in the Makefile, it was not defined so I added that. Still didn't build.

    I noticed that XDAIS_INSTALL_DIR was set to the cetools directory in Codec Engine so I changed that to point to the actual XDAIS directory. Still didn't build.

    I then added

    $(XDAIS_INSTALL_DIR)/packages;$(FC_INSTALL_DIR)/packages;$(SYSBIOS_INSTALL_DIR)/packages

     to my XDCPATH in the makefile and defined these variables as you've done.

    I realised I didn't have Framework Components installed so had to download it and stick in "Program Files\Texas Instruments". Still didn't build.

    I noticed in your makefile that you have your CODEGEN_INSTALL_DIR pointing to the CCS 5 version whereas my CCS 5 GenAlg wizard has created a makefile with this variable pointing towards the CCS 4 version, so I changed this to match yours as well. Still didn't build.

    No matter what I do I still get this bizarre error "gmake.exe: *** No rule to make target `release".

    Oh well. Thanks very much anyway for all your tips RV.

    The only thing I can see that could be the problem is the fact that you seem to have your CCS 5 install in a separate nested folder in "Texas Instruments" whereas mine is in "Texas Instruments" itself along with CCS 4; well, CCS 4 is in "Texas Instruments\ccsv4" and CCS 5 is in "Texas Instruments\ccsv5.

     

    Ralph

     

     

  • Ralph,

    I'd like to try to reproduce this. Can you please zip your project and post it?

     

    Joe

  • Hi Joe,

    thanks for your reply. Would you like the original project before the edits that I've made or would you like the one with all the changes manually made?

    Thanks,

    Ralph

  • Can you post both in separate zips?

     

    Joe

  • Hi Joe,

    I attach 3 things;

    1. An image of the settings I used in the CCS 5 GenAlg wizard that was used to create the project.
    2. The project folder after it had been imported into CCS 5 (and a build by CCS automatically attempted). GenAlg default output.zip
    3. The project folder after I exited CCS, edited the makefile and config.bld as described in my previous post, followed by reimporting the project into CCS 5 (and a build by CCS automatically attempted). Altered makefile and config.bld.zip

    In both cases the project contents was _not_ copied into the CCS workspace when using the project import wizard.

    Thanks a lot,

    Ralph

    2744.GenAlg default output.zip

    4212.Altered makefile and config.bld.zip

  • Ralph,

    Unfortunately, both projects build successfully on my CCSv5 setup.  Can you try building from a DOS prompt? You will need to modify/set some system  environment variables:

    1. Go to Control Panel->System-Advanced->Environment Variables

    2. Add %XDCROOT% to your PATH

    3. set XDCPATH to C:/Program Files/Texas Instruments/xdctools_3_20_08_88/packages

    4. Verify that XDCROOT is C:/Program Files/Texas Instruments/xdctools_3_20_08_88

    Then start a DOS command prompt and cd into your mymodule directory and type "gmake"

    Joe

  • Hi Joe, I had XDCROOT set and in my PATH. I did not have XDCPATH set so I set it and restarted CCS. Reimporting the project caused the autobuild to give the same error.

    Then I did the DOS compilation and the same errors were present:

    C:\Documents and Settings\ralphc\My Documents\workspace_ccs5\mycompany\mymodule>gmake
    "C:/PROGRA~1/TEXASI~1/xdctools_3_20_08_88/xdc" XDCOPTIONS=v XDCARGS="CGTOOLS_C674=\"C:/PROGRA~1/TEXASI~1/ccsv5/tools/compiler/c6000\"" --xdcpath="C:/PROGRA~1/TE
    XASI~1/xdais_7_20_00_07/packages;C:/PROGRA~1/TEXASI~1/xdais_7_20_00_07/packages;C:/PROGRA~1/TEXASI~1/bios_6_31_04_27/packages;C:/PROGRA~1/TEXASI~1/framework_com
    ponents_3_20_02_29/packages" release
    cygwin warning:
      MS-DOS style path detected: C:/DOCUME~1/ralphc/LOCALS~1/Temp/make1320-1.sh
      Preferred POSIX equivalent is: /cygdrive/c/DOCUME~1/ralphc/LOCALS~1/Temp/make1320-1.sh
      CYGWIN environment variable option "nodosfilewarning" turns off this warning.
      Consult the user's guide for more details about POSIX paths:
        http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
    '.  Stop.3_20_08_88\gmake.exe: *** No rule to make target `release
    gmake: *** [all] Error 2

    C:\Documents and Settings\ralphc\My Documents\workspace_ccs5\mycompany\mymodule>echo %XDCPATH%
    C:/Program Files/Texas Instruments/xdctools_3_20_08_88/packages

    Now, I have Cygwin installed so could this be causing a problem with its paths superseding those for CCS?

    Ralph

  • Ralph,

    Your Cygwin somehow conflicting with xdctools is worth investigating. Can you  eliminate it from the equation and see how the DOS build goes?

     

    Joe

  • It works!

    The PATH for my system meant that some Cygwin binaries were getting called instead of the TI ones in CCS (don't know which ones). For information, I had to completely remove "C:\cygwin\bin;". Moving it to the end of my PATH to reduce its "priority" of being found did not fix anything (it was already placed after %XDCPATH%). Bit of an obscure problem that one.

    Thank you very much,

    Ralph