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!


MicroZed .elf: not found

Posts: 1
Registered: ‎01-12-2018

MicroZed .elf: not found

I'm attempting to run the Xilinx SDK Hello Word example on a MicroZed (7Z020), using SDK  2017.4 on Windows 10.


MicroZed is running the as delivered Linux OS:

zynq> uname -a
Linux 3.8.0-xilinx #2 SMP PREEMPT Thu Jun 13 10:25:52 PDT 2013 armv7l GNU/Linux


I followed the How to create Linux applications video https://www.xilinx.com/video/hardware/how-to-create-linux-applications.html and get as far as launching the executable but then get an error at the Eclipse console:


zynq> /tmp/Test_app.elf
-sh: /tmp/Test_app.elf: not found


Running from a Linux shell produces the same result:

zynq> ls -la
total 33
drwxrwxrwt 2 root root 60 Jan 1 02:45 .
drwxr-xr-x 18 root root 1024 Jan 1 02:03 ..
-rwxr-xr-x 1 root root 32008 Jan 1 02:38 Test_app.elf
zynq> ./Test_app.elf
-/bin/ash: ./Test_app.elf: not found


Toolchain is 'Xilinx ARM v7 GNU/Linux Toolchain' with tools:

ARM v7 Linux gcc assembler
ARM v7 Linux gcc compiler
ARM v7 Linux g++ compiler
ARM v7 Linux archiver
ARM v7 Linux gcc linker
ARM v7 Linux g++ linker


readelf shows:

readelf.exe -h Test_app.elf

ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x102f4
Start of program headers: 52 (bytes into file)
Start of section headers: 30528 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 8
Size of section headers: 40 (bytes)
Number of section headers: 37
Section header string table index: 34


The only possible issue I see is that build commands are 'arm-linux-gnueabihf-gcc' when I was expecting 'arm-linux-gnueabi-gcc'.


I tried switching to 'Xilinx ARM GNU/Linux Toolchain', but then get build errors ''arm-xilinx-linux-gnueabi-gcc' is not recognized as an internal or external command'.


Do I need to select a different Linux toolchain or change some other configuration?




Posts: 1,845
Registered: ‎03-22-2016

Re: MicroZed .elf: not found

@kbeardmore  You can always install build essentials, boot your device, copy your code there and compile inside the device itself.

If it is a small binary that is probably the recommended way.

That said, what happens when you do an `ldd Test_app.elf` ? 

btlabs.us --- 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.