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: 
1,829 Views
Registered: ‎08-12-2017

Run an application compiled with the Xilinx toolchain into a Zynq board

I am trying to run an application (*.elf) compiled in Linux, using the Xilinx toolchain (arm-xilinx-eabi-gcc (Sourcery CodeBench Lite 2015.05-16) 4.9.2), but I am unable to do it.

 

I am compiling on linux because the application I need to run (an hypervisor) uses a compilation process that I cannot implement in the Vivado SDK, so I need to compile it using command line instructions.

 

 

 

I have compiled this application following a tutorial. The tutorial indicates that the way to run the application in the Zynq board is by loading it using XDM. According to this tutorial, the first thing I need to do is to connect to the board, but I obtaing an error when I do it:

XMD.PNG

It seems that the board is not being recognized, but it is visible using lsusb:

lsusb.PNG

 

Searching, I saw that XDM is deprecated, so I tried it using XSDB with the connect command. Once I am "connected", I use the "targets" satement, but there are not targets at all. Here it is the capture:

XSDB.PNG

Since there are no targets, I assume that, again, the board is not being detected, but I am not sure because the connect command seems to have worked. 

 

Finally, I have tried to run the application using the Vivado SDK on Windows, by creating a new Run Configuration and selecting my elf file, but when I run it I obtain the error: 

 

An internal error occurred during: "Launching New_configuration".
No Target with ID 64 in the System

 

Here it is my Run Configuration:

RunConfig1.PNG

RunConfig2.PNG

resident_sw.elf is the application I have compiled on Linux, I select the hello_world project because is a requirement of the Vivado SDK to launch an application.

 

So, my question is which are the correct steps to run an application (compiled in Linux, with the Vivado Toolchain) into the Zynq Board. It would be very useful for me any example of the mentioned process.

 

0 Kudos
5 Replies
Scholar hbucher
Scholar
1,810 Views
Registered: ‎03-22-2016

Re: Run an application compiled with the Xilinx toolchain into a Zynq board

daniel.gaston.ochoa@alumnos.upm.es

The process you are trying works for standalone and FreeRTOS only.

 Linux applications have to be launched from inside Linux. You have to load the operating system first.  See one example here:

https://www.xilinx.com/support/answers/63280.html

The quickest way from where you are right now would be to boot linux then scp your ELF into it then run.

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
1,785 Views
Registered: ‎08-12-2017

Re: Run an application compiled with the Xilinx toolchain into a Zynq board

The process you are trying works for standalone

 

Sorry, but what does standalone mean in this context?

 

and FreeRTOS only.

 

Actually, I would like to load a baremetal application for now. I mean, compile an application in Linux usign the Vivado ARM compiler to produce the elf file. Then the launch it without OS. Is this possible?

 

Linux applications have to be launched from inside Linux. You have to load the operating system first.  

 

As far as I understand, It does not matter in which OS I am compiling or running, since I am using the arm compiler, so the elf file should be identical in any case. Is that correct?

 

 

The quickest way from where you are right now would be to boot linux then scp your ELF into it then run.

 

Excuse my ignorance, but what does scp mean in this context? 

 

 

0 Kudos
Scholar hbucher
Scholar
1,762 Views
Registered: ‎03-22-2016

Re: Run an application compiled with the Xilinx toolchain into a Zynq board

daniel.gaston.ochoa@alumnos.upm.es

Baremetal = standalone

You can compile your application anywhere you want if you are cross compiling. However if you compile for Linux you cannot run in standalone mode and vice versa. 

There are two distinct toolchains

  1. arm-xilinx-linux-gnueabi - for developing Linux applications
  2. arm-xilinx-gnueabi - for developing standalone ("bare-metal") and FreeRTOS applications

scp = secure copy, part of the openssh package. On windows you can use Filezilla or Winscp. 

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
1,729 Views
Registered: ‎08-12-2017

Re: Run an application compiled with the Xilinx toolchain into a Zynq board

Understood, thanks for the answer.

 

However if you compile for Linux you cannot run in standalone mode and vice versa. 

 

I am using arm-xilinx-eabi-gcc, so I suppose that I can run in standalone.

 

 

The quickest way from where you are right now would be to boot linux then scp your ELF into it then run.

 

Ok, now I understand the "scp" part. How can I scp my ELF into the Zynq?

 

 

 

0 Kudos
Scholar hbucher
Scholar
1,724 Views
Registered: ‎03-22-2016

Re: Run an application compiled with the Xilinx toolchain into a Zynq board

daniel.gaston.ochoa@alumnos.upm.es

If you are running Linux on the Zynq, make sure you install dropbear and busybox

http://xilinx.wikidot.com/zynq-rootfs

Boot up Linux and hopefully the ssh server should be running.

If your development box is Ubuntu, you should have scp/ssh installed. 

If you are on Windows, download and use Filezilla or Winscp. 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos