Windows/Linux/Mac Eclipse plugin to compile and upload arduino sketches

In the installation guide

  1. Set the the indexer to "include Arduino.h"
    Add Arduino with its full path to the "files to index up-front"

In my version "Eclipse IDE for C/C++ Developers Version: Juno Service Release 1 Build id: 20120920-0800" I don't have the option to index files up front

here is what my screen looks like

Thanks again

Superman
This setting is only available for indigo. In my experience; juno (after a compile) does not show Serial as a bug.
Best regards
Jantje

Have problems in setting the plugin with the new Arduino IDE 1.5.1r2,

After installing the plugin, when I configure the Arduino IDE Path, the tool does not accept it. :frowning:

Also, I'm planning to use Eclipse with the Arduino Due which is an ARM and not an AVR processor...

Any hint?

arduino-plugin.jpg

rbid:
Have problems in setting the plugin with the new Arduino IDE 1.5.1r2,

After installing the plugin, when I configure the Arduino IDE Path, the tool does not accept it. :frowning:

Also, I'm planning to use Eclipse with the Arduino Due which is an ARM and not an AVR processor...

Any hint?

Yes
1.5.X rZ are beta versions that do not support all boards. It is majorly different in setup and has not yet stabilized.
So in other words I don't support it.
When the stable version comes out I'll look on how to support it.
Best regards
Jantje

Jantje:

rbid:
Have problems in setting the plugin with the new Arduino IDE 1.5.1r2,

After installing the plugin, when I configure the Arduino IDE Path, the tool does not accept it. :frowning:

Also, I'm planning to use Eclipse with the Arduino Due which is an ARM and not an AVR processor...

Any hint?

Yes
1.5.X rZ are beta versions that do not support all boards. It is majorly different in setup and has not yet stabilized.
So in other words I don't support it.
When the stable version comes out I'll look on how to support it.
Best regards
Jantje

I will see if I can work on it, hope I'm not getting in over my head.. I guess it can be done

  • Tailor the compiler and linker
  • Use the Arduino framework to get the same Arduino IDE look (hide all the stuff the user does not need to deal with)
  • Tailor the programmer and serial console.

--- Ricky

Ricky
I don't really understand what you are talking about.
The main difference between Arduino IDE 1.X and 1.5.X is that the hard coded stuff in 1.X is brought to the boards.txt and the programmers.txt and the platform.txt.
I have already done some work on this but the Arduino core team does not share their plans and they tend to do things different from how I do things. For instance I had decided to add platform folders under hardware (like teensy does) which contains board.txt files and Arduino core team decided to have hardware/[make]/[technology]/[configuration files].
[make]=Arduino
[Technology]= avr or sam
[configuration files] = boards.txt or programmers.txt or platform.txt.
As a result I need to change my board.txt reading code. I just hate that. :zipper_mouth_face:

The core team noted that the whole setup may change. To avoid the frustration of doing more things twice I decided to wait untill an official release is released to see how the core team decided to do it.

rbid:
I will see if I can work on it,

Please do; the code is available at github. Fork it and go from there. GitHub - Sloeber/arduino-eclipse-plugin: A plugin to make programming the arduino in eclipse easy

rbid:
hope I'm not getting in over my head..

Why would you?

rbid:
I guess it can be done

I'm sure it can be done. I think it should even be easier now as the commands are more disclosed and the framework to do it is in-place.

rbid:

  • Tailor the compiler and linker

No need to do this. The only thing that needs to be done is decide on the compiler and linker and provide them the good options.

rbid:

  • Use the Arduino framework to get the same Arduino IDE look (hide all the stuff the user does not need to deal with)

If you are willing to work on a arduino IDE perspective; I'm wiling to have it as part of the IDE.
Note that the Arduino "precompiler" is needed for this to work 100%.

rbid:

  • Tailor the programmer and serial console.

I really don't know what you are referring to here.

Best regards
Jantje

