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
15,506 Views
Registered: ‎01-15-2008

SDK can't find #include files

Jump to solution

Hello,

Using EDK 12.4, I worked through XAPP1026, the lwip demo tutorial which targets a nML505 (which I don't have), then built a new project, starting with ISE, targetting and ML605 (which I do have).  I used XPS to make a system with a microblaze, TEMAC, etc, then successfully generated a bitstream and exported to SDK.  This all went well (near as I can tell).

In SDK, I created a new "Echo Server" application, and generated a board support package targetting the generated hardware.  So far so good.

The problem is that SDK cannot locate the include files "lwip/err.h" and "lwip/tcp.h", although I can see them in the Project Explorer directory tree (they're at ..bsp_1/microbaze_0/libsrc/lwip130_v3_00_a/src/include/lwip/).

 

Oddly, this is what first happened when I worked through the XAPP1026, but when I came back to the project, the errors went away.  Also oddly, the first time I tried making the bsp (for the ML605), the bsp that was generated did not contain any of the include files.

 

Seems like odd and inconsistent behavior.  Windows 7 64-bit.  Could this be the problem?

 

Thanks

Rick

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
21,181 Views
Registered: ‎01-18-2008

Re: SDK can't find #include files

Jump to solution

So that means that libgen failed to run. Check the BSP's console, or libgen.log file for clues. If you don't find any of that, just clean all projects and issue a rebuild.

13 Replies
Explorer
Explorer
15,503 Views
Registered: ‎01-09-2009

Re: SDK can't find #include files

Jump to solution

SDK customization by Xilinx has made it a really poor-written tool. From 11 to 12 Xilinx tried to fix things, but they've introduced new issues. Anyway, if you are still getting the same error, you could use XAPP1026 for ML605 provided by Xilinx. That might be of help.

http://www.xilinx.com/support/answers/36054.htm

0 Kudos
Explorer
Explorer
15,497 Views
Registered: ‎01-15-2008

Re: SDK can't find #include files

Jump to solution

Thanks for that tip- I didn't know there were design files for the ML605.  But I do need to solve the problem more generally- ie, how do I build something new using SDK?

Thanks,

Rick

0 Kudos
Explorer
Explorer
15,492 Views
Registered: ‎01-09-2009

Re: SDK can't find #include files

Jump to solution

in a very high-level way you need to:

1. Export your hardware from XPS to SDK.

2. Make a software platform around your design in SDK.

3. Modify the platfrom settings and add your libraries based on your application.

 

Now you are good to go.

0 Kudos
Explorer
Explorer
15,483 Views
Registered: ‎01-15-2008

Re: SDK can't find #include files

Jump to solution

Right, I get that conceptually, but SDK has automated the process so much that it's impossible!  I copied the two .h files directly into the directory where the "#include" directive is, now the system can find them.  But then other calls farther down on the food chain are not found.

 

Aha!  Found something. In SDK Project Exp, Project Properties->C/C++Build->check :"replace native enviro variables w specified one" (rather than "Append varuables to native env").  Now SDK finds the includes, but now there's anotehr error:

"make: echo: Command not found"

 

Progress, though.

 

Rick

0 Kudos
Xilinx Employee
Xilinx Employee
15,473 Views
Registered: ‎01-18-2008

Re: SDK can't find #include files

Jump to solution

aminfar1: Could you let us know what are the things that bother you in SDK 12.x. I'm interested in hearing how it is a step back from 11.x, and how it fares with regard to your expectations. Thanks.

 

rikraf: You seem to be doing some basic mistakes:

1. In Xilinx software flows, includes for the BSP are obtained from the folder $bsp/microblaze_0/include, not from the libsrc directory. See if the files are present there.

2. Whenever you say there are errors, it helps if you post the compiler command line that includes the full command used (mb-gcc -I ..), and the exact error thrown by the compiler.

As you can imagine, all SDK does is call gcc. And gcc will include files if they are there. If things don't work, most likely you have made some simple error.

 

You shouldn't have to worry about environment variables. You only have to worry about whether the BSP project was built, did libgen run successfully, etc.

0 Kudos
Explorer
Explorer
15,469 Views
Registered: ‎01-15-2008

Re: SDK can't find #include files

Jump to solution

There is only one file in the $bsp/microblaze_0/include directory, "xparameters.h".

I thought I just followed the same flow as I did in working through XAPP1026, which was successful: export the hardware design from XPS to SDK (copying the .bit and .bmm since the project was started in ISE), creating a "New Xilinx C project-> lwip Echo Server", building the bsp targetting the system.xml file which I exported.  There didn't seem to be a lot of choices along the way, so I thought all the drivers would get selected and put in the right places.

 

I'll try it again.  Maybe something went wrong earlier in the flow that screwed things up later.

 

The error I'm getting is "lwip/err.h" No such file or directory.  Same for tcp.h

 

Thanks for your help.

 

Rick

0 Kudos
Xilinx Employee
Xilinx Employee
21,182 Views
Registered: ‎01-18-2008

Re: SDK can't find #include files

Jump to solution

So that means that libgen failed to run. Check the BSP's console, or libgen.log file for clues. If you don't find any of that, just clean all projects and issue a rebuild.

Explorer
Explorer
15,415 Views
Registered: ‎01-15-2008

Re: SDK can't find #include files

Jump to solution

Yes, you are right, I worked through it again and everything worked.  All the drivers are there in microblaze_0\include; main problem was likely my lack of familiarity with SDK.

Thanks for your help

 

Rick

0 Kudos
Newbie mohkh1
Newbie
14,837 Views
Registered: ‎07-23-2011

Re: SDK can't find #include files

Jump to solution

could please tell me how did you fix your problem ,,because im facing the same issue and i can't find a clue for that ,Thank You

0 Kudos
Explorer
Explorer
4,989 Views
Registered: ‎04-16-2009

Re: SDK can't find #include files

Jump to solution

>  All the drivers are there in microblaze_0\include;

 

How do I add a reference to that directory into my project? 

0 Kudos
Explorer
Explorer
4,986 Views
Registered: ‎04-16-2009

Re: SDK can't find #include files

Jump to solution

Though, I expexted it in C/C++ Build -> MicroblazeGccCompiler -> Software Platform because working project has it there. But it is disabled for editing. Got it working through C/C++ Build -> MicroblazeGccCompiler -> Directories

 

http://forums.xilinx.com/t5/EDK-and-Platform-Studio/Problems-with-C-C-project-in-SDK/td-p/178866 

 

 

0 Kudos
Moderator
Moderator
4,970 Views
Registered: ‎09-12-2007

Re: SDK can't find #include files

Jump to solution

The reason for the posters problem was that the libgen wasnt run correctly.

0 Kudos
Visitor salaho99
Visitor
3,008 Views
Registered: ‎06-06-2016

Re: SDK can't find #include files

Jump to solution

I got the same issue. I got it solved by checking the interrupt for both the Ethernet MAC and the timer in XPS when initializing the MicroBlaze (Default is no interrupt). LwIP needs  interrupt controller and a timer to function.

0 Kudos