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/TMS320F28069: "Rebuild Project" won't 'clean' prior to 'all' with external makefile

Part Number: TMS320F28069

Tool/software: Code Composer Studio

Affected Version: CCSv8 (Version: 8.1.0.201805221500 Build id: N201805221500)

Summary: "Rebuild Project" won't 'clean' prior to 'all' with external makefile

Steps to Reproduce:

    1) Create a new CCS project in CCSv8 (empty with main.c)
    2) Build it to generate the makefiles
    3) In project properties, go to 'Build' and deselect "Generate Makefiles automatically"
    4) Right click on the project in the Project Explorer and select "Rebuild Project"

Expected Results:

    "C:\\ti\ccsv8\\utils\\bin\\gmake" -k -j 8 clean -O
    "C:\\ti\ccsv8\\utils\\bin\\gmake" -k -j 8 all -O

Actual Results:

    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 8 all -O


Comments:

    It seems that CCSv8 tries to do some smart things here and detect whether a 'clean' actually is needed.
    It can be seen via a project that generates makefiles automatically by running: "Clean Project" followed by a "Rebuild Project".
    The result is that the rebuild step only calls the 'all' recipe, and never the 'clean'.
    However, when we use an external makefile it does not know how to detect whether the project is already 'clean'ed, and therefore
    takes the wrong action of not 'clean'ing it.
    
    Our team is currently running CCSv6 and are looking into upgrading to CCSv8. This regression is currently stopping us from upgrading
    since it affects our workflow. The expected result from "Rebuild Project" is that it should always do a 'clean' first,
    or at least be very smart about skipping it.
    
    Another way to solve this might be giving the user some way of indicating to CCS whether it actually needs a clean,
    like calling a script to determine this.
    
    This seems to work correctly in CCSv6. I have not tried CCSv7.

  • Johan,

    I see the same behavior that you are reporting in both CCSv7 and CCSv8. In both these versions, once the "Generate Makefiles automatically" is unchecked, then a Rebuild does not trigger a Clean and Build, instead it reports that the build is up to date. In CCSv6, a Rebuild does trigger a Clean and then Build. This appears to be a behavior change starting with certain versions of Eclipse but I'm not certain if it is an intentional change or a bug. I'll check with some experts to see if they know more.

    In the meantime, you could extend the makefile behavior by adding a makefile.init to your project which essentially performs a custom pre-build step.

    Add a file named makefile.init in your project root folder that contains something like the following:

    all: custom-step
    custom-step:
     @echo 'Custom pre-build step'
     DEL /F "${CWD}\*.out" "${CWD}\*.obj"

    The custom-step will run at the beginning of each build and will delete the .out and .obj files so the successive build will be a full build. 

    A bit more information on extending makefiles is available in this page

  • Hi AartiG,

    Thank you for your response, and thank you for successfully reproducing the issue. Please let me know what you find out about Eclipse, I initially suspected that it might be the root cause here.

    I'm afraid the attached makefile does not solve our issue since it seems to delete the artifacts on a normal build as well, triggering a complete rebuild every time. This would be a big problem for us because a complete rebuild takes a long time.

    Best regards

  • Johan Eriksson50 said:
    Please let me know what you find out about Eclipse, I initially suspected that it might be the root cause here.

    I have filed a bug report so this issue can be tracked and investigated. The tracking ID is CCSIDE-3429. Feel free to track it using the SDOWP link in my signature ( after giving it some time to update to server).

    Unfortunately, I haven't found another workaround. But if the engineer looking into the issue finds one, they will update the bug report.

    Thanks for your patience and for bringing this to our attention.

  • Hi AartiG,

    Thank you for your input. I did some further investigation into this issue, and it seems that at least with the latest Eclipse CDT (2018-09) there is no "Rebuild" option in the right click menu. Is this something that CCS added, or has it been removed from Eclipse CDT in some revision?

    I must click "did not resolve" since it did not. I will try to remember to check into SDOWP every day, but it would of course be helpful to get an email whenever the bug report is updated. When this issue has been solved, I will click "This resolved my issue".


    Best Regards
  • Update:

    It seems that the bug has been accepted in the bug tracking tool. The target release for this fix is CCS_9.0.0. Is there any time plan for when this version will be released?

    Extrapolating from your previous releases:
    • v5 - 08 NOV 2011
    • v6 - 29 Apr 2014
    • v7 - 16 Jan 2017
    • v8 - 09 Mar 2018
    • v9 - May 2019 ?


    Yours truly
  • CCS 9.0 is currently planned for end of 1Q 2019.
  • Hello AartiG,

    Is there any way to get this back ported at an earlier date to CCSv8 or earlier?


    Best regards
  • Sorry I don't think that will be possible. We typically do not back port bug fixes into earlier releases.

    We are close to locking down on the 8.3 release, and the next release after that is 9.0.