- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Why My file cannot include stdio.h
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-28-2012 05:00 AM
Hey ,everyone
I am puzzled with a problem.
In the C project, I can include stdio.h. But files in the bsp cannot. For example , at the beginning of the file xemacliteif.c,
there are two sentence : #include <stdio.h>
But the SDK enviroment shows that Unresolved inclusion: <string.h> And so does <stdio.h> .
Anybody can help me?
Re: Why My file cannot include stdio.h
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-29-2012 02:42 AM
------------------------------------------
"If it don't work in simulation, it won't work on the board."
Re: Why My file cannot include stdio.h
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-29-2012 08:56 PM
Hey,
Thanks for your reply.
I am just planning to use xil_printf() to show whether the project did the function or not .
For exmple, I added xil_printf("xemacliteif_init\r\n"); in the xemacliteif_init() function. And when debugging with the SDK ,
It really exacute this function , but never print anything at the uart terminal. And there are two sentences at the beginning of
the file containning the function xemacliteif_init() :#include <stdio.h> #include <string.h>..
How can i debug the project in this way?
Re: Why My file cannot include stdio.h
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-01-2012 02:47 AM
#include "stdio.h"
instead and report back...
------------------------------------------
"If it don't work in simulation, it won't work on the board."
Re: Why My file cannot include stdio.h
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-01-2012 03:49 AM
Hey,
I have changed <> to " " . But it doesn't work at all.
The file cannot include it .I clicked the stdio.h line on the outline window, it shows that. Why can not it find the file?
Re: Why My file cannot include stdio.h
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-01-2012 05:49 AM
------------------------------------------
"If it don't work in simulation, it won't work on the board."
Re: Why My file cannot include stdio.h
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-01-2012 08:09 AM
<stdio.h> and <string.h> belong to the standard library (AKA libc.a).
Your BSP stores the library (see: C:\your_workspace\your_bsp\microblaze_0\lib\libc.a
but your application refers to it by linking to the library (see: Your_application->C/C++ building settings->Microblaze gcc linker->Software Platform->Software Platform library path->../../your_bsp/microblaze_0/lib.
So either your BSP does not have the library or your application does not refer to it or it refers to it but the path is wrong.
Re: Why My file cannot include stdio.h
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-01-2012 06:30 PM
Thanks for your reply at all.
Re: Why My file cannot include stdio.h
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-01-2012 06:36 PM
Hey,
I have to say you misunderstood my words.
I have checked what you say on my project, they are all correct.
In the C project, I can include the "stdio.h" normally. while in the bsp/microblaze/libsrc/... , stdio.h cannot be included
into it . Just as the picture I attached above : the SDK can not find it. I just want to add some xil_printf() sentence for debug
I am puzzled.
Re: Why My file cannot include stdio.h
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-27-2012 12:07 AM
Hello,
I had the same identical problem (using SDK 14.1):
for me the solution was upgrading to 14.2.
Hope it helps,
Michele











