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.

Macro Problems with Variable Arguments

I am trying to write a macro for printf called myPrintf, which calls printf and then kprintf to write out to the serial port.  When I try and do it in the fashion typically found on the internet, I get error when I compile... my code is this:

 

#define myPrintf(s, ...) printf(s, __VA_ARGS__); kprintf()

 

What is the issue here?  Is this something that will not work with CCS?  If so, is there an easy workaround?

 

Thanks so much,

Jason