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/CODECOMPOSER: Cannot remove source location filter

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: PROFIBUS, SYSBIOS,

Tool/software: Code Composer Studio

Hi all,

I am developing a project based on a TI example. The folder "src" was marked for not being compiled with a "source location filter" (Project properties -> Paths and symbols -> Source Location tab, then "Edit filter"). Usually I keep my code in a folder called "src", so I renamed the original folder to "src-dontbuild" and added a new one.

To my surprise, everytime I start Code Composer, my own "src" folder is marked for being excluded from compilation. I remove the filter, compile, and it runs fine, but the next time I restart Code Composer, it marks my folder again and does not build it by default.

Is there any way to make these settings permanent? (as they should be)

BTW I am using CCS 7.2.0.00013

Thank you very much in advance,

Alejandro.

  • Alejandro,

    When you say "paths and symbols" is this what you are talking about?

    I have never tried using a filter in there.  We actually hide those options under Advanced Settings.  

    To exclude a file or folder from the build, right click on the item and select "Exclude From Build" on the context menu.  This does seem to adjust the filters show in that dialog above but I would just use the "Exclude from build" option and not try to modify the filters directly.

    I have confirmed that I can:

    1. start with a src folder that is excluded
    2. name it to src-dontbuild.
    3. it stays excluded (the filter also updates)
    4. add a src folder
    5. the src folder is not excluded
    6. restart ccs and the project still builds correctly 

    Can you try starting with the example again and stay clear of modifying the filter.

    Also if you can point me to the example you are using I can test it out here as well.

    The exclusions are saved in the .cproject file.

    There will be a section called <sourceEntries> inside of that you should see something like:

    <entry excluding="src-dontbuild" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>

    Regards,

    John

    Regards,

    John

  • Hi John,

    I removed the filter by using the steps described (which you have followed as well) after googling for suggestions; the [mouse right button]->exclude from build is much faster, and is my preferred way to do it. Nevertheless, everytime I open Code Composer,it modifies the .cproject file. To check this, I opened this file with an external editor, then opened the CCS project, and the editor showed a message, "the file has been modified externally, reload?"

    After reloading the file, I can see a line that looks like:

    <entry excluding="src|AM335x.lds|src-dontbuild" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>

    where the "src" at the beginning of the string was away before reloading the file.

    I agree this is quite a weird behavior, why could CCS overwrite my preferences? Is there any other setting I should check?

  • If you close CCS
    manually change the .cproject file to have "AM335x.lds|src-dontbuild" instead of "src|AM335x.lds|src-dontbuild"
    Then open CCS

    Does it change the file back?

    Would it be possible to export the project to a zip and attach it?

    John
  • Hi John,

    Manually deleting the "src" string did not change anything after re-opening the project. However, I have been able to solve the issue. In addition to removing the "exclude filter" (either from the CCS GUI or editing the .cproject file by hand), I had to manually remove the .exclude file on the "src" directory. I know this file is created when you exclude files or folders from the build in the project explorer view; since it is a hidden file, I could not see it on Windows Explorer.

    Maybe CCS was "seeing" the file and re-building its exclude filter, or the other way around. Anyway, after removing both filter and .exclude, the "src" folder is built everytime I open CCS.

    Thank you very much for your time.

    Best regards,

    Alejandro

  • Alejandro,

    Thanks for posting this. I haven't had any luck getting CCS/Eclipse to create the .exclude file but if I manually create one I can see that it does exclude the folder that it is present in. Not sure where it came from here but now I know to look for it if someone else sees something similar.

    Regards,
    John
  • JohnS said:
    Not sure where it came from here but now I know to look for it if someone else sees something similar.

    Is it something that xdc.tools.configuro creates?

    Looking at some SYS/BIOS projects there is a src\.exclude file which gets created, which contains the text:

    This file exists to prevent Eclipse/CDT from adding the C sources contained in this directory (or below) to any enclosing project.

  • If that is the case then it is not a good idea to mess with that folder as something could go wrong with the SYS/BIOS build.

    Alejandro can you point to where the example came from?

  • Hi JohnS,

    Sorry for my late reply. Actually we have frozen the project I was working on, since we will use a very different approach, so I completely forgot about your post.

    My project was based on the PROFIBUS slave example on the Industrial SDK (I know it is deprecated, but we had started with it long ago, and migrating to the current PDK broke too many things). It already had an "src" folder (it contained sysbios.aa8fg), which I renamed to src-dontbuild (the folder was already marked for not being built).

    According to what Chester said, if having a folder named "src" may cause trouble, I would rather reserve it for used-defined folders, since it is a very common name in software projects. The actual code of the application was in the "APP" directory.

    Again, we are probably not working on that project anymore, but I think the issue with the "src" default name is worth solving -- I don't know whether it is due to the configuro tool or to CodeComposer/Eclipse itself.

    Best regards,

    Alejandro.

  • Alejandro,

    This is valid input. Really we should be using a name other than /src for our use but if we must use that name then we need to be careful about ending up in the situation where users have files in there and hence get excluded.

    Regards,
    John
  • One of our SYS/BIOS experts provided a way to control the folder that gets generated. In your .cfg file you can control the location with BIOS.libDir


    BIOS.libDir = “myFavoriteDir”;

    // Will place the “myFavoriteDir” in this CCS project’s Debug (or Release)/configPkg/ directory.



    BIOS.libDir = “../../myFavoriteDir”;

    //Will place the “myFavoriteDir” in this CCS project’s root directory.