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.

CCS/TMS320C6678: Relative path added to environment['config.importPath'] in .cfg file doesn't work when opened using XCONF Graphical Editor

Part Number: TMS320C6678

Tool/software: Code Composer Studio

CCS: 7.2

Here is the tree map of directories and files:

|-proj

     |-example_proj_rtsccfg

                         |-Debug

                                |-configPkg

|-xdccfg

    |-c66_plat.cfgi

  • The folder configPkg in Debug is automatically generated by xdctools.
  • Inside the folder xdccfg there are some xdc configuration files to be used by importation. (so I changed the extension name for a clearer look.)

Phenomenon:

I added the following codes into the cfg file for project:

environment["config.importPath"] += ";../../../../xdccfg";
utils.importFile("c66_plat.cfgi")

The building process goes great, and the path is relative to the directory configPkg.

But if I open the project's .cfg file in CCS window using XCONF graphical editor, CCS tells me that "Can't find import file:'c66_plat.cfgi'". And so, the configuration values inside the editor are default values, not the values I writes inside the xdc configuration file.

If I change the relative path mentioned above to a absolute path, everything is good.

So I guess it's some problem about the base searching path.

Question:

Then how can I continue using the relative path and workaround this problem?

  • I am not sure that I understand your directory architecture, but I think XGCONF normally picks up the current directory from the location of the config script.
    You could try adding multiple paths to config.importPath:
    environment["config.importPath"] += ";../../../../xdccfg;../xdccfg";
    assuming that the config script is in example_proj_rtsccfg
  • Hi, Sasha.

    I tried appending new path to the config.importPath, it doesn't work.

    Does it only function when building process has started?

    But I found that when I changed the path parameter of utils.importFile() remaining config.importPath untouched, it works, no error message is shown when XCONF is opened.

    The changed code is here:
    utils.importFile("../../xdccfg/c66_plat.cfgi");

    And now the building process still works, amazing.
  • When you say it doesn't work, does it mean you get the same error as before or there is a new error? I have tested it on a similar example, and it did work for me but it's possible that the exact relative path that you need to use is different from my example.
    I can't explain why would you changed code work in both use cases, but using the same relative path for config.importPath would not. The standard way of dealing with these paths is to use XDCPATH environment variable, but you probably don't want to switch to it if you have everything working.
  • Hi, Sasha.

    I mean the same error.

    Is the standard way to configure the XDCPATH in CCS's project properties page? I didn't use this way because the XDC configuration file is shared between multiple RTSC projects. I thought maybe setting the searching path in the .cfg file is more convenient.
  • If you need to use the same XDCPATH component in multiple projects, you can go to Window->Preferences->Code Composer Studio->Products->RTSC, and add any directory to Products and Repositories.

  • Hi, Sasha.

    I usually, for a new real-life project, create a new workspace, which contains multiple CCS projects that share some codes.
    I remember that, If I make a change to 'Window->Preferences->Code Composer Studio->Products->RTSC', then it always applies whichever workspace I choose when I start a CCS session. This is just a another problem I want to deal with.

    For example:
    I may use one workspace for developing C6678's program and add multiple Products and Repositories from Processor-SDK into that workspace. After some time I may switch to another workspace for developing RM57's program, but at this time, I may want to use different Product and Repo from a different path. But now I have to change the settings of Window->Preferences->Code Composer Studio->Products->RTSC to make it happen.

    Is there any way to restrict the setting of Window->Preferences->Code Composer Studio->Products->RTSC to current workspace?

    Or am I using the CCS in a wrong way?
  • I don't think you are using CCS in a wrong way, it's just different from how I am using it. I just add every product that I may ever need and I use only one workspace. For each project, I go and select product and repositories in the project properties. But I don't really have groups of related projects, so multiple workspaces wouldn't save me any time or make things easier.

    Now, I can hope that someone else in this forum can answer if there is a way to connect a workspace and products in preferences. My guess is that the answer is no.