- Using Interfaces (GPIO, UART, SPI, ...)
- Building an initial ramdisk without root permission
- Creating a JFFS2 image from a directory structure
- SAM-BA : Flashing taskit's ARM-based boards
- Flashing new u-boot on Portux920T / Portux Panel-PC
- Implementing an own boot-logo for Panel-Card
- Nano-X with tslib support
- Using Watchdog on Stamp9G20 or PortuxG20
- Development with Eclipse
- Installing Debian/GNU Linux on Stamp9G20 and PortuxG20
- Using Xenomai on PortuxG20/Stamp9G20
- Installing a rootfs on SD card
- Using Power Management Features
- Using the NAND flash on NanosG20
- Using the buzzer on PortuxG20 rev. 2 and NanosG20
Creating a C/C++ project
Last edited by cglindkamp on Thu, 03/11/2010 - 16:51
It is now time to create your first C or C++ project. A C++ project is used as an example. First, start the project wizard with menu File -> New -> C++ project. There choose "Hello Word C++ Project".
You can now either finish the wizard and open the project properties under the menu Project -> Properties or click "Next" twice and open the advanced settings. In this dialog, you have to adjust the toolchain used. Each tool in the toolchain has a common prefix which you must now enter in all places, where the tools are mentioned. As an example, the prefix "/usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi" of the Ångström toolchain is used.
First adjust the paths in the "Discovery Options" as shown below. It is used by the indexer to find header files. Change the "Compiler Invocation Command" for both, the "GCC C Compiler" and the "GCC C++ Compiler".
Now change the path for each tool in the list shown the following screenshot.
Be aware that you have to repeat theses adjustments for all build configuration. Here it was done for the debug configuration.
After finishing the configuration and building the project, it should look like this:
Eclipse - Created project
As you can see there are also headers listed that do not belong to the ARM toolchain but to the development system. This is a bug in Eclipse CDT and can be worked around by closing Eclipse, deleting the file .metadata/.plugins/org.eclipse.cdt.make.core/hello.sc in the workspace directory and restarting Eclipse (adjust the filename if your project was called differently). It now should look like this:
Eclipse - Cleaned project
You have now set up the first project and can add more files and code. The project creation process for C applictions is basically the same. There are just the GCC C++ options missing.



