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

Jentje,

I look forward to getting Eclipse Arduino IDE working, but for now I'm having problems. I'm running on Ubuntu 12.04. None of the instructions I've found are specific to linux. I'm not now nor have I ever been a Apple user so at key points in the instructions I don't think I was able to follow and to translate to linux. And,

FYI, earlier this week I installed Arduino 1.05 and teensyduino. I was able to build, download, and run on Teensy 3.1.

I've read and followed both yours and Headroom's instructions. First I followed your instructions from http://www.baeyens.it/eclipse/Install.shtml.

I installed Juno Eclipse (FYI I have had other same or other versions installed). I downloaded and installed Arduino 1.5.5 after reading your installAdvice page. I interpreted your note about "needs fix" as applying to Kepler and NOT juno. Apparently bad assumption and the page is confusing.

The first time I installed V2.2 plugin during the "install new software" steps there was one choice and I installed it. I went to Preferences::Arduino and tried to specify my Arduino 1.5.5. path but when I entered Apply it said invalid field. The dialog from the unix version is different from what was in the instructions.

After not being able to resolve this, I went back and read more and found Headroom's instructions. I followed these instructions but this time trying to install Eclipse Arduino IDE. When I "install New Software" and used provided link (same as yours) I was given 3 version that could be installed. I chose the one Headroom suggested in the instructions, but Eclipse said there was a newer version installed. I found a way to uinstalled the 2.2.0.1 that had installed. But still eclipse would not allow me to install the one suggested. In fact, none of them would install.

It would seem there's a conflict I've created and I need to clean things up. I use TI's Code Composure Studio, which is Eclipse based and I'd like to avoid breaking it.

Do you have any suggestions how to proceed?

Also, it appears that since I've chosen to try and install Arduino 1.5.5 the sources have to be modified per your InstallAdvice page. You provided a script that I cut/pasted into a file and made executable. The instructions are for MAC and are unclear where to run the script on linux.

Please help. Thank

@timbopoise

The Arduino Eclipse IDE bundles Eclipse Kepler and the plugin V2.2. No separate installation of the plugin is needed!
The only other software you have to install is Arduino IDE 1.5.2, or Arduino IDE 1.5.5 (NOT 1.5.4)

So, go ahead and compile and upload something :wink:

I'm looking for a volunteer to test assembly in the plugin V2 (latest build).
The volunteer should have assembly knowledge (at least at the command line level) and do testing.
Please react on the github issue support for assembly · Issue #121 · Sloeber/arduino-eclipse-plugin · GitHub
Best regards
Jantje

How to make a project , and include a working ~/Arduino/projectname ?
Creating a project starts with nothing.

You may want to dart with the instructions on my blog:

I'm looking for Info on how to import an existing project, all files, already with code.

AndreK:
I'm looking for Info on how to import an existing project, all files, already with code.

Easiest ways is I know that work for sure

  1. drag and drop
    Create project from scratch.
    Delete the created .cpp and .h files
    Drag and drop your files in the project in eclipse (you can select to link or copy the files both work)
    Import the libraries needed for your sketch.

  2. workspace location
    create a workspace in the parent folder of the folder containing the code
    Make sure there are no [foldername].* files
    Create a project with the name of the folder containing the code.
    Adopt files as needed.
    Import the libraries needed for your sketch.

What may work is that in the creation wizard you select a sketch different than default and point to your source code.

Best regards
Jantje

Thank you - it it best to keep the cope in ~/Arduino/ folder ? (with) projectname/projectname.ino
and teh workspace would be then in ~/Arduino ?
or would you recommend to dupliate the folder/ source into nother place ?

To start with, until I see how it works with bigger projects, I'd like to keep it in ~/Arduino with the deafult structure, to quickly compile using Ardiuno if i need to compare results.

I took a simple Ardiono project that works, and just imported it to a new folder, to test it with eclipse:
This is the result:

**** Build of configuration Release for project M2h ****

make all

