01-12-2018 02:12 PM
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 192.168.1.10 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:
-sh: /tmp/Test_app.elf: not found
Running from a Linux shell produces the same result:
zynq> ls -la
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
-/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.exe -h Test_app.elf
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
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?
01-12-2018 08:42 PM
@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` ?
06-08-2018 03:51 PM
I faced the same problem. Using the right Linux kernel (image.ub) fixed the problem. I suggest you to use the pre-built kernel images generated in PetLinux project to boot the board.
1. Download the Microzed Petalinux BSP from this link
2. Create PetaLinux project following the Petalinux reference guide (ug1164)
3. Navigate the <petalinux_project_dir> / pre-built / linux / images
4. Copy BOOT.bin, <your_application>.elf, and image.ub to SD card
5. Boot from SD card and login as root (password: root)
6. Mount SD card as: mount /dev/mmvblk0p1 /mnt
7. cd to /mnt and execute <your_application>.elf