Jantje:
Ricky
I don't really understand what you are talking about.
The main difference between Arduino IDE 1.X and 1.5.X is that the hard coded stuff in 1.X is brought to the boards.txt and the programmers.txt and the platform.txt.
I have already done some work on this but the Arduino core team does not share their plans and they tend to do things different from how I do things. For instance I had decided to add platform folders under hardware (like teensy does) which contains board.txt files and Arduino core team decided to have hardware/[make]/[technology]/[configuration files].
[make]=Arduino
[Technology]= avr or sam
[configuration files] = boards.txt or programmers.txt or platform.txt.
As a result I need to change my board.txt reading code. I just hate that. :zipper_mouth_face:

The core team noted that the whole setup may change. To avoid the frustration of doing more things twice I decided to wait untill an official release is released to see how the core team decided to do it.

Above you explained exactly what I wanted to understand... therefore indirectly you have understand me :slight_smile:

Jantje:

rbid:
I will see if I can work on it,

Please do; the code is available at github. Fork it and go from there. GitHub - Sloeber/arduino-eclipse-plugin: A plugin to make programming the arduino in eclipse easy

rbid:
hope I'm not getting in over my head..

Why would you?

rbid:
I guess it can be done

I'm sure it can be done. I think it should even be easier now as the commands are more disclosed and the framework to do it is in-place.

Great, now I'm reading about GIT, before I dive into it :slight_smile:
Hope the work is not over my knowledge.. or that I will have enough time to deal with it :slight_smile:

Jantje:

rbid:

  • Tailor the programmer and serial console.

I really don't know what you are referring to here.

The idea is to use Eclipse to program the Arduino board and then use the Serial Monitor inside Eclipse as a terminal in the older days.

Hey, thanks for this plugin. I was able to get it up and working, uploading a sketch, fairly easily. Had a little problem getting the serial monitor to work. I'm using Ubuntu 12.04 and Eclipse Indigo and had the issue with not having the right port. A quick edit of eclipse.ini solved it.

Now if only I was skilled enough to really use it. Oh well, can't learn it by avoiding it.

Jimmy60
Thanks for the feedback.

Jimmy60:
Now if only I was skilled enough to really use it. Oh well, can't learn it by avoiding it.

That is the right spirit.
I live with the rule: "Do something that scares you; every day".
Best regards.
Jantje

Hello Jantje,

I thought I would pop along to say hi and again a huge thanks for your fantastic plugin to allow us to program our Arduino's using Eclipse.
I couldn't imagine having to use the Arduino IDE again, scary.

I have version 1.2.5.5 of your plugin running on OSX, but a question,
I am still using Arduino 1.0.1, can I move to 1.0.2 or preferably 1.0.3?

Met vriendelijke groet :slight_smile:
Paul

Paul
Thanks for the nice words.
I havn't done any real testing with 1.0.2 and 1.0.3 but I have done quick testing and havn't seen any problems.
So it should be ok.
Best regards
Jantje

Thank you for all the hard work on this plugin! I was able to get up and compiling in about 15 min thanks this plugin.

I have been having one issue however. The only way I can upload to my Arduino Micro, is to do the following:

  1. Goto Window> Preferences >Arduino>Arduino and check Disable RXTX
  2. Unplug the Arduino Micro and plug it back in
  3. Press the AVR upload button. <--Must be done within a few seconds of plugging the Arduino back in.

If I do not do the above, all that happens is I get a message box showing eclipse is running AVRDude. I can not cancel and there are no messages in the console view, it just hangs there indefinitely.

I am running Linux Mint and Eclipse Indigo.

yoda2nd
Thanks for the nice words on the plugin. I do not own a micro nor do I own Linux mint so I can't say I have tested this setup.
Are you using the 64 or 32 bit version of eclipse indigo?
Which version of the Arduino IDE are you using?
Are you using the serial monitor of the plugin?
In your boards.txt file do you have the following line?

micro.upload.disable_flushing=true

If so and you are not using the serial monitor than the plugin ignores the com port completely.
I also wonder why you have to select

Goto Window> Preferences >Arduino>Arduino and check Disable RXTX

For every upload. This is a global setting. Setting it only set a global flag.
Can you post an image of eclipse when you see the "message box showing eclipse is running AVRDude"
Best regards
Jantje

