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: 
Visitor angel_rm
Visitor
7,763 Views
Registered: ‎12-09-2014

App in Petalinux ERROR found xparameters.h

Hi! Firstly, I am using Petalinux 2014.4 with Ubunto 14.04. I am trying to create an app for petalinux but when i do petalinux-build i get the next error (from build.log):

 

[ALL  ] arm-xilinx-linux-gnueabi-gcc  -c -Os -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall  -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mtune=cortex-a9  -DEMBED -Dlinux -D__linux__ -Dunix -fPIC --sysroot=/home/master4/ejemplo_gpio/Avnet-Digilent-ZedBoard-2014.4/build/linux/rootfs/stage -o gpio.o gpio.c
[ALL  ] gpio.c:4:25: fatal error: xparameters.h: No such file or directory
[ALL  ]  #include "xparameters.h"
[ALL  ]                          ^
[ALL  ] compilation terminated.
[ERROR] make[2]: *** [gpio.o] Error 1
[ALL  ] make[2]: se sale del directorio «/home/master4/ejemplo_gpio/Avnet-Digilent-ZedBoard-2014.4/build/linux/rootfs/apps/gpio»
[ERROR] make[1]: *** [sub_build_component_/none/apps/multi/gpio] Error 2
[ALL  ] make[1]: se sale del directorio «/home/master4/ejemplo_gpio/Avnet-Digilent-ZedBoard-2014.4/build/linux/rootfs»
[ALL  ] make: *** [sub_build_component_/none/rootfs/single/petalinux-rootfs] Error 2
[ALL  ] make: se sale del directorio «/home/master4/ejemplo_gpio/Avnet-Digilent-ZedBoard-2014.4/build/linux»

 

 

My file, gpio.c has next includes :

 

#include <stdio.h>
#include "platform.h"

#include "xparameters.h"
#include "xgpio.h"
#include "xscugic.h"
#include "xil_exception.h"
#include "xil_printf.h"

 

How can petalinux find this files? I put them on the same directory that gpio.c on ../components/apps/...

 

Thanks.

0 Kudos
7 Replies
Contributor
Contributor
7,740 Views
Registered: ‎10-07-2014

Re: App in Petalinux ERROR found xparameters.h

Hi,

 

I also encountered the same error while trying to run a test app on petalinux OS. In my case ther error occured because my petalinux bsp was not properly build. when it was build properly, the include file under petalinux bsp includes all the required header files. So, you first check whether petalinux bsp is build properly in SDK or not.

 

Thanks

0 Kudos
Visitor angel_rm
Visitor
7,737 Views
Registered: ‎12-09-2014

Re: App in Petalinux ERROR found xparameters.h

Can i build petalinux 2014.4 bsp on SDK? I have read that in this version yo cannot create the petalinux_bsp. If i can, how??

Thanks!

0 Kudos
Contributor
Contributor
7,729 Views
Registered: ‎10-07-2014

Re: App in Petalinux ERROR found xparameters.h

I have worked with petalinux 2013.04. I have build the petalinux sdk on ubuntu 14.04 machine and on Xilinx SDK I ported this bsp on my custom made hardware. while porting on h/w, i faced the error.

0 Kudos
Highlighted
Visitor angel_rm
Visitor
7,711 Views
Registered: ‎12-09-2014

Re: App in Petalinux ERROR found xparameters.h

Nobody working with Petalinux 2014.4??

0 Kudos
Xilinx Employee
Xilinx Employee
7,701 Views
Registered: ‎07-01-2010

Re: App in Petalinux ERROR found xparameters.h

You need not use SDK to build your linux app with petalinux 2014.4.

Follow petalinux flow once your hardware is exported.

Please refer to UG1144 to understand the details of the flow and commands.
http://www.xilinx.com/support/documentation/sw_manuals/petalinux2014_4/ug1144-petalinux-tools-reference-guide.pdf

Regards,
Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------
Observer accord123
Observer
6,527 Views
Registered: ‎07-21-2015

Re: App in Petalinux ERROR found xparameters.h

Hi @achutha,

 

I am looking for few clarifications "to add SDK application in Petalinux root system".

 

From the above reference document i have seen below guidelines "to add sdk prebuilt image on 2014.04 Petalinux".

 

***********************************************************************************************************************************

Including Prebuilt Applications
 
If an application is developed outside PetaLinux, e.g. through Xilinx SDK, you may just want to add the
application binary in the PetaLinux root file system. In this case, an application template is created to allow
copying of the existing content to target filesystem.

This section explains how to include per-compiled applications to PetaLinux root file system.
Prerequisites
This section assumes that the following prerequisites have been satisfied:

You have PetaLinux Tools software platform ready for building a Linux system customized to your hardware
platform. Please refer to section
Import Hardware Configuration
for more information.
Steps to Include Prebuilt Applications
If your prebuilt application name is myapp, including this into PetaLinux root file system is explained in following
steps.
 
1. Ensure that the pre-compiled code has been compiled for your PetaLinux target architecture (e.g. MicroBlaze, ARM etc.).
 
2.Create an application with the following command.
$ petalinux-create -t apps --template install --name myapp --enable
3.Edit the Makefile and add the following line under the install
section.
$ (TARGETINST) -d data/myapp /bin/myapp
4.Change to the newly created application directory.
$ cd <plnx-proj-root>/components/apps/myapp/data
5.Remove existing myapp and copy the prebuilt myapp.
$ rm myapp
$ cp <path-to-prebuilt-app> .
*********************************************************************************
In step 5 guiding to "remove the my-app and have to add prebuil my-app".
 
But, From the SDK application directory which prebuilt file should i copy into the petalinux project?
 Does it .bin file or .elf file!?
 

I am requesting you to, clarify the file structure to add in the petalinux project directory.

 

0 Kudos
Visitor martind1983
Visitor
4,839 Views
Registered: ‎10-26-2014

Re: App in Petalinux ERROR found xparameters.h

Hi achutha

You always refer to manuals. Unfortunately they do not cover everything as would be needed. I also experience the same header file error by building my application in Petalinux. So how should I inform building process or which makefile should I modify to inform compiler where to find required header files. :)
0 Kudos