Difference between revisions of "CrossCompileInEclipse"

From eLinux.org
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 25: Line 25:
 
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".
  
[[File:CrossGcc-newProjectWizardPrefix.png]
+
[[File:CrossGcc-newProjectWizardPrefix.png]]
  
 
Now, your project will be built with the use of your cross tools.
 
Now, your project will be built with the use of your cross tools.
Line 34: Line 34:
  
 
Fill in connection and remote path information on the Main Tab.
 
Fill in connection and remote path information on the Main Tab.
 +
 +
[[File:RemoteLaunch1.png]]
  
 
On the debugger tab, specify the path to your cross gdb.
 
On the debugger tab, specify the path to your cross gdb.
  
 
Save the configuration and now you are ready to debug your application.
 
Save the configuration and now you are ready to debug your application.
 +
 +
[[Category:Tips and Tricks]]
 +
[[Category:Development Tools]]

Latest revision as of 06:16, 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".

CrossGcc-newProjectWizardPrefix.png

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.

RemoteLaunch1.png

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

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