Hi yoda2nd,
perhaps you already did, but you may look at this page for further info: http://arduino.cc/en/Guide/ArduinoLeonardoMicro#toc4. I don't have a micro, but I understand that before uploading the sketch the Arduino IDE resets the micro, which creates a new virtual port (the micro has no separate controller for serial communication). I understand that in the IDE the timing between the reset and the launch of avrdude is based on some previous trial and error, not "exact science".

This explains why disconnecting the micro works for you (a reset should produce the same effect), and the fact that you have to find a timing that works for you before pressing upload, allowing for the new virtual port to be recognized by your OS, but with the micro still running the bootloader. The most likely reason why avrdude hangs is that it's trying to communicate with a micro that is already past the bootloader stage.

I take this opportunity to thank Jantje for his excellent plugin. Nice to know he's still monitoring this thread.

@spatula
Thanks for pointing to the link.
@all
I indeed have special code for the leonardo upload (I do own a Leonardo). As the micro like the leonardo has no dedicated usb chip it probably needs this code as well.
The easiest way to test this hypothesis is as follows:
Change in your boards.txt

leonardo.name=Arduino Leonardo

to

leonardo.name=Real Arduino Leonardo

and

micro.name=Arduino Micro

to

micro.name=Arduino Leonardo

Then select the board "Arduino Leonardo" as your board in the project properties (it is actually the micro)
And try again.
If this works it proves the hypothesis because I actually test on the name of the board.
Looking at the 1.5.2 boads.txt file I would think the esplora and the lilipad USB have the same issue.

Best regards
Jantje

Thanks for such a quick response.

Are you using the 64 or 32 bit version of eclipse indigo?
Which version of the Arduino IDE are you using?
Are you using the serial monitor of the plugin?

I am using:

64bit Eclipse Indigo
Arduino 1.0.1

And I am not using the serial monitor.

Linux Mint is a fork of Ubuntu with no Unity, it should work just the same as if it were run on Ubuntu.

In your boards.txt file do you have the following line?
Code:
micro.upload.disable_flushing=true

If so and you are not using the serial monitor than the plugin ignores the com port completely.

I have been using the default boards.txt file from 1.0.1, so there is no Micro listed. I have been using the Leonardo configuration from the boards.txt file and it works fine in the IDE. The micro was not added to the boards.txt file until 1.0.2, so I could try giving 1.0.2 whirl if you want.

I have checked the Leonardo settings and upload.disable_flush is set to true and setting it to false has no effect.

I wonder if perhaps the timing between opening and closing the serial port and running ARVDude is different for the Leonardo than the Micro ?

I also wonder why you have to select
Quote
Goto Window> Preferences >Arduino>Arduino and check Disable RXTX
For every upload. This is a global setting. Setting it only set a global flag.

When Disable RXTX is selected, does the plugin not try and reset the arduino?

Can you post an image of eclipse when you see the "message box showing eclipse is running AVRDude"

There is a different variant file for micro and leonardo so I would not use leonardo to program a micro.
So try with arduino IDE 1.0.2 and enabled RXTX

When Disable RXTX is selected, does the plugin not try and reset the arduino?

Not at all. How do you go from "disabling RXTX" to "resetting"?
When you disable RXTX the plugin stops doing all com port actions. So no reset before upload (you have to press the reset button yourself) and no serial monitor. How can the plugin still upload? Because the plugin starts avrdude who does the com port actions.

Best regards
Jantje

PS If you fiddle around like you are; it is nice to warn the reader in advance.

Sorry for taking so long to get back.

I tried upgrading to 1.0.2 and I am able to upload to the micro with RXTX enabled However I still have to reset the micro before upload (press the reset button).

Nice to hear you're got it working with the reset work around.
I have a micro now but I don't get it to work on my redhat :frowning:
Best regards
Jantje

For those owning a due and those wanting to use Arduino IDE 1.5.2 beta for other reasons:
I have released beta V2 that supports Arduino IDE 1.5.2. beta.
Read more at http://blog.baeyens.it/#post4

If you do not need Arduino IDE 1.5.2 beta and you already use the plugin I advice to stick to the plugin version as described at Arduino Eclipse IDE named Sloeber - Welcome! untill Arduino IDE 1.5.X is no longer beta.

For people starting with the plugin V2 can be considered.

Best regards
Jantje