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.

SYS/BIOS CFG - "Can't find import file"

I posted on this before but the question has changed enough to start over.

I want to use the same basic CFG in multiple projects, production and test.  I want to add tasks, timers, etc to the test CFG without having to create unused stubs in the production.  In ccsv4 I could import a different TCI file for production and test. The include path was a bit different between editting and compiling but I figured it out.

But, in ccs5 I cannot get the include to work in editting. The CFG file resides in the production project folder.  I added the production CFG to the test project as a link. I created the file UnitTest.tci in the test project folder.

If I put

utils.importFile("UnitTest.tci", "<absolute path"); or
utils.importFile("UnitTest.tci", "<relative path");

in the CFG then the editor cannot find UnitTest.tci.

If I put

utils.importFile("<absolute path>\UnitTest.tci");

then the editor can find the file.

If I put

utils.importFile("<relative path>\UnitTest.tci");

then the editor cannot find the file.

How can I get the editor to import a file from a relative path?

 

  • Hi Kurt,

    Are you talking about the build finding the file or the editor? If it is the editor, I'd like to move this to the CCS forum.

    If it is a build question...

    I tried the following test. I have a project in c:\workspace\messageqArm. The .cfg is in that directory and there is an additional configuration file in c:\workspace\messageqArm\testFolder. I added the following line into my .cfg and the common file was found in the build.

    utils.importFile("testFolder/message_common.cfg.xs");

    Which version of XDC do you have?

    Todd

  • Kurt,
    what was the relative path you were trying to use in the last case?
    If you have a following directory structure:

    workspace
    |
    |------prod
    |           |
    |           |--prod.cfg
    |
    |------UnitTest
                |
                |--UnitTest.tci

    then the following works:
    utils.importFile("../UnitTest/UnitTest.tci");

    However, your prod.cfg would only work with that one unit test, which is not what you probably want. Therefore, you need an environment variable that will be specific for each unit test. I already describe that solution in an earlier thread: http://e2e.ti.com/support/embedded/bios/f/355/t/160020.aspx.

  • the problem is in the editor.

    yes, I tried utils.importFile("../UnitTest/UnitTest.tci") again.  now it works.  not sure what I did wrong on Friday...

    and yes, this particular form will not work for me because it will always grab the same include file regardless of production or unittest build.  I need to investigate that problem some more.

    calling utils.importFile("UnitTest.tci", "<some path>") works in the build but does not work in the editor. the problem in the editor is the problem I am trying to solve in this post.