cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pierlum
Voyager
Voyager
658 Views
Registered: ‎05-30-2017

"Exec format error" running compiled vcu app ctrlsw_decoder

Jump to solution

Hello I downladed code for VCU control software sample app. I compiled ctrlsw_decoder using ""make" command. The generated ctrlsw_decoder executable dosn't work when I run it on in petalinux. When I try to run the error is "Exec format error". 
I think the reason is because it was not compiled for the correct architecture.

What should I do?

Thanks.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
pierlum
Voyager
Voyager
554 Views
Registered: ‎05-30-2017

Hi @watari ,

I solved the problem. I work with 2019.2 and the correct code must be downloaded from https://github.com/Xilinx/vcu-ctrl-sw/tree/release-2019.2 . Pg252 v1.2 at page 224 gives this link https://github.com/Xilinx/vcu-ctrl-sw . But it refers to an older version of the code of the sample app. I think that in the next version of pg252 it must be updated.

Thank you. 

View solution in original post

6 Replies
watari
Teacher
Teacher
616 Views
Registered: ‎06-16-2013

Hi @pierlum 

 

Would you make sure an architecture of binary file with "file" command ?

 

ex.)

$ file abc-program

 

I guess, you didn't use proper cross-compiler...

 

Best regards,

pierlum
Voyager
Voyager
584 Views
Registered: ‎05-30-2017

HI @watari ,

this is the output of "file ctrlsw_decoder"

root@uz7evcc_vcu-only_v2019:/media/emmc# file ctrlsw_decoder
ctrlsw_decoder: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=4a8d7cf29c1574de7196cde0f82874f0853f3d9f, not stripped

Yes as you suggested it seems to be a cross-compiling problem. I have to edit makefile to make this executable work on Zynq? Thank you very much.

0 Kudos
pierlum
Voyager
Voyager
564 Views
Registered: ‎05-30-2017

Hi @watari ,

I modified Makefile in this way and I installed "gcc-aarch64-linux-gnu" and "g++-aarch64-linux-gnu" and now the executable works.

CFLAGS+=-O3
CFLAGS+=-g0

include config.mk

##############################################################
# cross build
##############################################################
CROSS_COMPILE?=

######CXX:=$(CROSS_COMPILE)g++
######CXX:=$(CROSS_COMPILE) arm-linux-gnueabi-g++
CXX:=$(CROSS_COMPILE) aarch64-linux-gnu-g++
######CC:=$(CROSS_COMPILE)gcc
######CC:=$(CROSS_COMPILE) arm-linux-gnueabi-gcc
CC:=$(CROSS_COMPILE) aarch64-linux-gnu-gcc

But now when I execute "ctrlsw-decoder" on UltrazedEV carrier card I have this error:

VCU control software decoder sample app
Allegro DVT2 - AVC/HEVC Decoder Reference Software v1.0.41 - Copyright (C) 2018
Confidential material

Resolution : 1920x1088
FourCC : NV12
Profile : 100
Level : 40
Bitdepth : 8
Crop top    : 0
Crop bottom : 8
[ 2011.599298] Unknown ioctl: 0xC20C7102

Crop right  : 0
Display resolution : 1920x1080
Sequence pictu[ 2011.605078] Known ioctl are:
re : progressive
Buffers needed : 8 of size 3342336

[ 2011.613502] AL_MCU_CONFIG_CHANNEL:C2087102
[ 2011.622421] AL_MCU_DESTROY_CHANNEL:00007104
[ 2011.626604] AL_MCU_DECODE_ONE_FRM:C40C7105
[ 2011.630699] AL_MCU_WAIT_FOR_STATUS:C2047106
[ 2011.634875] AL_MCU_SEARCH_START_CODE:C4087108
[ 2011.639231] GET_DMA_FD:C00C710D

Codec error: Unknown error

What's the problem?

0 Kudos
pierlum
Voyager
Voyager
555 Views
Registered: ‎05-30-2017

Hi @watari ,

I solved the problem. I work with 2019.2 and the correct code must be downloaded from https://github.com/Xilinx/vcu-ctrl-sw/tree/release-2019.2 . Pg252 v1.2 at page 224 gives this link https://github.com/Xilinx/vcu-ctrl-sw . But it refers to an older version of the code of the sample app. I think that in the next version of pg252 it must be updated.

Thank you. 

View solution in original post

florentw
Moderator
Moderator
481 Views
Registered: ‎11-09-2015

Hi @pierlum 

The pg252 is pointing to the git repository. You are responsible of checking in for the correct branch corresponding to the version you are using.

The PG252 might not be updated every release so the most generic link is the one which is already present


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
pierlum
Voyager
Voyager
475 Views
Registered: ‎05-30-2017

Hello @florentw ,

thank you for the informations. So next time when I find a git link in a PG I'll search for the correct branch.