In CCS v3.3, we can add pre-build command with condition "when any file builds". How to implement this functionality in CCS v6?
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.
Thanks, But it is not exactly what I wanted.
I think the pre-build steps are applicable to the whole project, not a single file.
In CCS v3.3, the run condition "when any file builds" means if no file of the project is built, the custom build command will not be executed. However in CCS v6, without the run condition, each time the project is built, the pre-build step will be executed. How to realize the familiar functionality as in CCS v3.3? That's what I wanted.
Sorry, now I got what was the original intent. I did some experimentation and found out this behavior is expected for the CDT (check the Eclipse documentation) but it only works when using Eclipse's Internal builder (this is shown in this bugzilla).
This option is only available for standard CDT projects but not for CCS projects (perhaps incompatibilities prompted suppressing this option).
I will reply back if I get some additional information but unfortunately at this time this behavior is not possible to be enabled.
I apologize for the inconvenience,
Rafael
Try this workaround:
pre-build: $(C_SRCS) -@echo BEFORE -@echo time >> pre-build -@echo ' '
clean: -$(RM) $(EXE_OUTPUTS__QUOTED)$(BIN_OUTPUTS__QUOTED) -$(RM) "main.pp" -$(RM) "main.obj" -$(RM) "pre-build" -@echo 'Finished clean' -@echo ' '
This would run your pre-build step only when any of the "C" files change, or after the project is cleaned. Is this the behaviour you are looking for?
Thanks,
- Baltasar
Hi, Baltasar
I did The test according to your suggestion.
The result is:
a). Yes, if no "C" file is built, my custom pre-build step will not be executed. The console info shows as below:
"D:\\ti\\ccsv6\\utils\\bin\\gmake" -j 4 all
gmake[1]: `pre-build' is up to date.
gmake[1]: Nothing to be done for `main-build'.
b). But, if I change one of the "C" files(named xxxxx.c), my custom pre-build step will not be executed either.
The console info shows as below:
"D:\\ti\\ccsv6\\utils\\bin\\gmake" -j 4 all
gmake[1]: `pre-build' is up to date.
'Building file: G:/xxx/xxx/src/xxxxx.C'
The modified makefile shows as below:
pre-build: $(C_SRCS)
-my pre-build command
-@echo BEFORE
-@echo time >> pre-build
-@echo ' '
Is is right?
Has this problem that pre-build/post-build does not work for CCS project been fixed in CCS v6.2?
I have tried it but it does not seem to work.
Thanks,
-- Louis