Hi !
I compiled a gtk application for the iMX6 target, but when I try to run it from the board terminal it does not work.
Compiled with :
${CC} ${CFLAGS} -c --sysroot=/my/path/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/ `my/path/sysroots/x86_64-angstromsdk-linux/usr/bin/pkg-config --cflags gtk+-2.0` my_app.c
Error :
cannot execute binary file: Exec format error
$ file my_app
my_app: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), with debug_info, not stripped
Thank you !
hi @ZakariaZID
Welcome to the Toradex Community!
Could you provide the version of the hardware and software of your module?
How did you compile your application? Where did you download the Toolchain?
How did you copy the application to the board?
Did you reboot after copying without doing sync
?
Best regards,
Jaski
hi @jaski.tx
I use Colibri iMX6S 256MB V1.1A in which i installed yocto (angstrom).
rocessor : 0
model name : ARMv7 Processor rev 10 (v7l)
BogoMIPS : 3.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10
Hardware : Freescale i.MX6 Quad/DualLite (Device Tree)
Revision : 0000
Serial : 05195869
I compiled the SDK in my host machine first (with populate_sdk), then I compiled the application using the command:
${CC} ${CFLAGS} -c --sysroot=path_to_sysroot/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/ `path_to_sysroots/x86_64-angstromsdk-linux/usr/bin/pkg-config --cflags gtk+-2.0` -o My_Application Application.c
then i copied the executable into the board using ssh (scp app root@ip-address:name)
“Did you reboot after copying without doing sync?” Yes
Best regards,
Hi @jaski.tx
i resolve the problem by using :
${CC} `/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/pkg-config --cflags gtk+-3.0` win.c -o exe `/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/pkg-config --libs gtk+-3.0`
Thank you
Perfect that it works. Thanks for your feedback.