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

I just tested this with Arduino 1.0.1 works like a charm.

@Globe
You state you use Arduino 1.0.1. Can you explain why you get

/Applications/Arduino1.app/Contents/Resources/Java/libraries/Wire/utility/twi.h:45: error: previous declaration of 'twi_readFrom' was here

When twi_readFrom is declared on line 43 with me in Arduino 1.0.1?

Best regards
Jantje

I just did a quick test with 1.0.2 and it work fine.
I verified and twi_readFrom is declared on line 43 with me in Arduino 1.0.1 and Arduino 1.02.
As on your systems twi_readFrom is declared on line 45 you are not running a standard Arduino.
Please try installing a standard Arduino version (0022 0023 1.0 1.01 or 1.02) and try again.
Best regards
Jantje

Jantje:
I just tested this with Arduino 1.0.1 works like a charm.

@Globe
You state you use Arduino 1.0.1. Can you explain why you get

/Applications/Arduino1.app/Contents/Resources/Java/libraries/Wire/utility/twi.h:45: error: previous declaration of 'twi_readFrom' was here

When twi_readFrom is declared on line 43 with me in Arduino 1.0.1?

Best regards
Jantje

Jantje,

I am using a standard Arduino version (1.0.1) but I replaced the original twi.h that was inside utility folder on Wire library with the one I downloaded from Arduino issue #791 Google Code Archive - Long-term storage for Google Code Project Hosting. .

Globe:

Jantje:
I just tested this with Arduino 1.0.1 works like a charm.

@Globe
You state you use Arduino 1.0.1. Can you explain why you get

/Applications/Arduino1.app/Contents/Resources/Java/libraries/Wire/utility/twi.h:45: error: previous declaration of 'twi_readFrom' was here

When twi_readFrom is declared on line 43 with me in Arduino 1.0.1?

Best regards
Jantje

Jantje,

I am using a standard Arduino version (1.0.1) but I replaced the original twi.h that was inside utility folder on Wire library with the one I downloaded from Arduino issue #791 Google Code Archive - Long-term storage for Google Code Project Hosting. .

In the mean time I fixed the issue and arduino team changed the twi.h. So do not download this file. Use the arduino one.
Best regards
Jantje

Hi Jantje,

In my case it worked with 1.0.1. . Thank you

I helped Globe with is setup but somehow it didn´t worked, i did the same process.
He is using MacOS might that be a reason?

I tried today with another fresh installation of Eclipse and Arduino 1.0.2 (I never used this version before).

Now everything is working properly (at least it seems so) and I can finally compile Wire library.

Thanks for all your replies.

If i forgot to say thanks, i´m sorry

I´m really glad you developed this plugin and still take the time to help others.

Thank you Jantje

Keep up the awesome work

I want to say thank you for all your hard work and hard time.

Let me start by explaining what i am trying to do with my arduino project. I have basically created an arduino aquarium monitor/controller for my fish tank. Basically I started my projected by dividing it up into about 15 mini projects. So i took care of each individual project and eventually combine them all into one. To do this have the main program void setup (){setupprogram1(); setupprogram2(); }..... I quickly realized the arduino ide was just really hard to work with on my larger project so i used notepad++ and then copied the program to arduino ide for compiling and uploading. I tried before to create a file for each project in arduino and get it to compile them but i got missing invalid function errors.

Now after doing some research i find out that eclipse is much better and more capable of doing exactly what i would like. I previous to finding this amazing plugin i tried to follow some tutorials, but they didn't go well. My problem is i am still trying to find out how to create a multifile program and i just can't seem to find what i am looking for by searching. This usually means i am searching for the wrong thing lol.

Greatly appreciate the help

P.S. keep up the great work

superman (is it really you 8) )
Thanks for the compliments
creating new files is easy in eclipse.
First thing is to decide is what type of file you want? Do you want a class a .cpp a .c a .h ....
Right click your project and select new->class(or header file; or source file; or source folder or just file)
Best regards
Jantje

Jantje:
creating new files is easy in eclipse.
First thing is to decide is what type of file you want? Do you want a class a .cpp a .c a .h ....
Right click your project and select new->class(or header file; or source file; or source folder or just file)

Talk about fast reply
I guess the problem is i don't understand the files (I need to do more research)

Thank You

superman:

Jantje:
creating new files is easy in eclipse.
First thing is to decide is what type of file you want? Do you want a class a .cpp a .c a .h ....
Right click your project and select new->class(or header file; or source file; or source folder or just file)

Talk about fast reply
I guess the problem is i don't understand the files (I need to do more research)

Thank You

Maybe this can help you
http://eclipse.baeyens.it/IDECompatibility.html
Best regards
Jantje

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