How to Cross Compile Beagle bone Black Using Eclipse ?
You need to download some packages
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install eclipse-cdt
if this version of eclipse works on your system. congratulation
if not then try to install from below link
https://www.eclipse.org/cdt/
so i downloaded eclipse-cpp-2019-12-R-linux-gtk-x86_64.tar.gz
extract it where you want. run eclipse
if eclipse Run. now install arm-tool-chain
else try this
or with online installer install the package
https://www.eclipse.org/downloads/
Installing Tool Chain
$ sudo apt-get install g++-arm-linux-gnueabihf
Now You can run this command from terminal
$ arm-linux-gnueabihf-g++
arm-linux-gnueabihf-g++: fatal error: no input files
compilation terminated.
You need to download some packages
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install eclipse-cdt
if this version of eclipse works on your system. congratulation
if not then try to install from below link
https://www.eclipse.org/cdt/
so i downloaded eclipse-cpp-2019-12-R-linux-gtk-x86_64.tar.gz
extract it where you want. run eclipse
if eclipse Run. now install arm-tool-chain
else try this
or with online installer install the package
https://www.eclipse.org/downloads/
Installing Tool Chain
$ sudo apt-get install g++-arm-linux-gnueabihf
Now You can run this command from terminal
$ arm-linux-gnueabihf-g++
arm-linux-gnueabihf-g++: fatal error: no input files
compilation terminated.
so your tool-chain is successfully installed
now Open Eclipse IDE
Install Some Packages using Help -> Install new software
Select - All Available Site
Select this much of package
C/C++ development tools
Remote System Explorer
this two is enough . rest of package i am downloading for testing.
Create New C/C++ project
File -> New -> C/C++ project
Now Give Name And Select Linux GCC
Next -> Finish
Go to Project -> Properties
Settings and Add "arm-linux-gnueabihf-"
Now Save and close. again open Project Properties
C/C++ General Include Tab add following path
Tick on Add to all Configuration and Add to all Languages
GNC C " /usr/arm-linux-gnueabihf/include "
GNU C++ /usr/arm-linux-gnueabihf/include/c++/9
Library Path "/usr/arm-linux-gnueabihf/lib"
And Library
Apply And Close Now Build Project Ctrl + B
Now You See Binary [ arm/le ] so this binary will run on linux
To copy this binary add Remote System
windows -> show view -> other -> remote system
Now Right click on and add new connection or click on button
Select Linux
Now add Beaglebone details
Then Select
ssh.files next
processes.shell.linux next
ssh.shell finish
when you click on my home it promt beaglebone username and password
user : debian
password : temppwd
in your case may be different
Now Copy Binary and Paste at myhome
or Use terminal to do this
Open terminal and go to the Eclipse workspace project path
in my case Path is
/home/pmvanker/eclipse-workspace/BBB/Debug
$ scp BBB debian@192.168.7.2:~
it promt password
and done.
Now ssh to beaglebone black
$ ssh debian@192.168.7.2
$ sudo chmod +x BBB
$ ./BBB
!!!Hello World!!!
Done Thank you so much