Arduino eclipse plugin FAQ

This page contains frequently asked questions about the arduino eclipse plugin.

General

How can I contact the author of this great plugin
On Which versions is this plugin tested?
On which platforms is this plugin tested?
Where is the serial monitor?
How Do I debug?
Where Can I report bugs?
I use WinAVR...
There are 2 locations where I can set configuration info. Where Should I set it?

Arduino IDE Versus The arduino Plugin

Why would I want to use this plugin.
What is the benefit of the Arduino IDE to the eclipse plugin.
What is the benefit of the eclipse plugin to the Arduino IDE.
What do I need to know to develop code for Arduino with this plugin.

Trouble shooting

The plugin doesn't work on my system.
How can I find out more of the problem at hand?
Can I use spaces?
Eclipse tells me there are bugs in my code but it compiles ok.
Where is the elf file?
There are errors and warnings in the Arduino library.
I have modified my Arduino setup and ...
I can not cancel the upload to the Arduino Board
The library Wire does not compile
Deleting a library corrupts my project
The indexer states Serial does not exist

General

How can I contact the author of this great plugin

You can reach the author at eclipse@baeyens.it. If you have a question please follow the eclipse guidance when formulating your question
note the eclipse link is not a link to a help desk. it is a link to a document explaining how to ask questions the smart way.
You can also use the arduino forum to ask questions.
If you think you have found a bug you can log the bug at github

On Which versions is this plugin tested?

The plugin is tested on Arduino 0023 and Arduino 1.0.
Note: not all versions are tested on all platforms.

On which platforms is this plugin tested?

The plugin is tested on Windows 7 Windows XP and Opensuse.
garretto wrote a doc on how to get it working on MAC OS. You can find the doc here
Note: not all versions are tested on all platforms.

Where is the serial monitor?

There is no serial monitor in the tool right now. Use the serial monitor of your choice.

How Do I debug?

There is no debug functionality with this eclipse plugin.

Where Can I report bugs?

Please report bug at github

I use WinAVR...

Great, excellent choice, a neat tool. This plugin uses WinAVR. The code from WinAVR has been forked and included in this plugin. To avoid conflict between this plugin and WINAVR I had to change all the internal ID's of WINAVR. As a user you should not notice this unless you want to swap bewteen WINAVR projects and arduino eclipse projects created with this plugin.
You may wonder whether it was a good idea to fork. Wouldn't it have been better to build on top like the plugin builds on top of CDT who builds on top of Eclipse.
I fully agree that this would have been better. New releases of WinAVR could have been applied without hassle.
It was the original idea but due to circumstances (there is no one to blame) it worked out differently.
My plugin adds the create arduino sketch, the add library, a preference page, a property page and a sample sketch to start from and the Arduino reset.

So basically when you installed this tool you have the WINAVR on your system. But what is the difference between WINAVR plugin and the WinAVR included in this plugin?
1) As mentioned above I had to change all the ID's.
2) The WINAVR tool works with external tools like GCC and AVRDude. So does the Arduino IDE.When you set the option "use Arduino IDE tools in Eclipse" you actually set all the WINAVR settings to point to the Arduino tools. As all these tools are installed underneath the Arduino folder the plugin knows their location.
3) I fixed some bugs. Each time a tool gets used in a different way some bugs will pop up. I fixed the ones that bothered me.
4)I added the Arduino reset (still needed for the mega)
So unless I made a mistake and (as long as there is no newer WinAVR version) you can use only my plugin to do project development on non-Arduino and Arduino in the same environment.
Note that as I only changed the ID's and not the names installing WinAVR next to my plugin works but has the drawback that menu items will appear twice and you can't tell them from each other.

There are 2 locations where I can set configuration info. Where Should I set it?

As explained above; this plugin is build on top of the WINAVR and CDT plugins. The plugin sets the "default arduino settings" and groups all arduino settings in one place. So when you change a setting the plugin sets the CDT and WinAVR setting accordingly. The settings are only set when you set them (in other words they are not verified and corrected afterwards.) This means you can change them directly using the WINAVR and CDT functionality or indirectly using my plugin settings pages. One nice example to demonstrate this is in the preference page (windows->preference->arduino->arduino). This page contains the flag "use arduino ide tools in eclipse". If you set this flag the WINAVR plugin settings will be filled with the locations of the Arduino IDE (compiler/avr dude...). But you can still go to these settings in the WINAVR pages and change them. I hope this is clear.

Arduino IDE Versus The arduino Plugin

Why would I want to use this plugin

This plugin is not meant to replace the Arduino IDE. I think the Arduino IDE is the place to get started with Arduino, no matter what is your background. However when you are growing in writing code, or when you come from a software development background you will feel restrained by the Arduino IDE. In that case the eclipse plugin may be an alternative.

What is the benefit of the Arduino IDE to the eclipse plugin

The Arduino IDE does a great job in introducing people to Arduino. This is so for hardware people writing their first C++ code and for software developers doing their first electronics experience. So if you are new to Arduino stop reading and learn to use the Arduino IDE. The Arduino IDE does this by "hiding" C++ code complexity and Hardware complexity. The hardware complexity is hidden in the libraries/compiler/winAVR which are also used by the eclipse plugin. So there is no "real" difference there. The plugin currently (?) does not hide the C++ code complexity. For someone used to develop C/C++ this will not be a problem. People not used to writing C++ will need to learn about This because the way the Arduino IDE is set up it hides or avoids the need of these functionalities. There are plenty of good C/C++ documents on the web that explain these things, so I won't.

What is the benefit of the eclipse plugin to the Arduino IDE?

