[iMX6SLEVK] Executable generated using arm-poky-linux-gnueabi toolchain is giving -sh: ./testApp: No such file or directory

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[iMX6SLEVK] Executable generated using arm-poky-linux-gnueabi toolchain is giving -sh: ./testApp: No such file or directory

855 Views
bhayani_sunny
Contributor III

Hi,

I am using the arm-poky-linux-gnueabi toolchain to cross-compile a application.

I am able to cross-compile the application. But when I run the generated executable, i.e.

     ./testApp

I get the below error:

     -sh: ./testApp: No such file or directory

I tried to search reason for this but I am not able to find one.

I had such issue with one of my other demoApp whose executable was getting generated as demoApp.bin.

I was getting the same error mentioned above.


But then, I just generated the executable as demoApp.out and it worked.

I tried to even do the same for the above, but I get the same error i.e. No such file or directory

Please do let me know if I am missing anything.

Thanks,
Sunny

0 Kudos
4 Replies

623 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Sunny,

To specify the output filename, use -o option:

> gcc -o hello.bin hello.c 
// Compile and link source file hello.c into executable hello.bin 

$ ./hello 
// Execute hello.bin under Bash, specifying the current path (./)

also check your CC PATH and permissions.

Regards

0 Kudos

623 Views
bhayani_sunny
Contributor III

Hello Bio_TICFSL,

I run the below script from my toolchain path:

     source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

This setups all the environment variables required to CROSS_COMPILE.

As I mentioned previously, that I am able to generate either test_app.bin or test_app.out executable. But I am getting the below error when I try to run this app:

     No such file or directory

It would be great if you can give any pointers regarding the same.

Thanks,

Sunny

0 Kudos

623 Views
BiyongSUN
NXP Employee
NXP Employee

Please try following steps

source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

$CC -o helloworld helloworld.c

0 Kudos

623 Views
Yuri
NXP Employee
NXP Employee

Hello, Sunny !

test_app.bin -  this binary file is intended to be copied to boot SD just as an image.
                         it should be loaded by i.MX6 boot ROM.

test_app.out - this is elf file, that may be loaded and run via Linux shell, assuming it has been built

                        for Linux (non stand alone) environment.


Regards,
Yuri.

0 Kudos