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.

M3 printf

Hello,

I'm using Concerto-M3 processor with rtos.

I want to write a routine like printf that calls printf.

Here the snippet

void Write(const char* string, ...)
{
	va_list va;
	va_start(va, string);
	char testo[30],len;
	len=sprintf(testo,string,va);
	va_end(va);
	UINT dw; f_write(&file,testo,len,&dw);
}

The routine works very well if I pass float number like this

Write("\n%f",16.4);

The routine not work with strings

Write("<%s(t)>","hello");

can someone help me ?