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?
Did you say there is a scope?
How Do I debug?
Where Can I report bugs?
I use AVRECLIPSE...
How come this plugin is free
You state the plugin is open source. Where can I find the source?

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.

Configuration


In V2 there are 2 locations where I can set configuration info. Where Should I set it?
Can I use the plugin with a version control tool.
What is this private library in the settings page

General usage Advice

Do you advice to use 32 or 64 bit eclipse?
Are There any restrictions to the project name?
What is the best way to work with multiple arduino boards?
What is the best way to work with a mixture of boards (arduino-non arduino)?
What is the best way to work with multiple arduino versions (0022 0023 1.0 1.01)?
How do you advice to use the eclipse workspaces?

Trouble shooting

The plugin doesn't work on my system.
The serial (monitor) doesn't work on my system.
On Linux I have no Serial ports available.
Test Serial dll fails
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
I can't download the plugin. Is your site down?
On Mac I get the error "serial port is in use" when uploading.
How can I find the latest version when installing?

Background information

Which version control system do you use?
Which tool do you use to do test so many versions?

General

How can I contact the author of this great plugin

First of all ask yourself: "Do I have something of interest to share with Jantje? I mean interesting for Jantje, not for you?"
Consider this: "Jantje has spend many days working on this plugin.
Jantje is still spending way to much time on improving the plugin.
Jantje gives it to you all for free.
The only thing Jantje asks in return is that when you have a problem/question:
So don't be surprised when Jantje is not responding nicely when you ask a question you should not have asked him in the first place."
If you think I'm blunt; you should see the one-liner mails I get.
I'm not the only person in the world who feels like this. So before sending a mail; learn something and read 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.

So unless you want to send a mail saying "thank you" or "well done" Consider following alternatives:
If all of the above are not appropriate then you want to discuss something in private with Jantje, which -you think- is really interesting to Jantje: you may reach him at
eclipse@baeyens.it.
Note: If you want to increase your chanses of getting a nice answer :Buy him an Arduino.

On Which versions is this plugin tested?

Due to machine changes test setups have detoriated. Basically tests are now first done by developpers and then by users.

On which platforms is this plugin tested?

When I ask for testers I try to get a tester for each platform. As it is all volunteer work there are however no guarantees.
I designed/test on Red hat and Windows XP.
There are some loyal Mac users who'm I ask to test specific mac features.
My biggest fan on V2 Teensy and Mac
garretto wrote a doc on how to get V1 working on MAC OS.
Another doc on V1

Where is the serial monitor?

From 1.2.2 onwards you can use the included serial monitor. Select menu item windows->show view->other->arduino->serial monitor view.
From V2 onwards press the serial monitor icon in the toolbar (the same as Arduino is using) or open it via the arduino menu.
There is no serial monitor in the tool before version 1.2.2 Use the serial monitor of your choice.

Did you say there is a scope?

Thanks to Wim Jongman version 2.1.1 introduced scope functionality. It is a 6 channel scope that works exactly like simplot
You can use the sample code from that site.
Basically you can send any integer vallue to the scope. A good example for debugging could be that you send the actual read value and the mean; average ...

How Do I debug?

There is no debug functionality with this eclipse plugin.
But here is a nice article that explains how to debug in linux and windows
From 2.1.1 you can select to have a debug configuration in the sketch creation wizard.

Where Can I report bugs?

Please report bug at github

I use AVRECLIPSE...

Great, excellent choice, a neat tool. This plugin uses WinAVR. The code from WinAVR has been forked and included in V1 of this plugin. To avoid conflict between this plugin and WINAVR I had to change all the internal ID's of AVRECLIPSE. 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 amongst others: 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 AVRECLIPSE 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 AVRECLIPSE 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 AVRECLIPSE 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.
V2 removed AVRECLIPSE because due is no longer a AVR. The benefits of using AVRECLIPSE no longer outweighed the drawbacks of having to support SAM. This is actually very good news for people who need the full AVRECLIPSE functionality as now you can run both at the same time without drawbacks.

How come this plugin is free

