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 akkadhim1
Visitor
8,027 Views
Registered: ‎06-20-2016

move bare metal (standalone) app to linux

Jump to solution

Hi,

 

I've finished developing a standalone application and now I'm trying to move it to Linux OS, I'm using Petalinux and have no problem with Linux, but I don't know how to build the binary image in Xilinx SDK, I tried to create a new application in SDK (using linux os platform) but when I include any header file (like #include "xuartps_hw.h") the SDK give me an error.


"error: /Projects/PetaLinux/Nav/build/linux/rootfs/stage/lib/libgcc_s.so.1 uses VFP register arguments, test1.elf"

also

"Unresolved inclusion: "xuartps_hw.h""

 

I'm using Zedboard and I tried both SDK 2015 and 2016.

 

my project involved (SPI , IIC , UART and GPIO) peripherals.

 

Is it possible to make the standalone application works in Linux OS?  I mean all the required source files could be built in Linux? or I have to write a new program not in C?

 

Thanks in advanced.

 

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
14,206 Views
Registered: ‎01-06-2016

Re: move bare metal (standalone) app to linux

Jump to solution

It looks like you are trying to mix standalone BSP code/driver (i.e. xparameters.h, xuartps etc) and Linux. These two are not compatible. If you intend to use Linux, you need to use the Linux drivers and frameworks to interface with the peripherals.

 

View solution in original post

6 Replies
Visitor akkadhim1
Visitor
7,967 Views
Registered: ‎06-20-2016

Re: move bare metal (standalone) app to linux

Jump to solution

Just to make my question more simple,

 

can I create a Linux application using the C examples which provided in the SDK, like, example to use IIC in polled mode?

 

thanks.

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

Re: move bare metal (standalone) app to linux

Jump to solution

@akkadhim1

 

Follow the instructions in the link

http://www.xilinx.com/video/hardware/how-to-create-linux-applications.html

http://www.wiki.xilinx.com/Create+Linux+Application

 

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.
----------------------------------------------------------------------------------------
Visitor akkadhim1
Visitor
7,830 Views
Registered: ‎06-20-2016

Re: move bare metal (standalone) app to linux

Jump to solution

Thanks Achutha.

 

I tried to build the videos example and it works fine, but when I start to add any peripheral, I got an error about the header files.

I'm still not sure if I can use the mentioned method (in the video) to build a Linux application which includes (spi, Uart or IIC peripherals) because I read some posts about that like this one:
https://forums.xilinx.com/t5/Embedded-Linux/Building-applications-for-Petalinux/m-p/682098/highlight/true#M15375

 

also in this post they faced same issue

https://fohttps://forums.xilinx.com/t5/Embedded-Linux/App-in-Petalinux-ERROR-found-xparameters-h/m-p/565384/highlight/true#M12014rums.xilinx.com/t5/Embedded-Linux/App-in-Petalinux-ERROR-found-xparameters-h/m-p/565384/highlight/true#M12014

 

regards.

 

0 Kudos
Visitor akkadhim1
Visitor
7,805 Views
Registered: ‎06-20-2016

Re: move bare metal (standalone) app to linux

Jump to solution
0 Kudos
Xilinx Employee
Xilinx Employee
14,207 Views
Registered: ‎01-06-2016

Re: move bare metal (standalone) app to linux

Jump to solution

It looks like you are trying to mix standalone BSP code/driver (i.e. xparameters.h, xuartps etc) and Linux. These two are not compatible. If you intend to use Linux, you need to use the Linux drivers and frameworks to interface with the peripherals.

 

View solution in original post

Visitor a_b_c_29
Visitor
378 Views
Registered: ‎08-22-2019

Re: move bare metal (standalone) app to linux

Jump to solution

Based on your reply (Linux drivers and frameworks), could you please give me more details on how can I do this step by step, because I have exactly the same issue as aforementioned?

0 Kudos