Free Open Source embedded C/C++ software development with Eclipse

     Eclipse is an Open Source IDE that has became the facto in the embedded software development realm.  It is a very complex and ultra customizable IDE.  You can pretty much make it do whatever you like by creating plugins and templates.  Many people have already created plugins for different type of MCUs such as AVR, MSP430, 8051, ARM, etc...   Any processor that GCC compiler can compile, there is a good chance that it would work with Eclipse.  In this post, I will try to gather as much information and pointer as I could to setup an Eclipse environment.  I will concentrate more on OSX as it is my OS of choice for daily use and also my development platform.

Embedded software development requires three things: the compiler, the editor or IDE and the debugging tools a JTag.   Compiler and IDE are free open source.  The JTag tool, you'll need to buy the one for the MCU you are developing.

Eclipse CDT IDE

     Let first download and install Eclipse for your developement environment OSX, Linux or Windows.  Follow this link to download.  This is the current version as of this writing.  I will try to keep most updated as possible.  Click the link bellow to Eclipse download page then select Eclipse IDE for C/C++.

OSX version is in .gz format.  All you need to do is decompress it by double clicking on it.  Then move the whole thing to wherever  you want.  I moved mine to /Developer/Applications then add Eclipse to the Dock.  Once your Eclipse is installed find the links bellow to install the development tools and plugins for the embedded processor you want to work with.  You can have multiple instant of Eclipse on the same computer.  This means you can have one setup for ARM development and an other for MSP430 for example or you can also have both in the same Eclipse.  The choice is yours to make.

Starting from Eclipse Oxygen requires Java 8 or above.  Download it here

ARM Processor

Start Eclipse and select the default workspace.  Once Eclipse is started, select the menu 'Help/Eclipse Marketplace'.  A popup will appears. Type 'arm' in the search box and install the 'GNU MCU Eclipse ...'

The GCC Compiler for ARM can be found here  This site is maintained by ARM though it is the most active and up to date GCC compiler for ARM.  There is no installation package for OSX version.  It is only available in bzip2 format.

The best ARM Eclipse plugins I found is from here  There are substantial information on how to install and setup the plugins with JLink & OpenOCD for debugging.  I have tested this with NXP LPC, NRF5x, Freescale K series, CC3200 on MAC OSX.  It works fine with both processor using the same Eclipse.  Debugging tested with J-Link and IDAP-Link on OS X, Windows & Linux.  The IDAP-Link is the low cost CMSIS-DAP Jtag for debugging and mBed(ing)  your boards.

The Eclipse project wizard by default creates project with setting for Cortex-M3.   You will need to manually change it via project settings.  See details project creation for each processor on its own page of this blog.

See my EHAL page for source code and example projects for multi-platforn.  All projects are Eclipse IDE projects, no makefiles.  Full source code exemple for nRF51 Blinky & Blinky over BLE custom service projects are available on the page.

Eclipse with CC3200 is now working with TI LaunchXL OpenOCD Ftdi, see CC3200 page.

MSP430 Processor 

GCC Compiler and Eclipse Plugins can be found here.  Works on MAC OSX as well with same Eclipse I used with ARM.  I have not yet test debugging.  Compiler work well.

JTag Debugging with Eclipse

The Eclipse plugins above supports J-Link & OnpenOCD for hardware debugging.  Once you have successfully compiled an embedded project, you'll need to create a debugging configuration for your project.  It is not created by default.  To create a new debugging configuration, select your project the select the menu 'Run' from the menu bar.  From the drop down menu, select debug configuration.  A popup window will appear as below.

On the left hand side, there are many type of debug configurations.  Only 2 are of interests the GDB SEGGER J-Link and the GDB OpenOCD.  Selected the one you want to use and create a new configuration of that type.  Once the new configuration is created, go through all tabs to customize for the target project & MCU.  J-Link requires setting target MCU in the debugger tab.  OpenOCD require setting the appropriate .cfg files.   See IDAP-Link page for more details on OpenOCD debug settings.


  1. Can't debug anymore after update to SDK 8.0 (probably is not related), but I got the message “Program file does not exist”, (using GDB SEGGER J-Link Debugging) even this files has been succesfully created: MyProject.elf, MyProject.bin, MyProject.hex,, MyProjectmd5.bin..
    any idea ?

    1. Have you reinstall JLink software ? It seems not able to find JLink

    2. No, and the value of the variables ${jlink_path}/${jlink_gdbserver} are ok (/Applications/SEGGER/JLink/JLinkGDBServer)

    3. Some how your link software is not there anymore. Try to reinstall jlink software see if that works. I think they released a new version already on Segger website.

  2. It seems that there is a problem running JLinkGDBServer

    $ JLinkGDBServer
    SEGGER J-Link GDB Server V4.98e Command Line Version

    JLinkARM.dll V4.98e (DLL compiled May 5 2015 11:59:38)

    -----GDB Server start settings-----
    GDBInit file: none
    GDB Server Listening port: 2331
    SWO raw output listening port: 2332
    Terminal I/O port: 2333
    Accept remote connection: yes
    Generate logfile: off
    Verify download: off
    Init regs on start: off
    Silent mode: off
    Single run mode: off
    Target connection timeout: 0 ms
    ------J-Link related settings------
    J-Link Host interface: USB
    J-Link script: none
    J-Link settings file: none
    ------Target related settings------
    Target device: unspecified
    Target interface: JTAG
    Target interface speed: 1000kHz
    Target endian: little

    Connecting to J-Link...
    J-Link is connected.
    Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled May 4 2015 13:48:48
    Hardware: V1.00
    S/N: 681968347
    Checking target voltage...
    Target voltage: 3.30 V
    Listening on TCP/IP port 2331
    Connecting to target...ERROR: Could not connect to target.
    Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
    Shutting down...
    Could not connect to target.

    1. Have a look in the Debug Configuration... in the Main tab. Check to see if your program is entered. It could also be that you are compiling in Release mode, therefore the Debug version does not exist for debugging.

    2. Is was this, the program was missing. Thanks !