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: 
Highlighted
Visitor applelonger
Visitor
2,101 Views
Registered: ‎03-29-2011

Can "printf' be used to send data?

Hi, everyone.

I am learning edk now.

I modified the example application "helloworld" as:

 

#include <stdio.h>
#include "platform.h"
int main()
{
  float f=1;
  char ch = 'C';
  int n = 20;
  
  int i, j, k;
    init_platform();

 while(1)
 {

  print("helloworld \n\r");
  printf("%c %d %f\n\r",ch, n, f);

  for(i=0;i<1000;i++)
  {
   k = 0;
   for(j=0;j<200;j++)
    k = i + j;
  }
  
 }

    cleanup_platform();

    return 0;
}

 

It's supposed to get "helloworld C 20 1.00000“, but I just got "helloworld".

Can anybody tell why?

PS: I got "C 20 1.00000" one time in the test.

 

Thanks very much.

0 Kudos
1 Reply
Explorer
Explorer
2,083 Views
Registered: ‎03-31-2011

Re: Can "printf' be used to send data?

where do u want to see your output??in hyperterminal of your host pc that have connected tu your FPGA kit.??

 

0 Kudos