Home Contacts Terms Send money Cookie policy


Personal blogs


Acme's Friends

We would like to inform our clients that our shipping office will be closed from Aug 8 to Aug 23

Developing in C/C++ with Eclipse Indigo on Windows

This article illustrates how to use Eclipse Indigo IDE to cross compiling your C/C++ code on a Windows PC and run it on a FOX Board G20.

Eclipse is a multi-language software development environment comprising an IDE and a plug-in system to extend it. It is written primarily in Java and can be used to develop applications in Java and, by means of the various plug-ins, in other languages as well, including C, C++, Python, Perl, PHP, and others (read more...).

Install Eclipse Indigo

Download Eclipse IDE for C/C++ Developers for Windows from the Eclipse website:

Uncompress the ZIP file directly in the working directory (i.e. c:\eclipse) and execute eclipse.exe to run Eclipse on your desktop.

The welcome screen will appear:

Install the ARM plugins

To make the cross compilation procedure simple, install a plugin called GNU ARM Eclipse Plug-in.

Open the install form selecting the "Help –> Install New Software…" menu item then copy in the "Work with:" field this URL: "http://gnuarmeclipse.sourceforge.net/updates".

Uncheck the "Group items by category" to display the ARM plugins available.

Check the GNU ARM C/C++ Development Support item and press the Next button.

Sourcery CodeBench Lite 2011.09-70 for ARM GNU/Linux

Sourcery CodeBench Lite 2011.09-70 for ARM GNU/Linux is a complete C/C++ development environment based on the GNU Toolchain which is freely available and has a quick installer that also manages the path variables to simplify the calls to the executable everywhere inside your computer.

Go to https://sourcery.mentor.com/sgpp/lite/arm/portal/release2029 and download the IA32 Windows Installer version (about 127MB).

Run the executable file to install it and select the Typical installation.

When the message box "Chose Install Folder" appears, type a simple path like c:\codesourcery avoid using the default path. On my Windows XP for example the default path is C:\Program Files\CodeSourcery\Sourcery_CodeBench_Lite_for_ARM_GNU_Linux that Eclipse will probably not manage.

The last step to carry out is to remove the part "linux-gnu" in the filename of some executable files located in c:\codesourcery\bin.

For example arm-none-linux-gnueabi-gcc.exe must become arm-none-eabi-gcc.exe used by default by the Eclipse ARM plugin.

List of renaming to do:

Original name New name
arm-none-linux-gnueabi-gcc.exe arm-none-eabi-gcc.exe
arm-none-linux-gnueabi-gdb.exe arm-none-eabi-gdb.exe
arm-none-linux-gnueabi-ld.exe arm-none-eabi-ld.exe
arm-none-linux-gnueabi-objcopy.exe arm-none-eabi-objcopy.exe
arm-none-linux-gnueabi-objdump.exe arm-none-eabi-objdump.exe
arm-none-linux-gnueabi-size.exe arm-none-eabi-size.exe

Eclipse should be able now to call the xcross executables needed to deploy the FOXG20 ARM processor.

Create your first project

Create a new C Project in Eclipse starting from the menu:

  +- New  
      +- C Project 

Insert your project name (for example hello) and select the toolchains ARM Windows GCC (Sourcery G++ Lite) then press the Next button.

On the next form press Advanced setting... button.

The project properties form will appear.


 C/C++ Build
  +- Settings. Tab: Tool Settings:
  |   |
  |   +- Target processor:  arm962ej-s
  |   +- Thumb (-mthumb): checked
  +- Debugging
  |   |
  |   +- Debug format: Toolchain default
  +- Additional tools
  |   |
  |   +- Create Flash Image: unchecked
  +- AARM Sourcery Windows GCC C Linker
      +- Do not use standard start files: unchecked

Type the OK button and Finish button to save and continue.

Create a new source file:

  +- File
      +- Source File

and call it for example hello.c then fill it with the classic Hello World ! example listed below:

#include "stdio.h" 
int main(void) { 
  printf("Hello world !\n"); 
  return 0; 

Compile the source selecting Project -> Build project

Run on the FOX Board G20

After a build, you will obtain a file called hello.elf. Copy this file on the FOX Board G20 and set it as executable with the command:

debarm:~# chmod +x hello.elf 

The run it:

debarm:~# ./hello.elf 
Hello world !

Related links


Thanks to Andrea Leganza for the original contents of this article.

Acme Systems srl
Via Aldo Moro 53 - 00055 Ladispoli (RM) - Italy
P.IVA/C.F. 08114831004
Tel + - Fax +39.06.622.765.31
PEC: acmesystemssrl@pec.it
Iscritta al Registro delle Imprese di Roma al n. 08114831004

Atmel© Certified Partner

Acme Systems provides this documentation "as is" without warranty or guarantees of any kind. We not provide any direct support for the Open Source preinstalled software but, through these pages and forum posts, all of the information required to obtain the sources, install, use and update the Open Source software that can be run on the Acme boards. Please note that all of the preinstalled software, used on the Acme Systems products, are Open Source so you have to check the license terms provided by the authors (usually the GPL) before using it in any commercial or non-commercial product, by yourself. Before to contact us please note that WE ARE MAINLY HARDWARE DESIGNERS and NOT LINUX GURUS and therefore could be better to post your questions to the Acme Systems forum and ensure that all of the site contributors and large software community can read and reply to your questions.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.