Difference between revisions of "CrossCompileInEclipse"

From eLinux.org
Jump to: navigation, search
Line 20: Line 20:
  
 
Select "Executable-> Cross-Compile Project" on the left tab and "Cross GCC" on the right, click "Next".
 
Select "Executable-> Cross-Compile Project" on the left tab and "Cross GCC" on the right, click "Next".
 +
 +
[[File:CrossGcc-newProjectWizardMain.png]]
  
 
On the "Command" wizard page enter your compiler prefix and an absolute path to the directory where your cross tools live, click "Finish".
 
On the "Command" wizard page enter your compiler prefix and an absolute path to the directory where your cross tools live, click "Finish".

Revision as of 05:27, 27 October 2011

Preparation

This setup is based on Eclipse 3.6, installation process for 3.7 is supposed to be easier.

Start with Eclipse IDE for C/C++ Linux Developers package (http://www.eclipse.org/downloads/packages/eclipse-ide-cc-linux-developers-includes-incubating-components/heliossr1).

Install missing Target Management features.

Download http://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/helios/dist/cdt-master-7.0.1-I201009241320.zip.

Install cross compiler support.

Creating and building a new project

Start Eclipse, switch to the "C/C++" perspective.

Go to "New->C/C++ Project".

On the first page, enter your project name.

Select "Executable-> Cross-Compile Project" on the left tab and "Cross GCC" on the right, click "Next".

CrossGcc-newProjectWizardMain.png

On the "Command" wizard page enter your compiler prefix and an absolute path to the directory where your cross tools live, click "Finish".

Now, your project will be built with the use of your cross tools.

Debugging a project

Go to "Debug->New Configuration..." and select "C/C++ Remote Application".

Fill in connection and remote path information on the Main Tab.

On the debugger tab, specify the path to your cross gdb.

Save the configuration and now you are ready to debug your application.