02-28-2012 05:00 AM
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?
02-29-2012 02:42 AM
"If it don't work in simulation, it won't work on the board."
02-29-2012 08:56 PM
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?
03-01-2012 03:49 AM
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?
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.
03-01-2012 06:36 PM
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.