Hi,
Host PC: Ubuntu 12.04 (64 Bit)
Eclipse : Indigo
BeagleBone Black
I have just got my beaglebone black. I have been able to connect to internet (set static IP and DNS).
I have also managed to write and execute a small hello world program on the beaglebone itself as described by derek molloy’s video tutorials. The program works very well.
I have also setup Eclipse IDE on my Ubuntu 12.04 (64 Bit) laptop for cross-compiling programs on the BBB. Again derek molloy’s video was very useful here. I could setup the arm tool chains, remote explorer. A test program made on eclipse also compiled succesfully.
I copied and pasted this program to my BBB home directory and I got the error ‘No such File or Directory’, I have also made the program executable by using chmod ugo+x test as described in derek molloy’s video tutorial. But I am still unable to run a cross-compiled program on BBB.
Please suggest how I can solve this problem. Is this because I am using 64bit host OS ??
thanks
a
after copying the file over to the bbb what are the EXACT steps you are doing to run the executable.?
I change the permission settings of the executable, by the command chmod ugo+x testbbb
testbbb is the executable.
then I execute the program by the command ./test
This is when I get the error…
I have searched in the internet for a solution, but I could not get a suitable answer. For some inexplicable reason the program I created on the BBB using vi works…
Could this be due to the fact that the g++ compiler and linker are in-compatible with my BBB ? I used the exact same steps to install the C++ cross-compiler and linker for ARM as mentioned in derekmolloy video (sudo apt-get install gcc-arm-linux-guneabi and sudo apt-get install g+±arm-linux-guneabi).
I use 64 bit Ubuntu 12.04, could the error be due to this ??
thanks
a
Please describe in more detail what exactly are you copying. THe
binary you cross-compile on your desktop normally can't be copy-pasted
suscessfully; you probably should set up SSH public-key based login
and scp the file.
How exactly do you invoke it on the BBB? ./executable is the
recommended way to avoid PATH-related surprises. After that, maybe try
'strace executable' to see what system call causes the file error
you're seeing.
You ARE cross-compiling, as opposed to creating an Intel x86 based
executable and trying to execute it on the ARM CPU, right?
Also just knowing which toolchain you’re using may clear some things up.
przemek, I do just that though, well not technically copy/paste, but I compile using one of Linaro’s toolchains, use WinSCP from windows to Debian, and when i chmod I use chmod a+x ./executable. Dont know whats going on just yet.
a, pretend like you’re writing an exact steps howto, or somethign close to that. From toolchain → compiling the executable, which compiler/toolchain you’re using, all the way to finish.
yes I am cross-compiling, I have changed the compiler settings, from eclipse IDE. Project>>Properties>>C++ build settings
The GC C++ compiler command setting is arm-linux-gnueabi-g++, the GC C Compiler command settings is arm-linux-gnueabi-gcc, GC C++ Linker command is arm-linux-gnueabi-g++ and the GCC Assembler command is arm-linux-gnueabi-as
I execute the program by ./test
I will post the details of strace executable
thanks for the help
a
OK I got it working now.
I was copying the wrong executable from Eclipse, I selected the correct one (there are two executable, it seems I configured Eclipse wrongly) and now the program works on BBB as expected.
Thanks a lot for the help.
a
Can you tell me exactly what you do. I make a same issue but i can’t solve it. Thank you a lot
Vào 00:58:16 UTC+7 Thứ bảy, ngày 24 tháng tám năm 2013, arunbarn...@gmail.com đã viết:
Hi, I followed the below url for cross compiling my code for Beaglebone.
http://datko.net/2013/05/06/cross-compiling-applications-for-the-beaglebone/
After compiling when I am copying the file to Begale bone using scp command it’s giving some error as follows
root@beaglebone:~/Desktop/Sudipta# ./hello
-sh: ./hello: No such file or directory
can any one please help me for resolving the same.
You probably need to use chmod to make hello executable.
— Graham