cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
8,643 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
Highlighted
Xilinx Employee
Xilinx Employee
14,822 Views
Registered: ‎01-06-2016

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

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
Highlighted
Xilinx Employee
Xilinx Employee
8,537 Views
Registered: ‎07-01-2010

@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.
----------------------------------------------------------------------------------------
Highlighted
Visitor
Visitor
8,446 Views
Registered: ‎06-20-2016

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
Highlighted
Visitor
Visitor
8,421 Views
Registered: ‎06-20-2016
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
14,823 Views
Registered: ‎01-06-2016

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

Highlighted
Visitor
Visitor
994 Views
Registered: ‎08-22-2019

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