Using Eclipse

A project log for Embedding C++

C++ is an efficient language eminently suitable for use in embedded systems but some look for proof of the efficiency. This is the proof.

Rud Merriam 10/31/2015 at 03:153 Comments

The Arduino IDE has limited capabilities. It is basically a text editor with some additional capabilities to add the tool chains for various Arduino boards and call them to build the executable.

An alternative is Eclipse since it has a plugin that uses the Arduino directories to control the Eclipse project. But Eclipse adds many capabilities for working with C++ (and C!) that make it a better choice than the Arduino IDE. If you have features of Eclipse that you like that weren't mentioned that's what comments are for.

There are other options to chose from and the article's comments list some of them. I'll try to remember to make a list of them somewhere in this project. Feel free to add comments here about other IDEs. No flame wars, please. Just factual descriptions of what works, how well, etc.

I'm going to be using Eclipse since I am used to working with it.


Rud Merriam wrote 11/02/2015 at 16:53 point

Thanks for pointing that out about the INO file. I never ran into that because I always create a CPP file and move the setup() and loop() implementations to it. My INO file is empty. The 'New Sketch' wizard allows the creation of a just a CPP file and no INO file. Is that your doing, Jantje, or something Eclipse did automatically? 

I've been creating the INO file to retain compatibility with the Arduino IDE. [Elliot] pointed out that the IDE works fine with an empty INO:

  Are you sure? yes | no

jantje wrote 11/02/2015 at 11:45 point

This is the way I work with multiple configurations/boards as well. You should be aware though that for projects using ino files the hammer does not rebuild the .ino.cpp file.So if things go wierd use the verify to rebuild the .ino.cpp file.

The .ino.cpp file should be rebuild in following cases

1) added a new include to a ino file

2) added/changed definition of a function in a ino file after its first usage in the file (or used in another ino file)

3) added a new ino file to the project

Best regards


  Are you sure? yes | no

Rud Merriam wrote 11/02/2015 at 00:54 point

I was working on Arduino code for a new article and testing it on both a Uno and a Due. Using Eclipse with the plugin you can setup multiple configurations for a project. For a desktop project these are typically Release and Debug. You can setup configurations for different boards. Here's how:
Go to the plugin and select in the upper right 'Manage Configurations". In that dialog create a new configuration and set it as active. Back in the main dialog select the board to use and 'Apply'. To check, select the other configuration at the top of the screen and it should show the original board. 
From the main display goto Window | Open Perspective | Other. Then select the C/C++ perspective. In the toolbar there is a hammer icon for building the application. The down arrow to its right lets you select the configuration to build. Clicking on the arrow and then the configuration builds the application for the board you setup. It's really easy to check the code for multiple boards.

  Are you sure? yes | no