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

I am not sure why, but the plugin will not take my edits for updating the avrdude path.

I edit it to point to: /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin

But it resets it to: /Applications/Arduino.app/Contents/Resources/Java/hardware/tools

Hi Monkeyknight
I see you are using Arduino 1.
The plugin is not compatible with Arduino 1. See my post on this topic in http://arduino.cc/forum/index.php/topic,81082.0.html
You should not have to edit the Arduino files. If the IDE works under OS X with these files there is no reason an eclipse plugin should have to change these files.
The only change you made that I can not explain is "I had to add "#include <stdint.h>" to Arduino.h"

On behalf of "I am not sure why, but the plugin will not take my edits for updating the avrdude path."
Have you followed the "important notes" in my previous post?

I see you are changing things in the project settings. Normally this is not needed. If you want to change it anyway it is better to change them in project properties-> C++- general > paths and symbols. Information is stored at several locations and you may undo your changes without knowing.

I'm wondering what you provided as input to the preference screen below.

Given your input it should work if you provide "/Application/Arduino.app/Contents/Resources/Java"
Can you try to change to this settings saave the preferences reopen the preferences and take a image from the avr path settings

Delete all the project (or even the workspace) selecting delete content on disk before you do a new test.
As far as I see it should work.
Best regards
Jantje

I just did an uninstall of Eclipse and deleted all my workbenches, and reinstalled on my Mac Mini. Life is good! Now I just have to do it to my Mac Book Pro's.

This is just killer! Perfect. After a bit, I think that I am going to look into porting over to the IDE version 1.0 though. It is kind of a downer that I have to use an old version of the Arduino IDE, but I tell ya what - It's still flippin' awesome!

Many thanks to you! May your code always compile the first time.

Thanks,
Nicholas

I'm testing your plugin un my linux (ubuntu 11) with an arduino Nano.
I'm having some linking problems with the arduino_atmega328p autogenerated project:
‘init’ was not declared in this scope main.cxx /arduino_atmega328p/arduino line 3 C/C++ Problem
‘loop’ was not declared in this scope main.cxx /arduino_atmega328p/arduino line 8 C/C++ Problem
‘setup’ was not declared in this scope main.cxx /arduino_atmega328p/arduino line 5 C/C++ Problem
Symbol 'DDRB' could not be resolved pins_arduino.c /arduino_atmega328p/arduino line 361 Semantic Error
Symbol 'DDRC' could not be resolved pins_arduino.c /arduino_atmega328p/arduino line 362 Semantic Error
Symbol 'DDRD' could not be resolved pins_arduino.c /arduino_atmega328p/arduino line 363 Semantic Error
...

Am I missing something?

Nicholas
Are you saying the plugin work fine on OSX with Arduino IDE 0023? That would be great.

turdusmerula
The init, loop and setup sound unknown to me.
Does you code compile? if so please read the section "Eclipse tells me there are bugs in my code but it compiles ok." in the faq at This page has been moved
How do you get to main.cxx? I have main.cpp?

About the errors in pins_arduino.h see "There are errors and warnings in the Arduino library." in the same FAQ

Note that in 1.0 these errors have been fixed :smiley:

Keep me posted

I am not positive which version it is. I didn't take a look. I will next time I boot it up though.

Thanks again!

Okay solved my problems. I just have to tell eclipse to exclude the main.cxx file from build and it works !

On ubuntu we have the 0022 installed and your plugins works, really great job thanks a lot :slight_smile:

One remaining question, where can I find on eclipse the output logs emitted by the Serial.print() command? thought I'd find it in the Console window but I failed.

turdusmerula
You need a serial communication program with the eclipse plugin. I use the serial monitor from the arduino IDE.
I'll make a todo to add this to the FAQ.
Best regards
Jantje

Jantje:
You need a serial communication program with the eclipse plugin. I use the serial monitor from the arduino IDE.

Thats what I was doing :wink:
I use the cat command, it works far better than the arduino IDE in a good console emulator in Linux cat /dev/ttyUSB0 Just make sure that the bitrate selected in eclipse is the same than the one given in the Serial.begin().
Note that the cat must be killed before trying an new burn of the arduino.

turdusmerula

Txs for the linux tip on to use cat.
I'm still working on the 1.0 compatibility.
Best regards
Jantje

All
1.0 compatibility is fixed.
And I wanted this thread back on top 8)
Best regards
Jantje

Hello Jantje. I now only use your plugin as primary tool for my projects, it is pretty stable and very usefull :slight_smile:

One thing i noticed, do not make a cancel during a burn of the arduino even if the burn is not working because the serial port remains locked (hard disconnect of the arduino seems to be enough to solve this).

And one request: would it be hard to offer the possibility to choose a different serial port for different project? for exemple to have a TX arduino project on serial 1 and RX arduino project on serial 2.

Do you know a plugin or third party tool I could use to remote debug on the arduino and do step by step?

turdusmerula
txs for the update.
I'll add your comment on cancel to the FAQ.
As to your request. Have you tried it. I mean the latest version "Should" support this (the 1.0 compatible one). I haven't tried though. To make it work just change the project preferences->arduino->arduino for the 2 projects (not the libraries) to point to the correct com port.
I have read numerous posts on debugging. as far as I understand it states: pay money or expect very low level support.
Let me know if it works.
Best regards
Jantje

I've updated to your latest 1.1 and tested it again. I got the same behavior than previously, when I select a serial port it is set for all projects not just for one.
I also tried to use a specific programmer configuration (preferences->arduino->AVRDude) for each project with an overrided serial port but the serial port used at the end is the one in preferences->arduino->arduino.
This parameter seems to be at the workspace level even if we can set it at the project level isn't it?

turdusmerula
I checked this in the code and indeed I use the last used upload port and not the upload port set in the project.
I'll fix this.
Best regards
Jantje

All
The comport issue is fixed in 1.1.3
In newly created project there will be a define ARDUINO that is equal to 0023 for version 23 and 100 for version 1.0 the version info is based on the content of the versions.txt file in the lib folder of arduino.
This allows to do things like
#if (ARDUINO >= 100)
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
Best regards
Jantje

Hi, and thanks for the guide..

I have followed the installations steps, and that works fine.
When I try to make a new project with my hardware >> Arduino Mage (AT mega1280) << I get an error messages : Failed to create project xxxxx , Path variable name cannot contain character: (.

After that it is not possibly to compile correct or uploade.
If I try to make a another project with a >> Arduino Uni << Hardware (I don’t have that board) , the project are created without any problems, and I can compile correct ?

What can I do ?

Happy new year.

Per

Hi per
This is indeed an issue.
I'll fix it in the next release but this may take a while.
You can work around the problem by modifying the string "Arduino Mage (AT mega1280)" in the board.txt to "Arduino Mage AT mega1280".
Best regards
Jantje

Super, that works , but only for hit the next wall :cold_sweat:
When I try to download, I get this error: >> avrdude: ser_open(): can't open device "COM17": The system cannot find the file specified. <<
I know that my COM port are COM17, and I am able to download via the “original” IDE
Any ideas ?
/Per

avrdude: ser_open(): can't open device "COM17"

Have you tried using the verbose output from the IDE to see how it formats the name of the com port? There are issues with com port names when the numeric portion is greater than 9. Some sill combination of dots and slashes are needed to make windoze recognize com port names with 2 digit numbers. Bunch of morons in Redmond haven't bother fixing the problem they have caused.