I am executing the below steps using imx7 warp7 board:
i have ported "core-image-machinetest" image into it and trying to cross compile a simple helloworld.c program into it.
i have installed arm-poky-linux-gnueabi-gcc from meta-toolchain and it is installed in /opt/poky/1.xx
i have created helloworld.c
#include <stdio.h>
int main (int argc, char **argv)
{
printf("Hello world !\n");
return 0;
}
and compiled using
$ arm-poky-linux-gnueabi-gcc -o helloworld helloworld.c
i was able to create executable file and tested the type also
$ file hello-world
hello-world: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
but when executing on the target it is giving the below error
root@imx7s-warp:/usr# ./helloworld
-sh: ./helloworld: No such file or directory
have anybody faced similar issues.
is there any steps i have missed out or is there any procedure to be followed either in standalone or while yocto development package compile.
Hi Bheema,
you are not passing any arguments when calling ./helloworld
have you tried?
#include <stdio.h>
int main ()
{
printf("Hello world !\n");
return 0;
}
Regards,
Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
the issue got resolved by compiling the helloworld.c as shown below:
$ bitbake meta-toolchain
bheema@Bheema:~/fsl-warp7-yocto/build-x11-machine-test$ /home/bheema/fsl-warp7-yocto/build-x11-machine-test/tmp/deploy/sdk/poky-glibc-x86_64-fsl-image-machine-test-cortexa7hf-neon-toolchain-2.1.2.sh
toolchain gets install at /opt/poky/2.1.2
and while compiling for target warp7 board we have to follow below steps:
root@Bheema:~/warp_appln# source /opt/poky/2.1.2/environment-setup-cortexa7hf-neon-poky-linux-gnueabi
root@Bheema:~/warp_appln# ${CC} helloworld.c -o helloworld.out
Regards
Bheema Rao