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.

Compiler/MSP430F5659: ccs901 incremental build isn't re-compiling files that include a modified preprocessor define

Part Number: MSP430F5659


Tool/software: TI C/C++ Compiler

I have a header file print.h with the following definition:

    #define PRINTDEVLN(...)    //debug::println(__VA_ARGS__)

This header, as well as PRINTDEVLN() is included in several other source files. When I uncomment the debug::println() function and do an incremental build via the build button (hammer), only print.cpp is recompiled (I expect to see all of the source files that include this macro also be compiled). As expected, the problem isn't an issue when I do a rebuild (Or any sort of clean). I just recently upgraded to CCS9 from CCS8, and I didn't have the problem with the older version. I commented out the entire line, and the compiler complained about one source files missing the function definition (but said nothing about the other files). When I removed the comment and performed another incremental build, print.cpp and the source file with the error were recompiled (but not the other files with the definition).

I feel like I must have an incorrect setting, has anyone else seen something like this?

There are my current settings:

  • MSP Compiler: 18.12.2.LTS
  • CCS Version: 9.0.1.00004
  • Hello Sheldon,
    I tried reproducing this issue but was unsuccessful. I used CCSv9.0.1 with compiler 18.12.1 LTS. i doubt the compiler is the cause here since it seems like a CDT issue. Can you provide more details? For example, where is the header file in relation to the source files? Is the path to it in an include search path? Are the source files linked to the project?

    What might be easiest is to provide a simple (self contained) test case. It could be just a few dummy source files and one header, along with the project metadata. Something that I can import and build myself.

    Thanks
    ki
  • Sorry for the delay in response.

    Where is the header file in relation to the source files?

    The header file is in the project root. The source file I referenced regarding the compile error testing is also in the root. It should be noted however, that I use this header in a lot of files. Some are in the root directory while others are in nested directories. No files are linked resources outside the project.

    Is the path to it in an include search path?

    I am using the default include search paths within the Include Options, see below:

    ${MSP430_DRIVERLIB_INCLUDE_PATH}
    ${CCS_BASE_ROOT}/msp430/include
    ${PROJECT_ROOT}
    ${PROJECT_ROOT}/driverlib/MSP430F5xx_6xx
    ${CG_TOOL_ROOT}/include

    One additional piece of information: I imported this project from a previous version of Code Composer (8.1.0 I believe). I might be able to build a test project, but I'm afraid replicating the exact circumstances to produce this problem may be elusive.

    Thanks,

  • Thanks. I did try importing the project from a previous CCS version without luck (in reproducing the issue). But It was from CCS 8.3.1 to 9.0.1. I can try with 8.1.0 also. 

    If you can put together a really simple test case, that would be very helpful also.

    Thanks

    ki

  • I still have not have any luck reproducing the issue. Any chance you can provide a simple test case?

    Thanks

    ki

  • Hi Ki,

    I am currently tied up with a project and therefore living with the issue. When I get a change I will attempt to build a test project.

    Thanks,

  • Thanks Sheldon.

**Attention** This is a public forum