With the eclipse plugin you have a environment that is fully focused on the development of source code. It provides plenty of features. The ones I like the most are: So there are plenty of good things a software developer misses in the Arduino IDE that the rest of the world doesn't know about.

What do I need to know to develop code for Arduino with this plugin?

After you have read the pro and con's question you may wonder “how much is there to learn before I get this plugin to work?"
There is good news and there is bad news. The good news is: Other people got it to work relatively quickly so why would you not be able to do it. The eclipse plugin (just like the Arduino IDE) hides AVR-C++ and avrDude
The bad news is that to get the full benefit you will have to understand more of C/C++ development; eclipse and CDT. Eclipse is a professional development environment and that brings some complexity. But you don't have to understand it all before you get your first programs running.

Trouble shooting

The plugin doesn't work on my system.

First of all the plugin only works on a limited amount of platforms. See the faq for which versions. If you do not use any of these operating systems you are out of luck for this plugin.
Secondly
If it doesn't work with the Arduino IDE it won't work with the plugin.
Thirdly
there are plenty of settings that can be wrong. If it doesn''t work for you install the Arduino IDE in a new folder; install eclipse in a new folder; use a new workspace and reinstall the plugin. When doing so make sure you do not uses spaces in any names.
This way it should work.

How can I find out more of the problem at hand?

It is always a good idea to find out more about the problem at hand. There are actually 3 windows that can give you more feedback on the problem at hand. The console view gives you more information on the commands that are being run externally. That is the compiler and avr dude. The commands should be nearly 100% the same as in the arduino IDE (the order is not relevant). Differences I am aware of are The problems view gives an overview of the code problems and is probably not what you are looking for when you are reading this.
The error view gives you an overview of errors and warnings that happened in eclipse and or its plugins. To show the errors window: select Window->show view -> other->select general tab->error log. Look at the plugin column to see which plugin logged the warning. I can only tell you more about the errors and warnings generated by it.baeyens.* plugins.
A final and most time consuming is to download the code from github. You can then compile and debug the code.

Can I use spaces?

The usage of spaces is known to give problems when used in

Eclipse tells me there are bugs in my code but it compiles ok.

Eclipse compiles you code in 2 ways. Once when you request a build (when you press on the hammer-> compiler) and ones when you change code (indexer). The compiler is responsible for the build and the indexer is responsible for the continuous build.
The bugs (the red animals in the code) you see in the code can be found by any of the 2. The indexer behaves weird and sometimes doesn't find declarations that it knows. In that case you have the bug without a bug (in other words the code compiles ok but the indexer thinks it will not).
Following things are known to improve the situation
Setting the preference windows->preferences->C/C++->indexer->index unused headers.
Setting the preference windows->preferences->C/C++->indexer->index source and header files opened in the editor.
Setting the preference windows->preferences->C/C++->indexer->Files to index upfront . Add arduino.h and or WProgram.h.
Do next four in this sequence
Right click the project->index->Search for unresolved includes.
Right click the project->index->Freshen all Files.
Right click the project->index->Update with modified files.
Right click the project->index->Rebuild.

Where is the elf file?

When you have compiled the sketch sometimes you can not see the elf file in eclipse.
This is a bug related to eclipse. If your project compiled fine refresh the project (pres F5 when you have the project selected).
Now there should e a binaries folder in the root of your project containing the elf file.

There are errors and warnings in the Arduino library.

But it compiles OK.
in Arduino 1.0 there is only one warning left.
The file WString.cpp gives an error with the eclipse indexer. This is actually an error in the file See this post for more info
HardwareSerial.h: I am not sure what is the problem here
pins_arduino.c: contains clearly warnings that can be fixed by adding a cast
Print.cpp: contains a warning that can be fixed by adding a cast
Tone.cpp: contains warnings because the eclipse C/C++ indexer goes weird
Basically there is nothing to worry about, but it would be better if it were cleaned up.

I have modified my Arduino setup and...

You are entitled to modify the Arduino IDE setup. But I'm not supporting this. If you know what you have been doing and you play a bit with eclipse you will find many ways to help you to solve your problem.
To be frank: If you can change the Arduino IDE setup you are a big boy so you can deal with it, write a document about it and share it with the world.
This way we all become smarter.

I can not cancel the upload to the Arduino Board

Someone reported that pressing the cancel button during upload to arduino locks the com port. Even if the upload is not working. To solve the lock unplug the arduino from your pc and replug.

The library Wire does not compile

The eclipse plugin compiles all files as C++ files the Arduino IDE dos not do so. As a consequence the twi.c is compiled ad C++ by the plugin and as C by the arduino IDE. Modifying the twi.h file to force explicit C function prototyping fixes this problem. See the Arduino forum thread on how to do this.
From version 1.1.8 onwards this should be fixed.

Deleting a library corrupts my project

To help to fix this bug please vote at bugzille CDT project (You need an account)
To reproduce do the following:
Create a Arduino sketch project using the wizard.
Look at the project properties. They should look like the image below
The include properties after project creation
The include properties after project creation add a arduino lirary to your arduino sketch project. Look at the project properties. They should look like the image below
The include properties after project creation
The include properties after project creation Delete the Arduino Library
The project properties should look like any of the 2 above but they look like The include properties after project creation The include properties after project creation
Note that the images above show it for "GNU C" but the same counts for "GNU C++"
First deleting all the incorrect values and then setting the correct values back solves the issue.

I can use some help here. I have checked all the code (winAVR and mine) and see nothing that is beeing trigered after the delete. I can see in the .cproject file that the information is corrupt after the delete.
I have not been able to reproduce this problem in the CDT only eclipse environment. Any ideas are welcomed.

The indexer states Serial does not exist

This is actually the same problem as Eclipse tells me there are bugs in my code but it compiles ok.