Building file: /home/andre/Arduino/libraries/mavlink/pymavlink/generator/C/test/windows/stdafx.cpp
Invoking: AVR C++ Compiler
avr-g++ -I"/home/andre/arduino-1.0.5/hardware/arduino/cores/arduino" -I"/home/andre/arduino-1.0.5/hardware/arduino/variants/standard" -I"/home/andre/Arduino/M2h" -I"/home/andre/arduino-1.0.5/libraries/SPI" -I"/home/andre/Arduino/libraries/SimpleTimer" -I"/home/andre/Arduino/libraries/FastSerial" -I"/home/andre/Arduino/libraries/mavlink" -D__IN_ECLIPSE__=1 -DUSB_VID= -DUSB_PID= -DARDUINO=105 -Wall -Os -ffunction-sections -fdata-sections -fno-exceptions -g -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"mavlink/pymavlink/generator/C/test/windows/stdafx.d" -MT"mavlink/pymavlink/generator/C/test/windows/stdafx.d"  -c -o "mavlink/pymavlink/generator/C/test/windows/stdafx.o" -x c++ "/home/andre/Arduino/libraries/mavlink/pymavlink/generator/C/test/windows/stdafx.cpp"
In file included from /home/andre/Arduino/libraries/mavlink/pymavlink/generator/C/test/windows/stdafx.h:8:0,
                 from /home/andre/Arduino/libraries/mavlink/pymavlink/generator/C/test/windows/stdafx.cpp:5:
/home/andre/Arduino/libraries/mavlink/pymavlink/generator/C/test/windows/targetver.h:8:23: fatal error: SDKDDKVer.h: No such file or directory
compilation terminated.
make: *** [mavlink/pymavlink/generator/C/test/windows/stdafx.o] Error 1

**** Build Finished ****

I am not sure if it somehow grabbed too much from the library: "mavlink/pymavlink/generator/C/test/windows/stdafx.d
anyway - the libraries are the same that work fine with "arduino"

I'm not sure what you have done or how you did it but the compilke output states you are trying to compile

/home/andre/Arduino/libraries/mavlink/pymavlink/generator/C/test/windows/stdafx.cpp

which looks like you copied to much.
stdafx.cpp is a visual studio compile optimization solution which is not at all wanted/compatible with arduino ide.

exactly, arduino mavlink library comes with other examples as well, of course, I could delete them, for some libraries manually deleting here and there would mess with git.
-Arduino dig too deep into the library folder structure.
-Is if possible to stop Eclipse from doing it ?

If you import a library as a library in eclipse the examples folder will be removed from the compilation path.
If you want to exclude sources and/or folders you can right click the file/folder select resouce configurations and select exclude from build. Select the configurations to exclude (there should be only Release)
Once excluded the files/folders are grayed out.

[Installation problem]
Hi. I am relatively new to Arduino and completely new to Jantje's plugin.
I spent all yesterday trying to install it. I don't know if i should go back to page 1.

-I have Os X: 10.9.1.
-Downloaded Eclipse - OS X 32 Bit (It says Kepler)
-I couldn't find the Arduino V1.5.5 and downloaded V1.5.6-r2

-I tried Help > Install New Software > http://www.baeyens.it/eclipse/update (V 1.2.0)
-I also tried dragging & dropping http://www.baeyens.it/eclipse/download/product/V2.2_mac64.2014-01-19_15-16-30.tar.gz into dropins folder.

I tried several times with different versions of the files and most of the time it doesn't accept Arduino IDE Path.
Couldn't upload the file..
And sometimes "serial port already in use" warning.

I suspect that there might be a version conflict.
Now i removed everything. Where should i start again?

Thank you.

Hi beingobserver
It seems to me you are confused by the different installation options there currently are.
I have written this page to explain Sloeber- Pre Requisites the options.
please read the page and if something is not clear we can discus so it becomes clear to you and I can modify the page so it becomes clearer.

And here is a link to older arduino versions http://arduino.cc/en/Main/OldSoftwareReleases#.UxHZ0fFl7PE

Best regards
Jantje

Sounds like you have really tried to get it going, hopefully I can give you a few pointers to help you get up and working with this great plugin for Eclipse.

Before you start, you must have the correct version of the Arduino IDE already installed on your Mac. You can check on Jantje's site for the correct version you need for a specific version of the plugin. I do find it confusing how Jantje has detailed this and would like to see his instructions for this laid out differently so it is more clear and understandable. But, basically, only certain versions of the Arduino IDE can be used with the plugin. I believe this is because of changes in the way Arduino do things.

But, to let you know I use and others suggest using Arduino version 1.5.2 beta.
I use this version as I am playing with the DUE as well.

There are two basic approaches to having Eclipse work with Arduino, so that you can program and upload from Eclipse to your connected Arduino.