I have written this tool for myself for several reasons. As I build it and I did not feel like investing time to make money out of it I published the code in open source.
When I build the serial monitor I considered to make a commercial package from it. I decided not to do so because the price/support effort seemed out of balance at that time.
In july 2012 I added a Buy Jantje an Arduino. page to allow people to sponsor this project. Results have been below expectations.
During this period my web stats reports a minimum per month of 3289 visits; 5206 page views.
During the whole of the 3 first months I received 5 donnations.
I'm not complaining but I'm looking for a way to convince myself to keep new versions of the plugin available and free. And it is getting harder and harder to convince myself.
The main reason is that there are plenty of people around who think: "Because Jantje gives away the code for free; he is my personal slave." In other words: I have to solve their problems and I am really rude if I refuse to do so. The result is that I spend time solving other peoples their problems or spend time getting rid of those people. In both cases my projects -for which I designed the plugin- are on hold.
On the non money front: the CDT bug for which I asked to vote has 6 votes after 19 months. Today my Karma at the Arduino forum is 38.
Bottom line: Due to lack of return I feel I only loose time and money with this pugin.
I don't want to think about this, because if I do I quit on the spot.
......(Jantje stopped thinking)
Update: The Arduino team has provided me with plenty of real Arduinos". I'm really pleased they have made those boards available to me. Mostly because I consider it as a recognition to my work by the core Arduino team.
Update 2: Some people jumped in with the development. Some hard to fix (for me) issues are now fixed for me too.
*I mean free and not free for 3 years.

You state the plugin is open source. Where can I find the source?

The first thing to note is that I only update the open source code when I release a new version. The latest and greatest code is as such not available.
You can find the code at https://github.com/jantje/arduino-eclipse-plugin Update: due to more people collaborating the latest version is at github.

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.
Advantages the eclipse environment has to the Arduino IDE are described in the next paragraphs.

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 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: Did I mention compilation speed?
So there are plenty of good things a software developer misses in the Arduino IDE.

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.

Configuration

In V2 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 arduino 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.Your changes will be in efffect even though the flag "use arduino ide tools in eclipse" is set. By removing the flag and resetting the flag you can undo the changes you did.
I hope this is clear.

Can I use the plugin with a version control tool.

Yes you can and should. I use Rational team concert. The best version control system available at this time. You can download 10 free licences (What I'm doing). If you are running an open source project you can get all the free licences you need.
If you are not be willing to set up your own server to run RTC/CVS/subversion/git you may consider using github.

What is this private library in the settings page

In the settings page a private library folder is requested. This setting should point to a location where you down loaded Arduino libraries.
If you haven't down loaded Arduino libraries yet do as follows
1) Consider using the Arduino IDE. (strongly advised)
2) Point it to a location where you can download Arduino libraries. (Strongly disadviced)

General usage Advice

Do you advice to use 32 or 64 bit eclipse?


Use 32 bit. No doubth. Why? The benefit of 64 is when you need more than 3Gig of memory to run the eclipse environment. Unless you integrate your projects with a suite of professional tools you will never hit this limit.
Arduino comes with a set of 32 bit tools. 64 bit Eclipse can not closely integrate with these tools. As a consequence "64 bit alternatives" are delivered with the plugin. However these alternatives sometimes have "side efects".
See for instance RTTX library on mac and ubuntu.
Also the tools are not tested by arduino in 64 bit. This explains for instance why the serial monitor does not work with Leonardo in 64 bit but it does in 32 bit.
So unless you really need 64bit eclipse I strongly advice 32 bit eclipse.
Update: Arduino started to support 64 bit on Linux so that may be an exception.

Are There any restrictions to the project name?

Because of the toolchain used folowing characters are changed to '_' when given as project name in the new project wizard : ' '; '(' ; ')'. The tool allows you to use these but they will be replaced.

What is the best way to work with multiple arduino boards?

You can have all your projects in the same eclipse workspace. There is no benefit of splitting them over workspaces.

What is the best way to work with a mixture of boards (arduino-non arduino)?


From version 1.3 the eclipse plugin supports multiple board.txt files. If you use this setup there is no reason to seperate the boards into different workspaces
You can have all your projects in the same eclipse workspace. There is no benefit of splitting them over workspaces..

What is the best way to work with multiple arduino versions (0022 0023 1.0 1.01)?

Each arduino version should have its own eclipse workspace. Changing Arduino version in the plugin may corrupt the plugin settings.

How do you advice to use the eclipse workspaces?

I keep all my arduino projects in one eclipse workspace. I make sure they al compile so there are no errors in the problem view.
I work this way, and I'm not sure I would advice this way of working.
I would advice starting with only one workspace. You may decide not to upgrade all you projects to the latest arduino version. At that point in time you will need an extra workspace. If you end up with plenty of projects in the same workspace you may find it is easier to split the workspace.
Note that splitting a workspace does not involve plenty of work.

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. Can you compile in the Arduino IDE?
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 use spaces in any names.
This way it should work.

The Serial (monitor) doesn't work on my system.

