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.

TMDSDOCK28379D: sprintf using SCI to getvalue of int

Part Number: TMDSDOCK28379D


Hi,

This is my code which uses SCI to print data on COM port, I am trying to print integer values. When I include "sprintf(buffer, "%d: \0", value);" my code does not seem to do anything. stack size 0x800, heap 2000. Please let me know how to use sprintf properly in CCS. 

char *buffer= NULL;
int value = 23;
sprintf(buffer, "%d: \0", value);
//scia_msg(buffer);

for(;;)
{
msg = "\r\nEnter a character: \0";
scia_msg(msg);

//scia_msg(buffer);

}

Regards,

Parvathi