2010年1月5日 星期二

How to Configure Your NetBeans for ARM Cross Compiling

It is important for an embedded programmer to have a good IDE with cross compiling ability. The eclipse can do this, and NetBeans also can do.

The configuration procedure of NetBeans to support ARM cross compiling is simple:

1. configure tool chain

You can configure the tool chain of NetBeans in [Tools/Options] menu item. In Options panel, the tool chain setting can be found at C/C++ tab, like the following image.




To create a tool chain setting, we need to press "Add" button and choose the root directory. It is very important to know that the root directory is the directory where as, gcc, g++ exist. So, in this case we choose "/usr/local/armeabi/bin".

2. configure project to using ARM tool chain

After the configuration of tool chain, we need to configure the NetBeans project to use this tool chain. To do this, we can open the NetBeans project properties by right-click it, choose "build" item and select the created tool chain item at "Tool Collection" combo box.


3. configure include and linker

To configure including and linking directory is the important thing while compiling C/C++ projects. There are lots of ways to do so. In this doc, we use absolute path to configure them as the following images:




While everything is done, it is easy to compile your project into ARM environment.