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!

Showing results for 
Search instead for 
Did you mean: 
Visitor duffyt
Registered: ‎07-14-2011

Compiling stand-alone application within Linux on Zynq



I would like to compile a stand-alone application within Linux running on the Zynq processor(s).


Within the Board Support package exists all of the 'drivers'  for the PS and any additional PL based Xilinx peripherals within the design that were added within EDK.  These all get compiled down to an archive named xillib.a.  My stand-alone application then is compiled and the xillib.a archive is staticly linked in via the linker script.  This works correctly, and smoothly within SDK running on Windows 7, 64 bit (as I would hope it would, ha).


SDK is using the Code Sourcery tools to compile both the Linux and stand-alone applications.  If I compile a Linux application within SDK, there is no need for a BSP, and the gcc version found here is used:




When a stand-alone application is compiled, the BSP is needed and this gcc version if used:




With that being said, any code that is compiled for Linux within compiles fine within SDK, and as expected also compiles fine using GCC 4.6 on the Zynq processor under Linux.


I can not, however, compile a stand-alone version of the same code using the Linux arm compiler, since the binaries it is creating appear to be different than those being created within the Code Sourcery tools (and rightfully so).


I can compile the xillib.a archive on Linux, running on Zynq.  I can compile the stand-alone application.  However, when I go to link the two, it barfs with a seg fault.


So, my question:


What is the best flow to compile a bare-metal, stand-alone application on the Zynq processor running Linux?  Is there an equivalent of the stand-alone compiler that ships with the SDK tool within the open source community that has been compiled for the ARM architecture?


Note: I am aware this is a rather peculiar request, as you can not execute a stand-alone application under Linux.


Thanks so much,



0 Kudos