UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
3,303 Views
Registered: ‎07-25-2016

unable to print float values in SDK

Jump to solution

HI there,

Sorry for this silly question of mine..

I am not able to print float values in sdk where as i am able to print the integer types.

can someone tell me where i am making the silly mistake?

int.PNG
float.PNG
0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
5,522 Views
Registered: ‎01-03-2017

Re: unable to print float values in SDK

Jump to solution

Hi,

 

Can you please try adding \n in printf line. here is the line. I tried with that then its working.

 

float m=11.11;

printf("Sum:%f\n",m);

 

 

Thanks & Regards,

Praveen Kumar. V

0 Kudos
4 Replies
Xilinx Employee
Xilinx Employee
3,295 Views
Registered: ‎10-21-2010

Re: unable to print float values in SDK

Jump to solution

Hi,

xil_printf is a lightweight version, I'm not sure if it supports float. Can you use the regular printf?

0 Kudos
Explorer
Explorer
3,268 Views
Registered: ‎07-25-2016

Re: unable to print float values in SDK

Jump to solution

I tried even that as well.

It is not printing anything.

prnt.PNG
0 Kudos
Xilinx Employee
Xilinx Employee
5,523 Views
Registered: ‎01-03-2017

Re: unable to print float values in SDK

Jump to solution

Hi,

 

Can you please try adding \n in printf line. here is the line. I tried with that then its working.

 

float m=11.11;

printf("Sum:%f\n",m);

 

 

Thanks & Regards,

Praveen Kumar. V

0 Kudos
Explorer
Explorer
3,245 Views
Registered: ‎07-25-2016

Re: unable to print float values in SDK

Jump to solution

Thanks.., it works now 

0 Kudos