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.

Portable Project CCSv5 Cannot Resolve Build Variables (Relative Path)

I followed the portable project wiki, but I am unable to create a portable project.  Its seems that CCS cannot use the PROJECT_LOC variable.  I keep getting an error saying that CCS cannot find my linked files (test.h and test.c). I have included screenshot of all the important setting screens below. Please help. The directory added to the Build Variables screen is red... with no further information. Had anyone gotten relative paths to work work in CCSv5? Doesn't seem to work as advertised, is this a bug?

  • Hello,

    have you tried selecting the option "relative to project location" when linking in files?  Have you checked all your search and include paths as well?  CCS needs these added to the build/compiler options for finding header files etc.   Both these items are discussed in the portable project wiki you reference.

    Please check this and keep us posted.

    Best Regards,
    Lisa

  • Hello Grant,

    You cannot use a Linked Resource Path Variable to create a Build Variable. PROJECT_LOC is a Linked Resource Path Variable. Linked Resource Path Variables can ONLY be used to link files to a project. You cannot use it anywhere else (like for your  build options, etc)

    thanks

    ki

  • @Ki - thanks for the post!

    @Grant - please keep us informed whether Kis tip helps explain things for you and helps you get your build variables and include paths etc all set up correctly.  Sorry for missing the point Ki brought up.

    Best Regards,
    Lisa

  • I guess I need to be more general in my question.  I have two folders with the same parent folder:

    Folder 0
    |-----Folder A: test.c, test.h
    |-----Folder B: main.c

    Inside main.c I have the line:
    #include "test.h"

    What is the simpliest way to include the files in Folder A relative to Folder B? Every release of CCS changed the way relative paths are handled and now I am utterly confused.  The wiki article on the topic (the only resource I could find) was not clear to me either. A formal, step-by-step, setup explanation using the simple (yet common) folder hierarchy as an example would help me out a lot. Thanks.

    ~Grant

  • Grant - Is 'Folder 0' your project folder (where the CCS project files .ccsproject, .cproject, .project are located)?

  • Folder B is my CCS project.

    Folder A is include in C2000 Compiler -> Include Options and C2000 Linker -> File Search Path.







  • Hi Grant,

    have you tried adding the path to the SystemModel_ert_rtw to the include search paths?  You have only added it to your library search path.  Also, have you added a dependencies between the two projects?

    Under project properties you can select "Show advanced Settings".  You can see the dependencies in both the CCS Build ->Dependencies tab as well as under Project References near the bottom. 

    Please keep us informed.

    Best Regards,
    Lisa

  • I clicked show advanced settings, added my workspace as the dependency, still does not work.  I copied by screens below.


  • I just imported one of TI's portable CCSv4, I am going to review its projects settings to see what I am doing wrong.

  • Ok, there are two screen that are really important to get portable projects.  One shows the actual command line build commands

    The other is build variables.  CCS can not find your files if the two are not setup properly.

  • Hi Grant,

    very glad you managed to navigate your way through the settings and set the proper paths/links up.


    All the best with development.

    Best Regards,

    Lisa