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
hi,
i'm getting: "warning: ignoring old commands for target" and "warning: overriding commands for target" while building my project.
the project was originally created on CCS5 and I'm using CCS6.
looking on the generated subdir_rules.mk file at the relevant directory I can see there's 2 different build rules for the same obj file, so I assume that's what's causing the problem.
the first rule is basically - <SrcName>.obj: <SrcName>.c $(GEN_OPTS) $(GEN_HDRS)
and the second - <SrcName>.obj: <SrcName>.sa $(GEN_OPTS) $(GEN_HDRS)
so i guess the second one overrides the first.
my question is, how can i change theses rules? specifically, make it dependent at pre-define switch, so if it's defined only the second rule will be applied and vice versa?
thanks in advance,
shay.
Shay,
That makefile is auto-generated by the CCS managed make system, so you cannot directly modify it.
Shay Karuchi said:the first rule is basically - <SrcName>.obj: <SrcName>.c $(GEN_OPTS) $(GEN_HDRS)
and the second - <SrcName>.obj: <SrcName>.sa $(GEN_OPTS) $(GEN_HDRS)
Do you mean that the project has both a .c and .sa file with the same name? If so, that is not recommended.
If that is not the case, please explain the situation in more detail or provide a simple CCS project that reproduces the error.
It is not possible to conditionally exclude a file from build based on a compilation switch. However, you could create two build configurations for the project, with each one excluding one of the source files. This link has more information on build configurations.