This article explains in detail how to set up a C/C++ Toolchain with a gcc Cross Compiler and the Eclipse IDE in Windows 7 and shows how both are used with a BeagleBone board.
Download and unzip Eclipse for your platform- 32 bit or 64 bit
Download EclipseEclipse needs no installation. It can be placed in any drive or folder you wish.
Unblock Eclipse application and click to Start Eclipse. Set the workspace to “F:/workspace” where “F” is the drive. Any other drive / folder may also be chosen.
After Eclipse starts: “Help >Installation Details” followed by expanding the Tree view shows the “C/C++ GCC Cross Compiler Support”
Tool chain for Cross Compiling is available from https://releases.linaro.org/latest/components/toolchain/binaries/
Select "gcc-linaro-arm-linux-gnueabihf-X.X-XXXX.XX_win32.zip" from the list of options provided. As of writing this, it is:
https://releases.linaro.org/latest/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_win32.zip
[eabihf stands for embedded-application binary interface (eabi) hard float(hf). More about EABI, ABI, ELF etc. at
http://processors.wiki.ti.com/index.php/C6000_EABI:Introduction_to_EABI,
http://en.wikipedia.org/wiki/Executable_and_Linkable_Format
http://en.wikipedia.org/wiki/Application_binary_interface]
Unzip the contents to “F:/gcc-linaro/” where F is the chosen drive.
Download and extract “make.exe” from the following link.
Download make.exeCopy To “F:/gcc-linaro/bin”
Extract "libiconv2.dll" and "libintl3.dll" from http://softlayer-sng.dl.sourceforge.net/project/gnuwin32/make/3.81/make-3.81-dep.zip to the same folder “F:/gcc-linaro/bin”
This completes the basic installation.
Right Click in the Project Explorer pane and select New->C Project
Enter the Project Name ex: ‘Brahma’
Select Hello World ANSI C Project
Tick Checkbox to show only the supported tool chain
Click Next
Enter your name as the Author - example: ‘Aham Brahmasmi’
Click Next
Clicking Advance Settings shows “Properties for Brahma”.
Expand “C/C++ Build”, Select “Environment”, click “PATH” and add “F:\gcc-linaro\bin;…” Do not delete the other Values
Expand C/C++ General
Select “Pre-processor Paths, Macros etc.”
Select “CDT Cross GCC Built-in Compiler Settings” under Providers Tab
You may notice that the project explorer shows the name of the Project with an error mark and the Problems window displays Errors (2 items).
You need not worry about the errors as the settings are yet incomplete. The errors would reset automatically after all the settings are completed.
Keep clicking Move up until it reaches the top, as first option
Click OK (You may also Click Appy prior to this)
Click Next. Notice that any additional configurations can be added later also.
Set the cross compiler Prefix as “arm-linux-gnueabihf-“. Note the ’-’ hyphen at the end. It is necessary
Browse and select the bin path where you extracted the linaro Compiler tools and placed GNU make
Now it is done as all the errors have gone away
Right click the project and Select Build Project
The Project ‘Debug’ Configuration get built producing the binaries.
"Build Configurations > Set Active > Release"
And it's done.
Select All Available sites and wait for the list box to be filled.
Choose Options from “Mobile and Device Development”. Accept the licence agreement and install
Click Yes and Restart Eclipse
Allow Access for Eclipse to use the network. After Eclipse Restarts “Window > Show View > Other”
Select Remote System and click ok.
Click "Define a Remote connection"
Select "SSH only" and click Next
Set the Connection and Finish
Default IP address “192.168.7.2” of Beglebone Black connected to the Windows System is to be entered in the Editable Combo Box for Host Name.
Expand the Sftp Files Tree and Note "My Home" and "Root"
Expanding My Home brings up Login Window. Default UserID for Beaglebone Black is “root” and leave blank for Password.
Drag and drop "Brahma" under "Release" to "root" ("My Home")
Enter “dir” in the terminal and check your executable.
“./Brahma” executes the program after setting the executable flag