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
Observer rmm92vt
Observer
9,433 Views
Registered: ‎02-20-2014

Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

I have a simple Vivado design targeting the Zedboard which instantiates a ZYNQ-PS7 in an IPI block diagram (attached image). The PS7 has 3 peripherals accessed via AXI Interconnect: AXI GPIO (LEDs and DIPSWs), AXI BRAM (connected to a BRAM in top level HDL), and AXI BRAM (connected to HDL-based registers). I have tried all this under both 2016.2 and 2016.4 tools installed and running on Ubuntu 14.04. The purpose of this design is to experiment with different ways to communicate between PS and PL from both bare-metal and Linux.

 

I have had great success on the bare-metal front. The trouble is with Linux. There are many different ways to get the job done and although I have a few that work okay, I cannot get SDK to create even a simple Hello World app in Linux for me. And this is frustrating since the preferred devlopment method would be SDK if it actually worked. As far as I can tell from Xilinx reference material and online videos, I should follow these steps:

 

* Generate design in Vivado

* Export Hardware to SDK

* In SDK: File=> New => Application Project...

* From the popup, I give the project a name, select OS Platform = "linux"

Then I have a choice: Go with the default Linux Toolchain and System Root, or specify my own

Unfortunately BOTH appear to be dead ends...

 

(A) Default:

 

I get a helloworld.c with a single #include for <stdio.h> that is flagged with the error "Unresolved inclusion". Not sure how I'm supposed to properly include and reference standard libraries. Beside, it seems like the tool should have that set that up for me already, particularly with a Hello World template. Has anyone tested this in recent tool versions? I can't see where I deviated from the exact steps in Xilinx tutorial videos and docs. This same behavior exists in both 2016.2 and 2016.4

 

(B) Specify TC/Rootfs:

 

* SDK 2016.2:

 

Externally I built a Petalinux 2016.2 project and specified the recommended locations which show up when you mouse over the entry boxes:

Rootfs =<petalinux project folder>/build/linux/rootfs/stage

Toolchain = <petalinux install>/tools/linux-i386/gcc-arm-linux-gnueabi

Result: SDK complains "Invalid Tool Chain" and will not proceed to creating application

 

* SDK 2016.4

 

Built a Petalinux 2016.4 project and attempted to use the specified locations once again, but lo and behold the Petalinux project directory structure is WILDLY different now and there is no /linux/rootfs/stage anywhere to be found! The SDK docs appear silent on this matter.

 

----------------

 

So. Is the recommendation to avoid using SDK altogether and just use Petalinux or some other linux development path? That's what I hear from every Xilinx user I know. App development in Petalinux is really cumbersome from my limited experience. And the documentation is pretty weak. Maybe that's why you can't export a Petalinux BSP from SDK any more!? Only choices standalone and freertos. Should I use the linux-xlnx git repo and import my devicetree into that? I've had limited success porting output products from Vivado/SDK into the open source linux projects. Configuration and compatibility seem to be a crapshoot. Can someone share with me a dependable linux app design flow for Zynq that isn't broken at some point along the way and that is compatible with the latest Xilinx Tools? Or at least tell me there isn't one so I know I'm not missing out on any fun?

 

blockdiagram.jpg
1 Solution

Accepted Solutions
Moderator
Moderator
12,924 Views
Registered: ‎10-06-2016

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

Hi @rmm92vt @tico0001 @jakebecs juergen.kratochwill@grapho-metronic.com @tico0001

 

There is an AR ongoing but meanwhile I created a wiki page where is explained how to use the petalinux based sysroot in the SDK that may be helpful.

http://www.wiki.xilinx.com/Linux+Applications+with+Petalinux+Libraries

 

This example is based on petalinux 2017.1 release which is based on Yocto flow, so the sysroot folder is located within the build directory defined in the TMPDIR variable.

 

For 2016.3 and bellow: sysroot folder is within the petalinux project directory: <project-path>/rootfs/stage

 

 


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

View solution in original post

13 Replies
Xilinx Employee
Xilinx Employee
9,371 Views
Registered: ‎08-02-2007

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

hi,

 

would that be possible to share the HDF of this design?

 

-hs

----------------------------------------------------------------------------------------------
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.
----------------------------------------------------------------------------------------------
0 Kudos
Observer rmm92vt
Observer
9,352 Views
Registered: ‎02-20-2014

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

No problem. HDF attached.

0 Kudos
Newbie jakebecs
Newbie
8,988 Views
Registered: ‎04-05-2017

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

Did you get this resolved?  I am having the same problem trying to specify a Linux System root using SDK v2016.4 with the ZCU102 BSP (downloaded directly from the Xilinx web site).  With the switch to Yocto, the PetaLinux directory structure is very different and does not match the tooltips.

0 Kudos
8,802 Views
Registered: ‎04-20-2017

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

that was the post i was looking for, as well as hoping for answer as it seems i struggled along the same way against the same wall.

 

we got to the point where we built some custom hw in vivado, export it, go through the petalinux sdk, build the kernel and it is running on the hw Plattform.

 

