I can't get something like the following to work in CCS 3.3:
#define P(...) printf(va_alist)
The compiler gives an "expected an identifier" error, pointing to the ellipsis.
Is there any way to make it work?
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.
I can't get something like the following to work in CCS 3.3:
#define P(...) printf(va_alist)
The compiler gives an "expected an identifier" error, pointing to the ellipsis.
Is there any way to make it work?
Aarti,
thanks for your reply. Could you please be more specific regarding which CCS versions fall into "the latest" category? I've tried --gcc option and it's not allowed in CCS3.3 SR12. And also could you please point me to a Compiler Users Guide for DM365 (doc number)?
Hi Aarti,
By latest TI compilers, does this mean compilers supported by CCS version 3.3 too? Or is this applicable for CCS 4.0?
Also, can the above macro be defined as
#define P(x, ...) printf(va_alist)
wherein x is the first (compulsory element required to be included for an ellipsis) and be identified as valid by CCS3.3?
Regards,
Sid
This is dependent on the version of Code Generation tools, not the CCS service release. To access the latest versions of codegen tools, go to CCS menu Help->Update Advisor->Check for Updates and from there you should be able to get to the different codegen tools releases.
You can check the version that is currently being used in CCS by going into Help->About->Component Manager. Under Build Tools, expand the device family that corresponds to the processor you are using and see which version of code generation tools are enabled. This wiki page describes this as well as the process to enable a newer version after it has been installed: http://tiexpressdsp.com/index.php/Compiler_Installation_and_Selection
CCS v4 should contain a version of codegen tools that is close to the latest, if not the latest, so the support should already be there.
You have the --gcc option enabled?
Can you attach the C source file to your profile so we can look at it?
Sorry, I take that back! Once I enabled "GCC extensions" in Compiler Options it worked.
Thanks everyone for your help.