Verify serial communication is active.
Goto windows->preferences->Arduino->arduino and check wether "Disable RX TX" is unchecked.
At the same location press the "test serial dll" button to verify there is a vallid dll for your OS.
If the RXTX dll is enabled and there is a valid rxtx dll found for your OS/eclipse combination it works on most OS's (there is a known issue in Linux flavours )

On Linux I have no Serial ports available.

On some linux distro's the dll used will not find any serial ports.
To fix this add following line to your eclipse.ini after -vmargs
-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0:/dev/ttyACM1:/dev/ttyACM2:/dev/ttyACM3:/dev/ttyUSB0::/dev/ttyUSB1::/dev/ttyUSB2::/dev/ttyUSB3::/dev/ttyUSB4

Test Serial dll fails

When I press the "test serial dll" I get a dialog box telling me it did not find a proper dll.
What is happening?
When you press the button the plugin tries to load the dll delivered with the Arduino IDE. If this dll does not load it tries to load a dll delivered with the plugin. (note older versions worked the other way around)
Assuming Arduino IDE is working:
The Arduino dll is 32 bit so the eclipse environment you run the plugin in is not. In other words: you are probably running 64 bit eclipse and there is no 64 bit RXTX dll delivered for your os with the plugin.
I would advice to try the 32 bit version of eclipse. If you are adventures you may go and look for a 64 bit RXTX dll for you OS. (If you find one please inform me and I may be able to add it to the plugin.)

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 eclipse views 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 always 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 way to find the problem 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 your 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 icon without actually having a bug (in other words the code compiles ok but the indexer thinks it will not).
My current thinking is that following actions solve the serial problem. (note I have been thinking other solutions solved the problem)
Setting the preference windows->preferences->C/C++->indexer->Files to index upfront . Add arduino.h and or WProgram.h including the full path. With me it currently states "D:/arduino-1.0.1/hardware/arduino/cores/arduino/Arduino.h,cstdarg, stdarg.h, stddef.h, sys/resource.h, ctime, sys/types.h, signal.h, cstdio".

Following things are known to improve the Serial problem but are suspected to cause other indexer problems.
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 cstdio.h, 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 (press F5 when you have the project selected).
Now there should e a binaries folder in the root of your project containing the elf file.
Note that just like in the Arduino IDE there is no reason to "see" 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 and probably more to make it worse.
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 problem in windows unplug the arduino -after all connections to the com port have been closed -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.
The wire library also contains a include library. Due to "not top quality code of the wire library" a project using the wire lbrary also needs to include the utility folder. The same problem exists for ethernet and SD libraries.
From version 1.3 onwards libraries containing an utility subfolder also have the utility subfolder added to the include path.

Deleting a library corrupts my project

To help to fix this bug please vote at bugzille CDT project (You need an account -no charge)
This problem should not occur in V2.

To work around

Before you delete the library: Right click the library. Select "Resource configurations"->exclude from build. Select all chackboxes (normally you only have release). Select OK.
Now the library you want to delete will be the last entry in your project and is grayed out.
You can safely delete it now.

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++". Also note this is a pre V2 setup. From V2 onwards some names are different.
First deleting all the incorrect values and then setting the correct values back solves the issue.

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.

I can't download the plugin. Is your site down?

As you are reading this: "obviously my site is not down". The download via eclipse is standard HTTP just like this page is to the browser. If you can access this page you can download the plugin.
If it doesn't work for you: "Convince yourself that you have a problem at your site you (and you alone) will need to fix it.".
You can check the following:

On Mac I get the error "serial port is in use" when uploading.

The upload will be successfull with Arduino IDE 1.0 and higher unless you are uploading to a mega. Run following terminal commands to fix the problem:

$ sudo mkdir /var/lock
$ sudo chmod 777 /var/lock
for more info see http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1211165807/6

How can I find the latest version when installing?

To find the latest version when installing a eclipse plugin. In the "install new software" dialog make sure Below is an example of the settings. 1.2.5.5 is probably not the latest version.
The settings to find the latestversion

Background information

Which version control system do you use?

I used to use github. However I changed to Rational team concert as it fits far better with my needs. Rational Team Concert is a great tool that allows to control the code at a high and low level at the same time. To me it outruns Github by far.

Which tool do you use to do test so many versions?

Thanks for noticing there is quite some test work. As there are 4 eclipse versions I support and there are 4 Arduino IDE versions I support that is 16 setups. For each of these setups I compile a dummy project for al boards. In total that is more than 200 arduino sketches. There is no way I'm doing this manually.
I test all setups with Rational functional tester. Due to my employer I hold a licence to this product. I can not compare Rational functional tester to other tools in the market. I know it does the work with me spending less time than doing it manually.