now at the point of building applications i am stuck. there seems no way of getting petalinux BSP into SDK,  SDK things like "Linux System Root", where one would specify and make the link to the custom hardware point into nowhere.

 

What is a working way of getting app develeopment on custom hardware?  not having even an IDE and opting for the command line petalinux seems to be a bitter option...

0 Kudos
Contributor
Contributor
8,709 Views
Registered: ‎12-07-2010

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

Agreed; I've come to the exact same point and am now spinning my wheels with SDK. If there is another preferred method, could Xilinx at least provide an Answer Record?

0 Kudos
Xilinx Employee
Xilinx Employee
8,678 Views
Registered: ‎12-21-2016

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

Please use the following option to specify the sysroot for a linux project

 

sysroot.jpg

 

Regards,
Raju
----------------------------------------------------------------------------------------------
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.

Moderator
Moderator
8,530 Views
Registered: ‎10-06-2016

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

Petalinux stores the sysroot in the temporal build location as pointed in UG1157:

Capture 2.JPG

 

So in order to be able to reference those library and header files, this path have to be used in application creation window, as shown bellow:

Capture.JPG

 

It seems that there is an issue with the linker configuration as --sysroot option have to be used for as pointed Raju in the last reply, so just include the linker option in the miscellaneous field as pointed in the bellow image.

Capture3.JPG

 

There is an answer record on going for this issue, but meanwhile the steps above can be used.


Ibai
Don’t forget to reply, kudo, and accept as solution.
Visitor tico0001
Visitor
8,250 Views
Registered: ‎04-24-2017

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

Hi, I'm having the same issue and I don't see anything related to petalinux in my /tmp/ folder. Are there other locations where the sysroot directory is stored in 2016.2?

 

Thanks.

0 Kudos
Moderator
Moderator
12,925 Views
Registered: ‎10-06-2016

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

Hi @rmm92vt @tico0001 @jakebecs juergen.kratochwill@grapho-metronic.com @tico0001

 

There is an AR ongoing but meanwhile I created a wiki page where is explained how to use the petalinux based sysroot in the SDK that may be helpful.

http://www.wiki.xilinx.com/Linux+Applications+with+Petalinux+Libraries

 

This example is based on petalinux 2017.1 release which is based on Yocto flow, so the sysroot folder is located within the build directory defined in the TMPDIR variable.

 

For 2016.3 and bellow: sysroot folder is within the petalinux project directory: <project-path>/rootfs/stage

 

 


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

View solution in original post

Observer nenghan
Observer
2,741 Views
Registered: ‎06-07-2018

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

Hi, I am using PetaLinux 2018.2 and SDK 2015.

I do not have Vivado export of HDL and started off by just downloading the ZCU102 BSP from Xilinx and creating the Petalinux project. After PetaLinux-build, i was able to locate my tmp folder in the build directory, however in the sysroot folder, there are no files inside. 

 

Am i suppose to point to this empty directory? 

 

As for the Linux ToolChain, i tried to point to the recommended directory from the tooltip which is the <PetaLinux/tools/i386>. However it always complains of error when i click ok. The SDK log mentioned that there was a java null exception error. I was able to view the output and it mentioned that it cant find the aarch64 gcc. I did a search and indeed it is not in the <PetaLinux/tools/i386>.

 

I am now stuck at the stage of unable to even create a Linux simple Hello World. Anyhelp is appreciated. Thanks.

0 Kudos
Observer jpbb
Observer
2,652 Views
Registered: ‎03-26-2018

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

Hi all,

I have exactly the same problem in 2018.2. I can build a working Linux image working from xterm (outside of SDK). that's fine.

When I use the SDK, I cannot build a Linux application due to missing library files, even though I include the right library path.

 

Creating a simple helloworld app (bare metal) also generate error in its associated bsp build.....

 

Cheers

JP

 

Visitor jreichenb
Visitor
2,492 Views
Registered: ‎05-21-2018

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

That answer resp. the Wiki entry will not work when using Petalinux tools inside a Linux-VM and otherwise developping within Windows. I guess, this has not been tested...

The missing step is concerning the copy operation from the VM into a shared folder which typically breaks symbolic links - and most library entries use symbolic links

 

To overcome this, you have to modify the copy command, e.g.:

cp -R -L <plnx-project>/build/tmp/sysroots/plnx_arm <shared_folder>/plnx_arm

The rest of the description is OK and setting up my system like this will create the application successfully.

 

Please note that I am using Vivado 2017.4.

0 Kudos
Visitor mikebray2020
Visitor
2,249 Views
Registered: ‎11-07-2018

Re: Trouble creating Linux Application in SDK 2016.2 or 2016.4

Jump to solution

In response to jpbb, me too. Standalone "helloworld.c" Nothing to do with Linux or Petalinux that I can see. Definitely in need of a resolution.

Update:  I discovered I had two hardware platform projects in the workspace.  Deleting one seems to have resolved the problem.

0 Kudos