xil_printf and %u specifier

Oct 17, 2007 2 Replies

Hello all,



I'm using EDK 9.1.02i to develop an application for the Xilinx University Program Virtex-II Pro board.



I created a bare MicroBlaze project and ran the following program on it:



#include



int main(void) { unsigned int i = 10; xil_printf("Signed: %d Unsigned: %u\r\n",(int) i, i); return 0; }



The output (over the serial port) was this:



Signed: 10 Unsigned:



Apparently xil_printf() ignores the %u format specifier. What's going on?


Philip Potter pgp doc.ic.ac.uk

xil_printf has limited support for the formats, check it out what is supported

Antti

Hi antti,

Thanks for your answer. Where would I find such documentation? I've checked in the OS and libraries reference manual, but that only has a brief description and doesn't mention unsigned.

Philip Potter pgp doc.ic.ac.uk

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required