Cross-Compilation and Remote Deployment from Windows

Cross-Compile and Remote Deploy from Windows for BeagleBone using Eclipse and a gcc-Linaro Toolchain.

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.

Step 1 : Set up eclipse

Download and unzip Eclipse for your platform- 32 bit or 64 bit

Download Eclipse

Eclipse 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”

Step 2 : Set up the cross compiler

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]


Linaro Changes 2014-11 Folder 2015-02 Folder

Unzip the contents to “F:/gcc-linaro/” where F is the chosen drive.

Download and extract “make.exe” from the following link.

Download make.exe

Copy 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.

Step 3 : Create a New C Project

Right Click in the Project Explorer pane and select New->C Project

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

You need not worry about the errors as the settings are yet incomplete. The errors would reset automatically after all the settings are completed.

Click Next. Notice that any additional configurations can be added later also.

Step 4 : Build the Project

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.

Step 5 : Install Remote System Explorer on Eclipse

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

Step 6 : Connecting to the remote system.

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

Step 7 : Connect.

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.


Step 8 : Upload.

Drag and drop "Brahma" under "Release" to "root" ("My Home")

Step 9 : Launch Terminal.

Step 10 : Check and Execute.

Enter “dir” in the terminal and check your executable.

“./Brahma” executes the program after setting the executable flag