The first is along the lines of what you have done, and this was Jantje's first method of installation.
For this, you needed to download and install, as you have done the specified version of Eclipse CDT (The C/C++ dev system). After checking that Eclipse was installed and working correctly, you would then proceed to install Jantje's plugin.
Normally this is done from within Eclipse.
You can see this here http://www.baeyens.it/eclipse/Install_plugin.shtml.
From there you will see that you need to run up Eclipse and the select 'Help | Install New Software.
Follow the instructions step by step and you should end up with a system that works.

Also, as you are also on a Mac, this may also interest you, a link from Jantje's site Arduino Eclipse IDE and Plugin V2.2 installation | Trippy Lighting

Right, the second method, is far easier and should have you up and working in a very short time.
That is download one of Jan's prebuilt packages from his download area, http://www.baeyens.it/eclipse/download.php
Go down to see the Mac OSX packages and select a recent version.
You will need to unzip it and then you can install it..

Now, the problem.
I tried a few of these packages last week for you already, but, as you know I had problems with the installation.
I emailed Jan about this, but he is unfortunately unable to test the situation as he doesn't have a Mac.

To further test my research, I downloaded a bete testers package for Mac OSX and that installed fine for me.
Maybe you might like to try to download a prebuilt package from the download area with the link above and try.
That way, if you have problems, you may tell Jan and we will then need to see what the problem there is.
Maybe it was just me and I did something incorrect, but I tried on both my Macbook Pro and Mac Mini with the same results.
Both installs from the download are failed to install correctly,with errors being generated during the unzip process.
Yet on both my Mac's I could use the beta testers prebuilt package just fine.

Ok, I think that should be enough to get you well and truly confused Ersan :slight_smile:


Paul

I have written detailed installation instruction for Mac users here:

These are to be followed precisely. If it says Arduino 1.5.2 then don't attempt to use 1.5.6 because it is more convenient :wink:

Also, I would really appreciate feedback on these instructions (there's a Windows version as well). I have anywhere between 40-50 visitors with 2-3 views per visitor on that section of my tiny blog and rarely receive any feedback. Occasionally a user asks question and needs help, but once I provide direction I don't necessarily receive feedback if it actually helped.

Yes I thought your instructions were quite well explained too.
I could have used them last year or was it the year before that, when I was going through this myself.
Still, I learn much by slogging through the hard way.

Thanks Headroom, I hope this will help Ersan and others with using Eclipse.

P.S. You would have had a few more visits just now so I could get the link in my post :slight_smile:
Maybe I should read it again.


Paul

And in the mean time there is a 3th option to install.
This option is basically the same as the first option (install eclipse and add the plugin) but it is done using the eclipse marketplace.
once you installed eclipse go to help->eclipse market place
In the dialog box enter arduino as search word and select go
select install from the arduino eclipse ide.
then configure the plugin as described from step 4 onwards http://eclipse.baeyens.it/Install_plugin.shtml
or from Headroom his link.

Believe me or not but next week you won't understand why it didn't work

Best regards
Jantje

hi.
First I installed from Eclipase market. It sayd V2 , I did not see "2.2" anywhere, si I uninstalled and installed 2.2 from
baeyens.it
Whenever i click verify (the least I can expect to work) I get :

Conflicting handlers for it.baeyens.arduino.actions.ArduinoBuildAction: {it.baeyens.arduino.actions.BuildHandler@4d8491ec} vs {it.baeyens.arduino.actions.BuildHandler}

Not sure if this can be blamed on "arduino-1.5.6-r2" - I had to take a chance on it, as I failed to find the approved versions.

eclipse.buildId=4.3.2.M20140221-1700
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.cpp.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product

AndreK:
Conflicting handlers for it.baeyens.arduino.actions.ArduinoBuildAction: {it.baeyens.arduino.actions.BuildHandler@4d8491ec} vs {it.baeyens.arduino.actions.BuildHandler}

If I understand you correctly you are talking about a logging in the error log which has no functional influence on the working of the plugin.
If so it has been fixed as you can see here. Travis CI - Test and Deploy with Confidence
The market place installs the latest officially released version (which is V2.2). To have this fix you need the latest and greatest which is only available as nightly build. easiest is to upgrade using the nightly update site This is not the way to install the plugin

Can you please confirm that the issue is only an logging in the error log and if not can you please explain what goes wrong?

Best regards
Jantje