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
Explorer
Explorer
182 Views
Registered: ‎05-25-2016

Where petalinux include files for sdk dev?

Jump to solution

Hello,

This is a fundamentals question, but I'd like to make sure I have a good understanding.  When developing a user space application for zynq running a petalinux image, I have the following questions.

 

Q1:  Where are all the available include files (C header files) located?  Say for example, I have the attached hello world program in the SDK and want to develop an application.  Where are the include files located that I would #include at the top?  Are these libraries/header files located in a folder in the petalinux build folder that has all the configs and data from the build process and used in the build process?

 

Q2: How do I tell the SDK where these files are so it will allow me to use them?  Is this the job of the sysroot option when creating the petalinux application project in the sdk or is this a manual process of doing the project properties-> include files option etc??

63.jpg
0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
145 Views
Registered: ‎10-06-2016

Re: Where petalinux include files for sdk dev?

Jump to solution

Hi @m3atwad 

Q1: The toolchain includes C library header files (i.e. stdio.h, stdlib.h) so those ones are always available for your application. Additional libraries that are build by Petalinux build system are populated on the build sysroot as per documented on UG1144. On the Xilinx SDK side you can use the sysroot path field in the wizard so the compilation options are populated with the sysroot location. There is a bit old wiki page with an example of how to use math library (the sysroot generation has been changed so use the previous link).

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
1 Reply
Moderator
Moderator
146 Views
Registered: ‎10-06-2016

Re: Where petalinux include files for sdk dev?

Jump to solution

Hi @m3atwad 

Q1: The toolchain includes C library header files (i.e. stdio.h, stdlib.h) so those ones are always available for your application. Additional libraries that are build by Petalinux build system are populated on the build sysroot as per documented on UG1144. On the Xilinx SDK side you can use the sysroot path field in the wizard so the compilation options are populated with the sysroot location. There is a bit old wiki page with an example of how to use math library (the sysroot generation has been changed so use the previous link).

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.