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

If testing in the last 2 weeks of this year is timely enough, I'm willing to step forward.

I'm still working on a issue and waiting for some more volunteers. The product should have c/c++ perspective by default · Issue #108 · Sloeber/arduino-eclipse-plugin · GitHub
I hope to get the first test version out end of this week.
If you want to get your hands on the latest version feel free to take a look at the new product that you can download from the nightly build http://eclipse.baeyens.it/download.php don't forget to set the arduino or C/C++ perspective.
Apart from a nicer start this will be the first test version.
Best regards
Jantje

@nico @RbSCR
Please send a mail to eclipse@baeyens.it so I can add you to the mailing list.
@kate
I still have your email adress.

I'm in the process of the paperwork for this release. So it should be soon now.

Best regards
Jantje

Jantje, Gelukkig Nieuwjaar,

I'm enjoying the latest beta release on both OSX and Linux, and have a question I would like to ask.
I have a need to be able to program a Mega based board using an ISP, a Freetronics EtherMega.
The board has a non functional USB cpu section, but the 2560 side is good.

I read in the git requests that you mentioned that it will not be available, but is there the possibility of doing this?


Paul

Hi Paul
Happy new-year to you to :slight_smile:

rockwallaby:
I read in the git requests that you mentioned that it will not be available, but is there the possibility of doing this?

I indeed don't plan to add the multitude of possibilities to upload as the Arduino IDE does. If anyone else wants to do this I won't stop him/her.
Does that mean you can't do it? ..... No.
The plugin contains a "generic uploader" That one allows to run a number of commands in sequential order. So if you know the commands tat need to be run you can modify platform.txt or boards.txt to execute these commands when uploading instead of the "normal" commands.
For instance for the Teensy I have the following in the platform.txt:

tools.teensy_reboot.upload.params.verbose=
tools.teensy_reboot.upload.params.quiet=
tools.teensy_reboot.cmd.path={tools.teensy_reboot.config.path}/
tools.teensy_reboot.name=Teensy upload
tools.teensy_reboot.step1.pattern={tools.teensy_reboot.cmd.path}teensy_post_compile -path={build.path} -file={build.project_name} -tools={tools.teensy_reboot.config.path} -board={name}
tools.teensy_reboot.step1.name=Teensy post compile
tools.teensy_reboot.step2.pattern={tools.teensy_reboot.cmd.path}teensy_reboot -v
tools.teensy_reboot.step2.name=Teensy reboot

Because of practical issues all the {xx} are translated to ${A.XX} in the environment variables.

The drawback of doing this in the platform.txt is that it will do the change for all the boards. You can also do the change in boards.txt. The plugin processes the platform.txt and then boards.txt. Therefore you can overwrite all platform.txt settings with board specific ones in boards.txt (I don't know whether the Arduino IDE works in the same way)
As you say it is for a mega2560 the above commands would become

mega2560.tools.teensy_reboot.upload.params.verbose=
mega2560.tools.teensy_reboot.upload.params.quiet=
mega2560.tools.teensy_reboot.cmd.path={tools.teensy_reboot.config.path}/
mega2560.tools.teensy_reboot.name=Teensy upload
mega2560.tools.teensy_reboot.step1.pattern={tools.teensy_reboot.cmd.path}teensy_post_compile -path={build.path} -file={build.project_name} -tools={tools.teensy_reboot.config.path} -board={name}
mega2560.tools.teensy_reboot.step1.name=Teensy post compile
mega2560.tools.teensy_reboot.step2.pattern={tools.teensy_reboot.cmd.path}teensy_reboot -v
mega2560.tools.teensy_reboot.step2.name=Teensy reboot

Personally I would copy the whole mega2560 and change the id to EtherMega. This way you can modify all the settings and have the upload as you want it.

If you made a change to the boards.txt or platform.txt select apply in the project/arduino properties to have the plugin use the new settings.

If it takes you longer than half an hour to get it going you are probably not taking the easiest route :smiley:

Best regards
Jantje

I've written some installation instructions for the newest version 2.2 and the new Arduino Eclipse IDE :

Particularly useful if you work on a mac and also want to program Teensy 3x boards! I've also installed the new Arduino Eclipse IDE on Windows 7 and Ubuntu Linux, and find that the instructions should work for these as well.

Headroom:
I've written some installation instructions for the newest version 2.2 and the new Arduino Eclipse IDE :

Arduino Eclipse IDE and Plugin V2.2 installation | Trippy Lighting

Particularly useful if you work on a mac and also want to program Teensy 3x boards! I've also installed the new Arduino Eclipse IDE on Windows 7 and Ubuntu Linux, and find that the instructions should work for these as well.

Thanks :slight_smile:
I'll make a link from my website
Best regards
Jantje

I've updated the teensy3.0 and teensy 3.1 sections of the boards.txt for Tennsy from Teensyduino 1.18rc2 (installed using Headroom's instructions above)

This should work teensy 3.1 now (and added in partial Turkish support) as long as you add teensduino libraries as in Headroom's instructions above.

Please look over and point out any obvious errors. I haven't touched the teensy1,1++2,2++ sections as I don't have those boards to test with, but it does work with teensy 3 & teensy 3.1

boards.txt (28.7 KB)

kate
Great :slight_smile:

@all
Maybe it is a good idea to add a Teensy dedicated part to my website and put the files there. The website is uploaded from github That means anyone can create a pull request.
Tell me what you think.

Best regards
Jantje

V2.2 has been released officialy now.
There is plenty of new stuff.
For the non eclipse guru's amongst us: please read the install advice Sloeber- Pre Requisites
Best regards
Jantje

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.