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.
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.