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 forgetting "Exclude from Build" setting inside linked folders

Other Parts Discussed in Thread: C2000WARE

For a C2000-based project, I have some C2000Ware folders added to the project as linked folders (namely, the folder corresponding to the chip in device_support, driverlib and flash_api).

Those folders also contain files which should not be part of the build, e.g. the examples/ directory, files specific to that chip's ARM core (which won't compile on the C2000 cores), or files that have been copied into the project directory for modifications (most importantly the interrupt table).

As such, those files have been set to be excluded from the build. Unfortunately, CCS commonly seems to "forget" about the exclude setting, causing a plethora of build errors. This is not only transient behaviour in CCS internals, but is also very evident inside the .cproject files, wherein CCS changes from:

<entry excluding="device_support/headers/cmd/f2838x_headers_BIOS_cpu2.cmd|device_support/headers/cmd/f2838x_headers_nonBIOS_cpu1.cmd|device_support/headers/cmd/f2838x_headers_BIOS_cpu1.cmd|device_support/common/source/f2838x_eqep.c|device_support/common/source/f2838x_epwm.c|device_support/common/source/f2838x_emif.c|device_support/common/source/f2838x_ecap.c|device_support/common/source/startup_cm.c|device_support/common/source/f2838x_swprioritizedpievect.c|device_support/common/source/f2838x_sysctrl.c|device_support/common/source/f2838x_defaultisr.c|device_support/common/source/cm.c|device_support/common/cmd|device_support/examples|driverlib" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>

to:

<entry excluding="driverlib" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="driverlib/inc"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="driverlib/ccs"/>

The exact folder mapping to the C2000Ware_3_03_00_00 directories is as follows (Project => C2000Ware):

device_support/ => device_support/f2838x/
driverlib/ => driverlib/f2838x/driverlib/

I am currently using CCS version 12.0.0.00009, having upgraded the project from CCS 10.2.0.00009 in the process of setting up the linked folders. The issue is present in both versions, but much more common in 10.2 than 12.0.

It is also not 100% reproducible. Whether this issue occurs seems to depend on how long one waits to build the projects after starting up CCS. A wait time too short or too long seems to trigger the error, whereas it works fine if starting a build a few seconds after CCS seems idle after startup. CCS 12.0 command line builds are unaffected and work as expected, whereas CCS 10.2 command line builds did not work (although I am not 100% sure if it is the exact same issue).

I found two (identically titled) old threads, which might have run into the same issue, affecting CCS 8.2 and 9.0, including three bugtracker references inaccessible to me (CCSIDE-3439, CCSIDE-3528, CCSIDE-3529):
CCS/TM4C129CNCPDT: CCSv8.2 and "Exclude from Build" no longer works - Code Composer Studio forum
CCS/TM4C129CNCPDT: CCSv8.2 and "Exclude from Build" no longer works - Code Composer Studio forum
The Directory Specifier Mode setting mentioned in both threads does not fix the issue at hand.

  • Hi Markus,

    I will transfer this question over to the CCS team and they can look into this for you

    Regards,

    Peter

  • Hello Markus,

    For a C2000-based project, I have some C2000Ware folders added to the project as linked folders (namely, the folder corresponding to the chip in device_support, driverlib and flash_api).

    Those folders also contain files which should not be part of the build, e.g. the examples/ directory, files specific to that chip's ARM core (which won't compile on the C2000 cores), or files that have been copied into the project directory for modifications (most importantly the interrupt table).

    As such, those files have been set to be excluded from the build.

    I assume that you have linked folders to your project and have then excluded specific files in the linked folder (instead of excluding entire folders). Is that correct?

    If so, I am unable to reproduce the issue. The exclude files/folder options works as expected for me. I can exclude entire linked folders or just specific files in them. Either way it works as expected

    It is also not 100% reproducible. Whether this issue occurs seems to depend on how long one waits to build the projects after starting up CCS. A wait time too short or too long seems to trigger the error, whereas it works fine if starting a build a few seconds after CCS seems idle after startup.

    This is odd. I wonder if after CCS is started, CCS needs to go through the project and apply the file exclusion (and have the "exclude" icon appear on the file). Maybe if you build too fast before it has a chance to apply the exclude parameter, it will try to build those files. This is just a guess. I tried to build ASAP after CCS launches but again I was unable to reproduce the issue.

    If you have a simple test case that reproduces the issue, I'd like to try that.

    I found two (identically titled) old threads, which might have run into the same issue, affecting CCS 8.2 and 9.0, including three bugtracker references inaccessible to me (CCSIDE-3439, CCSIDE-3528, CCSIDE-3529):
    CCS/TM4C129CNCPDT: CCSv8.2 and "Exclude from Build" no longer works - Code Composer Studio forum
    CCS/TM4C129CNCPDT: CCSv8.2 and "Exclude from Build" no longer works - Code Composer Studio forum

    These issues were all fixed in CCS 9.x. I think they are unrelated anyhow.

    Thanks

    ki

  • I assume that you have linked folders to your project and have then excluded specific files in the linked folder (instead of excluding entire folders). Is that correct?

    Exactly. There also is a folder that is entirely excluded, but that does not seem to be causing issues.

    If you have a simple test case that reproduces the issue, I'd like to try that.

    I have created a minimum example project. I ran into the issue a handful of times while creating it, but now it seems to be rather stable. I have however managed to reproduce the issue by pressing Ctrl+B very quickly after CCS startup (resulting in a prompt that CCS is still loading or so before starting the build).

    Here is a git bundle (zipped, as the raw bundle returned a 500 server error upon uploading) with two projects, setup similar to the real project I am encountering the issue in: demo.bundle.zip

  • Thank you for the git bundle. I'll take a look at let you know as soon as I have anything to report.

  • I was unable to reproduce the issue. The excluded files/folders seem to work as expected.

  • I have however managed to reproduce the issue by pressing Ctrl+B very quickly after CCS startup (resulting in a prompt that CCS is still loading or so before starting the build).

    I suspect what is happening is that after CCS is launched and the project opened, CCS needs a bit of time to go through the project metadata to correcty configure the project. For example, when you expand the project folder in the Project Explorer view, It takes a second or two before the folder/file icon has the "excluded" indicator on it. If you kick off a build before that happens, perhaps CCS has not finished fully configuring the project (excluding the specified files/folder) before the build is set in motion. Hence some time of timing issue. This behavior may also be specific to the local environment (PC specs, etc) hence why it is not always reproducible.

    I'll need to check with engineering to confirm.

    Thanks

    ki  

  • I'll need to check with engineering to confirm.

    I followed up with engineering and while the "icon" delay issue is expected, it should have no impact on the actual build. Those files should always be excluded from the build regardless.

    I'm unable to reproduce the issue however. Would it be possible to provide an example test project? It may be something specific to a setting in your projects.

    Also, if it happens again, please send your workspace log file at <WORKSPACE FOLDER>/.metadata/.log

    Thanks

    ki