Arduino Forum

Development => Other Software Development => Topic started by: Trump211 on Aug 26, 2011, 07:15 pm

Title: Arduino Eclipse Plugin <Update>
Post by: Trump211 on Aug 26, 2011, 07:15 pm
I really like the eclipse IDE's abilities as a program editor,  It has many features features that the Arduino IDE does not (function browser,  navigator, etc).  However it is missing one very important feature!!  It cant build straight arduino projects without complicated makefiles, and the AVR Plugin which further requires one to make a full install of AVR GCC. 

So, I decided to make a plugin for eclipse that would add this ability.
The source to the plugin as well as a more in depth readme can be found at https://github.com/Trump211/ArduinoEclipsePlugin

I have tested this with the bare minimum code, as well as the sketches that use various arduino libraries. All that I have tested compile completely and to the same size as the arduino ide compiles them to.  It even works with complex sketches like Multi_Wii (http://code.google.com/p/multiwii/source/browse/#svn%2Ftags).

Is anyone interested in something like this, or does anyone have any suggestions?

Abilities:
Create new projects that are 100% compatible with the Arduino environment,
Build the projects to a bin directory within the project folder (none of that temporary folder crap).
Only rebuilds the core.a file if it is not already present (still have option to clean)
Users can also set extra settings like the optimization level for the compiler.
Predefined boards are read from arduino's boards.txt file
Update: Compile and project settings are now saved between sessions
Update: Settings on new project default to settings used on last project (don't have to re find everything)
Update2: Code highlighting for arduino keywords, comments, and preprocessors.
Update2 Upload to arduino (using bootloader only)(windows 64 bit only)

Future Abilities:
-Code completion in pde files
-Highlighting of library keywords

Bugs:
-For now the only way to edit settings after the project is created, or to upload the correct project is to only have one arduino project in the workspace.  Eventually i will allow the user to choose which project in a pop-up, but for now it is just the first project listed that has the arduinoProject nature.





Title: Re: Arduino Eclipse Plugin <Update>
Post by: RobertBerger on Oct 16, 2011, 06:57 pm
Hi,


Update2 Upload to arduino (using bootloader only)(windows 64 bit only)


Why shouldn't this work on Linux as well?

Regards,

Robert

Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Oct 20, 2011, 04:26 pm
Hi Trump211
I have been doing the same thing for a while; based on the AVR plugin. I have the same arguments like you to prefer eclipse to the IDE for experienced developers or big projects.
I'm not bothered by having to install the avr dude (it is installed as part of the arduino IDE as well, you know)
I'm more concerned with setting the compile and upload options correctly to create a environment that is ready to play as quick as possible.
My current environment allows me to have multiple projects in the same eclipse environment. I do this by having the core Arduino source code as a separate project. I'm not experienced in writing eclipse plugins so I'm seriously fighting that more than Arduino.


My main technical problems right now are:
How can I create a page to request the arduino path (so I can link in the arduino source code)
How can I copy/link the arduino code
What are the exact AVR setting: As far as I understand I need the upload baut rate and the pic clock speed and pic type. for the Arduino duemilanova with ATMEGA328 that is 57600; 1000000; ATMEGA328P. But what is it for the others?

Questions I have as well are:
Is the IDE always using the same compile options? (It took me a long time to find the correct options and get them correctly set in Eclipse)
Why is the IDE using the define ARDUINO=22 (I find no references to this define in the code) Will this define change in the future?

I'll have a good look at your source code. Maybe it is a good idea to join forces on this one. Anyone else wants to join in?

Jantje

PS
You should be carefull with your class path.

PSS
Following are the IDE supported platforms for which I need bautrates; cpu types and cpu speeds
Arduino duemilanova with ATMEGA328
Arduino nano with ATMEGA328
Arduino Mega 2560
Arduino Mega ATMEGA1280
Arduino Uno
Arduino LilyPad with ATMEGA328
Arduino Fio
Arduino Pro with ATMEGA328
Arduino BT with ATMEGA328
Arduino Mini
Arduino Pro Mini with ATMEGA328

Title: Re: Arduino Eclipse Plugin <Update>
Post by: kiwidude on Oct 29, 2011, 12:20 pm
The Arduino IDE is superbly good for getting going fast when starting at nothing. After a while it becomes a drag and you start looking for something better. My enthusiasm for eclipse has been dampened somewhat by the bugs in AVR/CDT plugins and the exorbitant time needed to get anything working. Instructions are notably absent. A professional system has debugging capabilities too - something Arduino doesn't even bother with. I worked out it must be possible, but it's a loooong way. Not good. Pretty bloody *&*&!*@($#@ actually.

As for the plugin suggested here my comments are:

1) A default or optional and -easy-to-load configuration compatible with the Arduino IDE would be very useful. It helps transition and allows to move existing projects forward.

2) Modify and improve the existing AVR plugin instead. It's not well supported currently (at least it still works - the ARM plugin is just 100% bitrot, doesn't even produce any output and screws up the whole eclipse). It's also a long way there already.

3) I have absolutely no time for crap that only works on Mickeysoft. I find it hard to believe someone could be stupid enough to castrate eclipse that way.

4) So you program a new plugin just because installing the Arduino IDE is asking too much? Hello? The IDE itself is not much of the total, you still need the compiler suite, the Arduino core software and the Arduino libraries. Installing the IDE is extremely trivial - download, unpack in convenient directory, add bin directory to $PATH. Dito eclipse. Couldn't be easier. For comparison, the PIC32 people did a nice job with adding the PIC32 stuff and keeping the AVR stuff going - except they stuffed it up and it doesn't work, but at least they tried. Probably an easy fix. The two should be merged permanently, except that Microchip has obnoxious licenses in their libc of gcc. The ARM maple Arduino IDE is just somewhere between braindead and incompetent (as well as years out of date).
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Trump211 on Oct 30, 2011, 05:41 pm
Sorry Guys, I thought I'd get an email or something if anyone posted on this thread...

Anyways:
@RobertBerger and kiwidude
--The reason I said uploading was for Windows 64 bit only was because at the time I hadn't added the native libraries for RXTX.  I believe that It should work now for most OS's, unless there is a different file structure for the Arduino install.  I don't have access to any computers other than my PC to test this on

@Jantje:
- To create a page requesting for the arduino path take a look at ArduinoSettingsPageLayout.java... the draw function adds a field for this in the Environment options part of the code
- For the AVR settings go to your arduino install folder and navigate to arduino-0022\hardware\arduino  all the settings are listed in boards.txt
- I'm not quite sure what you mean by copy and link the arduino code, but if you mean how do you compile the users code with the arduino libraries, you must send the correct commands to the avr-gcc compiler and linker to see code that does this look at Compiler.java note that this expects the the .pde files to have already been preprocessed into a large cpp file locoted in the build folder.  Arduino does this behind the scenes in the temp build folder
-The arduino IDE does use the same compile options every time.  The only commands that change are the f_cpu=<cpu frequency> and the MCU=<mcu type> these are both selected depending on what board you have selected in settings.   (again you can look at this in the compile.java
-The official arduino ide uses the Arduino=22, I assume so that its possible to find what version of Arduino the program was built with, other than that I honestly have no Idea.  In the eclipse plugin I completly removed that command and everything still compiles and works corrctly (same size and everything)
     - In the plugin I also added the ability to choose the optimization option

-I think joining forces would be a good idea on this

@ kiwidude
1) this has already been implemented, The user is able to choose any board the arduino environment recognizes, and the rest is filled out automatically.  Or the user can choose a custom board and specify each option (MCU, frequency, etc)

2)I started out doing this, but in the end I decided against it mainly because I don't really understand how makefiles work nor how to write them etc.  I thought it would be easier just to look at the arduino IDE source and modify it to work with eclipse IDE.

3)See above, I belive it will work for other OS's now, but I don't have any way to test this.

4)No, I made a new plugin because I think the arduino IDE is very limited and I would like to develop something that is more customizable for advanced users, and easy to use for the beginers.  For this plugin to even work, the arduino Ide must be installed, because it uses the arduino's avr-gcc as well as the core sources, and the boards.txt.

Sorry it took so long to respond again.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: kiwidude on Oct 31, 2011, 12:24 pm
Trump211,

Thanks. The rxtx is only used for two things really by the Arduino IDE as far as I am aware: reset the target before upload, and the terminal window. The upload is handled by avrdude, eclipse will need to do the same. Use the correct option with avrdude and it'll do the reset, and don't bother with the terminal in eclipse, at least for starters.

Makefiles are not optional if you want to be professional. I understand they're generated by the eclipse CDT plugin, you only have to set a few variables there that specify the compiler, linker, paths etc., but I may be wrong. In any case the AVR and CDT plugins create them, you'd just need to copy that.

Your reason for creating another AVR plugin makes no sense.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Nov 02, 2011, 09:23 pm
Hi Trump
Thanks for the input. I had already figured most of that out given your source code. (I also wasn't aware you are not updated on new messages on this forum :smiley-fat:
I tried your plugin but it didn't work for me. I found that the natures were not set. I'm not sure what is wrong here.
I have successfully created a plugin that is working on my "development machine". I'm working on a update site right now to be able to test on other locations.
I used some of your code  :D
With the copy or link I'm referring to eclipse being able to copy code into the workspace or to link to the code somewhere on your system. I have by now concluded that having a project with the Arduino code (on for each used MCU) linking to the code in the IDE install is the best way to do it.
I do not agree that the IDE uses the same options all the time. The C code has other options than the C++.   I think it wouldn't hurt to use  -fno-exceptions in C compile but it is a difference. Also the Arduino code is compiled as a library and then linked in. You have to do it this way ore the size of your sketch will be to big (no optimization of global variables)
As to installing WinAVR: As I mentioned before the IDE already contains WinAVR. I have just modified the Arduino playground eclipse page to explain how you can use the WinAVR included in the IDE. That is another step towards using avr-eclipse  :smiley-roll-sweat:
As to joining forces: I still think this is the best way forward. I'm however unsure on how to do it given the different architectural approach.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Nov 05, 2011, 11:08 pm
All
I released my first version of the Arduino eclipse plugin. You can install it on the install site http://www.baeyens.it/eclipse/update site/ (http://www.baeyens.it/eclipse/update site/)
It currently supports following actions:
Creation of an Arduino sketch
Change the Arduino board
Change the com port

You can use this plugin without installing avr-eclipse and win avr. Basically avr-eclipse is in the plugin and I use win avr installed with the IDE.
To get it to work:
Install the arduino IDE
Install eclipse (indigo or any other with the C/C++ feature)
install the plugin from my update site (Help ->install new software)
Configure the plugin (windows -> preferences)
first fill in arduino->paths with references to the IDE folders
(http://iloapp.baeyens.it/data/_gallery//public/1/1320528725_resized.png)
The tell avrdude to take the ide config
(http://iloapp.baeyens.it/data/_gallery//public/1/1320528723_resized.png)
Following setting are not needed but advised:
Set the auto save before build on to avoid different version between uploaded and visible code.
(http://iloapp.baeyens.it/data/_gallery//public/1/1320528726_resized.png)
Disable the heuristic something for includes (sometimes this setting makes the gui not to find defines)
(http://iloapp.baeyens.it/data/_gallery//public/1/1320528724_resized.png?width=640&height=541)

Now you can create a new Arduino project with the plugin
Do file -> new -> project
Select the Arduino sketch and then next
(http://iloapp.baeyens.it/data/_gallery//public/1/1320529642_resized.png)

Provide a name for the sketch and press next (note that in the image below the finish is enabled because I already created a sketch)
(http://iloapp.baeyens.it/data/_gallery//public/1/1320529645_resized.png)

Provide the arduino information and select finish (note that all this information will be stored so you will not need to reenter when you create a new sketch)
(http://iloapp.baeyens.it/data/_gallery//public/1/1320529644_resized.png)

Now the plugin will create 2 projects. one for the arduino library and one for the sketch. The image below holds more projects but the new ones are highlighted.
(http://iloapp.baeyens.it/data/_gallery//public/1/1320529641_resized.png?width=720&height=540)
In the image above I opened the my sketch.cpp file.
Pressing the hammer (marked in the image above) will compile the project.
Pressing the AVR button (marked above) will upload the project to your arduino board.

To change the board or com port right click on the project and select properties
you get the same dialog box where you can change the board and  com port.
(http://iloapp.baeyens.it/data/_gallery//public/1/1320530328_resized.png)
After you pressed finish you get a new arduino core project for the mcu if needed.
(http://iloapp.baeyens.it/data/_gallery//public/1/1320530326_resized.png?width=720&height=540)

As this is the first release it has only been quickly tested on windows xp and windows 7. I noticed that sometimes some eclipse restarts are needed before it works all fine.
Please feel free to download, test and comment.

Best regards
Jantje

PS
Things to come
Insert Library
Select com port via combo in gui



Title: Re: Arduino Eclipse Plugin <Update>
Post by: Trump211 on Nov 06, 2011, 09:03 pm
Hey Jantje,
Loooked really Quick at your plugin.  It looks really good so far.  I have a couple questions/suggestions. 

-Where in the filesystem is the output? (.hex, .epp etc)
-What is your reasoning for importing the core arduino files into a new project for each board type used. 
      You can give the compiler the paths of the core files so that it can make the correct output files. That way each project will have its own core.a
      Nevermind, I'm assuming your doing this because the thought is people will have multiple proojects for the same board type, and because they all use the same core.a, they can just share the one?
-I assume that the project is no longer compatible with the arduino IDE?  (wrong file extension etc)  If not, how can you import into the arduino ide.

Suggestions:
- I think that Having a custom board option would be neat.  aka running a mega at a different frequency etc.
- Once you have the arduino install location from the new project wizard, the plugin should be able to set the AVRDude paths and other settings correctly.

Will you be releasing the source? If so do have a repository with the source anywhere? I'd really like to see how you implemented some of these things.

Awesome work Again
-Trump211




Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Nov 07, 2011, 02:52 pm
Trump
Thanks

-Where in the filesystem is the output? (.hex, .epp etc)
The output files are located in a subfolder of the project wit the configuration name. It however only appears after the compile has been executed. This is the standard C/C++ eclipse indigo behavior.

-What is your reasoning for importing the core Arduino files into a new project for each board type used. 
There is a long history on the core with the MCU extension. I'm happy you asked it.
I started with a library called arduino_core. That worked fine until I had 2 boards with a different MCU.
So I changed the approach to adding the Arduino code to the source code. I already shouted I'm done to notice that the sketch size was far bigger than the Arduino IDE. This is cause by the fact that the linker can not remove unused global variables when directly linked in.
So I went to arduino_<MCU_name> this worked great because avr_eclipse changes the environment variable MCU_name and you can use environment variables to reference folders. So I only had to create the arduino core project and the references are immediately change.
Later on I realized that it is possible to use the configuration to only have one arduino_core for all configurations (avr_eclipse allows multiple configurations)
When I looked at how to do it I failed to do this with environment variables and the change implied some code tat I didn't feel like doing so I consider the current solution good enough. But this is on the list of improvements.
Note that a similar problem exists with the programmer. I have only one board type so i couldn't test this but I think that if you have 2 board with a different upload frequency there will be a little bug.

-I assume that the project is no longer compatible with the Arduino IDE?  (wrong file extension etc)  If not, how can you import into the arduino ide.
You know I asked you to work together. This is one of the things I was thinking of :-)
Basically the IDE can handle pde files. a pde file is a standard c/c++ file but the ide makes that you can relax the C C++ language constraints.
For instance you do not have to declare functions before you can use them. If we add in the toolchain a pde to C++ tool before the C++ compiler we can have Arduino IDE compatibility.

- I think that Having a custom board option would be neat.  aka running a mega at a different frequency etc.
Basically I only put a layer on avr-eclipse and the C/C++ cdt. The create "new Arduino sketch wizard" just sets all the options correctly. The property page allows to change some properties and only changes those. In the Arduino property page you see the all the properties (how they are set when you open it, and how they will be set after you changed the board type) except for the programmer that is used (look at project properties-> arduino->avrdude->programmer tab  to understand what I mean; click edit for better understanding.
I'm not sure what it would be good for but avr eclipse supports this. I consider this advanced usage and I would advice advanced users who want to do this to use the avr-eclipse functionality directly or by using the Arduino-eclipse plugin.

- Once you have the Arduino install location from the new project wizard, the plugin should be able to set the AVRDude paths and other settings correctly.
I fully agree. This should be a preference page with a option like "use Arduino IDE for avrDude and GNU compiler"

-Will you be releasing the source?
I worked on that yesterday all day. Never worked with Git nor github but I succeeded in uploading. Please feel free to join in. I know you have the code to make a combo box to select the com port on windows. Not sure what the consequences are from adding this code for linux users and that is why I didn't use it. The code is at : https://github.com/jantje/arduino-eclipse-plugin
I'm currently working on a library import function. This should import the code in the main folder and add a include and source reference.

Best regards
Jan
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Trump211 on Nov 08, 2011, 02:08 am
Thanks Jan,
I cloned a copy of the repository to my local drive to take a look around.  I've been trying to find functions in the AVR-Eclipse plugin source to be able to set the path variables.  However, all I can find are functions to set the paths to the defaults (given in the registry if avr tool-chain is installed separately) 

-Also, when I try to build any projects that I make with the plugin I get an error
Code: [Select]

**** Build of configuration Release for project arduino_atmega328p ****
make all
Error: Cannot run program "make" (in directory "<Workspace>\arduino_atmega328p\Release"): CreateProcess error=2, The system cannot find the file specified
**** Build Finished ****

It seems like it either can't find the GNUMake, or it can't find the makefile.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Nov 08, 2011, 09:40 am
Trump
I have not seen this error before.
From how I understand the error message eclipse is looking for make in your release folder.
Have you checked the GNU path settings? in window-> preferences?
(http://iloapp.baeyens.it/data/_gallery//public/1/1320528725_resized.png)
Have you restarted eclipse?

Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Trump211 on Nov 08, 2011, 06:42 pm
Jan,
I've checked the path settings and all are correct.  I also tried adding the paths to my system PATH setting to see if that would do anything, but i get the same results.  If i try to build the plugin myself,  get a few warnings for the managed builder that "an API baseline has not been set for the current workspace".

EDIT:
If I manually run the command make in the release directory I get the following output
Code: [Select]

C:\Users\Dan\Workspaces\CPPEclipse\ArduinoAvr\MyProject\Release>c:\users\dan\applications\arduino-00
22\hardware\tools\avr\utils\bin\make
'Building file: ../MyProject.cpp'
'Invoking: AVR C++ Compiler'
avr-g++ -I"C:\Users\Dan\Applications\arduino-0022\hardware\arduino\cores\arduino" -I"C:\Users\Dan\Workspaces\CPPEclipse\ArduinoAvr\MyProject" -D__IN_ECLIPSE__=1 -DARDUINO=22 -Wall -Os -ffunction-sections -fdata-sections -fno-exceptions -g -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"MyProject.d" -MT"MyProject.d" -c -o "MyProject.o" "../MyProject.cpp"
'avr-g++' is not recognized as an internal or external command,operable program or batch file.
make: *** [MyProject.o] Error 1


which makes me think that it is an error in the makefile.  as if it is calling avr-g++ rather than <pathToAvrG++>/avr-g++

EDIT2:
This exactly the case.  I went in and manually edited the Makefile to so that "avr-g++" now reads "<arduino dir>\hardware\tools\avr\utils\bin\avr-g++" and it now gets past that part.  However, when it gets to the next step (calling the linker) it has a problem finding the core project.
It seems like the makefile is being incorrectly (the tools are called, but the path to the tools are never given).  I have the paths set within the plugin, so the only thing i can think of as to why it builds on your system and not on mine is that you have your system PATH set up so that it either points to the arduino tools, or a separate install of the tool-chain (and when you build it isn't using the arduino provided tools, but the separately installed tool-chains)?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Nov 08, 2011, 09:49 pm
Trump
I'm sure I use the Arduino IDE makefile. As far as I know I have no other makefiles or toolchain stuff on my systems (2 to be precise). I just tested it this way: Renamed "makefile.exe" to "weg makefile.exe" and ran the clean command
The result is:
Quote
**** Clean-only build of configuration Release for project blink2 ****

make clean

Cannot run program "make": Launching failed
Error: Program "make" is not found in PATH

PATH=[C:\arduino-0022\arduino-0022\hardware\tools\avr\bin;C:\arduino-0022\arduino-0022\hardware\tools\avr\utils\bin; ..<my PATH environment variable content is here>...]

**** Build Finished ****

It is another error than you get.
You see that the path has been extended by the tool to contain the folders provided with the settings.
You can try the same rename trick to find out which makefile is being used and how it is called.
Have you both avreclipse and Arduino eclipse installed? I ask because this setup is not supported/tested. avreclipse is included in the arduino eclipse but in a modified version using different names/locations/.... It is very likely there will be conflicts
Can you also open the error view and look for clues what is going wrong? (windows-> show view->other ->general->error log)
If all of this doesn't work would you be so kind to install the latest version of eclipse indigo + the Arduino eclipse to test whether you have the same problems?

About compiling the plugin warning "an API baseline has not been set for the current workspace"
Note that the managed builder is avr eclipse code. The warning itself is not a great deal (it is checking of the eclipse baseline) This article explains on how to get rid of it https://teambruegge.in.tum.de/groups/unicase/wiki/5b324/Remove_API_baseline_warning.html (https://teambruegge.in.tum.de/groups/unicase/wiki/5b324/Remove_API_baseline_warning.html)

Best regards
Jantje

Title: Re: Arduino Eclipse Plugin <Update>
Post by: Trump211 on Nov 08, 2011, 10:20 pm
Installing a new copy of eclipse and then a new copy of the plugin seems to have fixed it.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Nov 08, 2011, 11:51 pm
Great  :)
I nearly finished the import library wizard
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Trump211 on Nov 11, 2011, 04:58 am
Did you update the update site? My IDE doesn't find updates for it.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Nov 11, 2011, 10:15 pm
Trump
No I have not made an update yet. I hoped that doing the easier configuration as you requested could be done easily. However I have been spending many hours debugging this and have not yet succeeded in making it work.
I hope to finish it somewhere this weekend so I can start working on Arduino code  8)
Best regards
Jan
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Nov 14, 2011, 12:25 am
Hi Trump
It took me blood sweat and tears but I succeeded in finishing the plugin.
Notice i s*** the update site somewhere this weekend but now version 1.0.6 is available and tested with a clean eclipse install. Note you will have to uninstall the current version and install the new version.
I had to replace my eclipse install on a test machine. It took me to long to get here to bother why.
New features are
Import of a library. File->import->arduino->import Arduino library.
This will make a link to the folder selected. I'm not sure whether it works fine with Arduino libraries because I have not been able to use it yet. I'm a bit scared about the subfolders. Note the import links to a folder. Changing files means changing you arduino setup.
Second change is in windows settings -> arduino->arduino
In this page you can select your arduino folder and then select use Arduino IDE tools. This will set the paths and so on.

Best regards
Jan
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Klaro00 on Nov 22, 2011, 02:45 pm
Hi all,

it might be helpful to know that on my system (Win7, Eclipse 3.7.1 Indigo, Arduion Plugin 1.0.8), running the AVR C++ compiler from Eclipse crashes with a message like "Interrupt/Exception caught" in the Eclipse console window.

I found out this reason: The Arduino IDE installation path must not contain blanks. My Arduino IDE was loacated in "C:\Programme (local)\Arduino", after moving it to "C:\Arduino" and changing the paths in Eclipse, the AVR C++ compiler didn't crash anymore. Well, the Arduino IDE itself runs fine on that path which contains blanks (there might be missing some quotation signs somewhere in the Eclipse plugin?).

Another issue (with version 1.0.8 of the plugin): I could not change the paths in "Path" configuration in the Preferences window. Well, I could change them, but they were not stored... I found out that the paths were saved when I also changed the checkbox "Disable search for system paths at startup".

// Klaus
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Klaro00 on Nov 22, 2011, 02:52 pm
Jantje,

I could not get my first example running, even though I followed exactly your guide further up in the thread. Well, my example compiled without problems, but "main.cpp" from my project "arduino_atmega328p" did not.

The compiler complains about not finding "WProgram.h", which is the first include file in "main.cpp". I can see "WProgram.h" right next to "main.cpp". It seems as if the compiler does not know where to look for include files?

This is the output of the Eclipse console window "CDT Global Build Console":

Code: [Select]
**** Build of configuration Release for project arduino_atmega328p ****

make all
Building file: C:/Arduino/hardware/arduino/cores/arduino/main.cpp
Invoking: AVR C++ Compiler
avr-g++ -Wall -Os -fno-exceptions -g  -ffunction-sections  -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"arduino/main.d" -MT"arduino/main.d" -c -o "arduino/main.o" "C:/Arduino/hardware/arduino/cores/arduino/main.cpp"
C:/Arduino/hardware/arduino/cores/arduino/main.cpp:1:22: warning: WProgram.h: No such file or directory
C:/Arduino/hardware/arduino/cores/arduino/main.cpp: In function 'int main()':
C:/Arduino/hardware/arduino/cores/arduino/main.cpp:5: error: 'init' was not declared in this scope
C:/Arduino/hardware/arduino/cores/arduino/main.cpp:7: error: 'setup' was not declared in this scope
C:/Arduino/hardware/arduino/cores/arduino/main.cpp:10: error: 'loop' was not declared in this scope
make: *** [arduino/main.o] Error 1

**** Build Finished ****


Do you have any suggestion?

// Klaus
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Nov 22, 2011, 03:11 pm
Hi Claus
You are indeed missing the include directive (-I"C:\arduino-0022\arduino-0022\hardware\arduino\cores\arduino" ). Do yo have the latest version of the plugin?
See my post http://arduino.cc/forum/index.php/topic,79595.0.html (http://arduino.cc/forum/index.php/topic,79595.0.html)
Note that to upgrade you need to deinstall and install.
To work around the problem do as follows
1) Change the board to a non atmega328p board
2) delete the projects arduino_atmega168 and arduino_atmega328p making sure the flag "delete project content on disk" is on
3)  Change the board to your Arduino board atmega328p board
This should fix it.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Klaro00 on Nov 22, 2011, 06:29 pm
Jantje
thanks for your help. I already had the current plugin version, tried your hints anyway, and now it works. *smile*

// Klaus
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Spindoctor on Dec 16, 2011, 09:01 pm
Hi Jantje!

I'd love to use your plugin, as I'm used to program in Eclipse. However, I do not succeed.

I have Eclipse Indigo and Arduino IDE 1.0 installed.
I am running it on a Debian Wheezy Machine.

Here is what I get when I try to compile an empty Arduino-Sketch:

http://imageshack.us/photo/my-images/35/ardprob.png/

I also add pictures of my settings:

http://imageshack.us/photo/my-images/607/arduinoide.png/
http://imageshack.us/photo/my-images/35/dudez.png/
http://imageshack.us/photo/my-images/685/patha.png/

Thank you in advance

Here is the console output:
Code: [Select]


**** Build of configuration Release for project testArdu ****

make all
Building file: ../testArdu.cpp
Invoking: AVR C++ Compiler
avr-g++ -I"/usr/share/arduino/hardware/arduino/cores/arduino" -I"/home/marcel/workspace/testArdu" -I"/usr/share/arduino/hardware/arduino/variants/standard" -D__IN_ECLIPSE__=1 -DARDUINO=22 -Wall -Os -ffunction-sections -fdata-sections -fno-exceptions -g -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"testArdu.d" -MT"testArdu.d" -c -o "testArdu.o" -x c++ "../testArdu.cpp"
Finished building: ../testArdu.cpp

Building target: testArdu.elf
Invoking: AVR C++ Linker
avr-gcc -Os -Wl,--gc-sections  -L"/home/marcel/workspace/Arduino_Uno/Release" -mmcu=atmega328p -o"testArdu.elf"  ./testArdu.o   -l"Arduino_Uno" -lm
/usr/lib/gcc/avr/4.5.3/../../../avr/bin/ld: cannot find -lArduino_Uno
collect2: ld returned 1 exit status
make: *** [testArdu.elf] Fehler 1

**** Build Finished ****
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Dec 17, 2011, 12:31 am
Hi spindoctor
From the images you provided I can cleary see the compile of the arduino_uno project failed. The first 4 meaages are a consequence of that. So the only problem to solve are  the 2 German error messages about subdir.mk. I don't know subdir.mk. I have never seen German error messages.
Do you have a clean Arduino 1.0 install? Where does this subdir.mk come from?
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Spindoctor on Dec 17, 2011, 01:42 am
Hi Jantje!

Thank you for your quick answer!

Here is an image that maybe gives some more information on subdir.mk
http://imageshack.us/photo/my-images/521/subdirmk.png/

In english the two error messages say:
Quote
warning: ignoring old commands for target »arduino/main.o«

and
Quote
warning: overriding old commands for target »arduino/main.o«


Here is the source of subdir.mk
http://pastebin.com/9sKS4bQU

And this is my Arduino IDE 1.0:
http://packages.debian.org/sid/arduino

Thank you for your help!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Dec 17, 2011, 09:21 pm
Hi spindoctor
I don't know why debian has a special version of the arduino ide. I don't feel like investigating what this is all about.
The plugin works with the arduino IDE delivered by arduino. Those do not contain any makefiles. You have a problem with the makefiles delivered by debian.
In short the debian arduino IDE is not compatible with the eclipse plugin.
As debian is a linux flavour and I tested this on linux (open suse) you could give that a try.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Spindoctor on Dec 18, 2011, 06:45 pm
Hi Jantje!

You are right.
Just tried it with the Linux Arduino IDE provided here: http://arduino.cc/en/Main/Software

Seems to work (at least this time the problem above didn't arise, need to do further tests).

Maybe you would like to add this information to your howto...

I will however file a bug report to the debian package maintainer.

Thank you!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: maqifrnswa on Dec 18, 2011, 07:33 pm
Hi - I'm the Debian maintainer, we don't distribute subdir.mk [1]. I don't know what is going on with it. The only additional file we distribute, compared to pure upstream, is in /usr/share/arduino/Arduino.mk, which is a response to users requesting a CLI to arduino and comes from [2]. Would the existence of an additional makefile cause this problem? I doubt it, since it must be included from another makefile to even do anything - but if there is a script which is including all .mk, then it would get pulled in too. What do you think?

Also, we don't change any file that comes from upstream [3] with the exception of cherry-picking a bug fix which has been fixed already by the David Mellis. The only things we change is the default install location and to use system java libraries rather than the prepackaged ones (for security reasons).

[1] http://packages.debian.org/sid/all/arduino-core/filelist
[2] http://mjo.tc/atelier/2009/02/arduino-cli.html
[3] http://patch-tracker.debian.org/package/arduino/1:1.0+dfsg-1
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Spindoctor on Dec 18, 2011, 08:14 pm
Hi Scott!

Thank you for taking care of this! It is people like you who make debian so great  8)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Dec 18, 2011, 11:10 pm
Scott, spindoctor
I'm glad to hear it's working. That is another platform tested  :D
Just like Scott does I avoid adding stuff to existing Arduino folders and only reference files and folders.
From the top of my head: the eclispe plugin only references files ( AVRDude, GCC, revisiosn.txt and board.txt) and folders (the Arduino library folder and the variants subfolders).
One of the reasons why I have special Linux and Windows code is because these locations are different on these 2.

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: maqifrnswa on Dec 19, 2011, 12:04 am
Ok, I think I found the problems:

1) The Debian package installed old historical files (from arduino 0017) that existed before I got there. I cleaned them out.

2) Debian package is 1.0, and WProgram.h has been renamed to Arduino.h. So line 9 of the *.h needs to be updated in the Eclipse plug-in. Those are the new errors now that Makefile clobbering is fixed.

3) pins_arduino.h doesn't exist in the same place in 1.0 as it did in 0022, which you already brought up at http://arduino.cc/forum/index.php?topic=82200.0


In conclusion: I've fixed the Debian Arduino package so there are no more Makefile clobbering. However, version Arduino 1.0 seems to be incompatible with the Eclipse plug-in. Debian uses 1.0, so the Eclipse plugin won't work with the debian package for that reason.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Spindoctor on Dec 19, 2011, 12:52 am
Without being an expert for the Eclipse-plugin (neither I am for the Arduino IDE), I think the Eclipse plugin works well with Arduino IDE 1.0.

At least I downloaded the IDE from here: http://arduino.googlecode.com/files/arduino-1.0-linux64.tgz and stored it to a different folder. The Eclipse plugin seems to work well with this.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Dec 19, 2011, 02:14 am
Indeed the newest version is 1.0, 0022 and 0023  compatible.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: maqifrnswa on Dec 19, 2011, 03:14 am
Ok, got it totally working ubuntu and debian. I'm uploading to debian (and thus ubuntu now).

I just had to uninstall then reinstall the eclipse plug-in after I did the fix to the debian package. I'm compiling them together now. Thanks for your work on the plug-in!


[edit]: To tell users that want to use debian packages, all they have to do is install the arduino-core package and then point the eclipse plugin to the arduino directory /usr/share/arduino
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Spindoctor on Dec 19, 2011, 06:49 pm
awesome!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Spindoctor on Dec 21, 2011, 12:42 am
The plugin works good so far.

Just one question:

Is there some kind of "Serial port monitor" built in?

Thank you,

Spin
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Dec 21, 2011, 05:32 pm
Spindoctor
There is none. You can read this on http://eclipse.baeyens.it (http://eclipse.baeyens.it).
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: eaman on Dec 21, 2011, 07:39 pm

Ok, got it totally working ubuntu and debian. I'm uploading to debian (and thus ubuntu now).

Thanks a lot, can you please tell us the version of the package?
I'm using Package: arduino-core Version: 1:1.0+dfsg-2 (Debian Sid Amd-64) and I still have some problems:
- I had to make a simbolink link for WProgram.h -> Arduino.h
- Commented Arduino.h:212 : //#include "pins_arduino.h"

But compilation still fails with a
Code: [Select]
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.c:224:11: error: operator '>=' has no left operand
make: *** [build-cli/wiring.o] Error 1


BTW: I'm using an Arduino Uno R.2 board and this is my Makefile
Code: [Select]
ARDUINO_DIR = /usr/share/arduino

BOARD_TAG    = Arduino Uno
MCU          = atmega328p
ARDUINO_PORT = /dev/ttyACM0

AVRDUDE_ARD_PROGRAMMER = arduino
AVRDUDE_ARD_BAUDRATE   = 57600
#AVRDUDE_ARD_EXTRAOPTS  = -F

include /usr/share/arduino/Arduino.mk
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Spindoctor on Dec 21, 2011, 08:27 pm
@Jantje:
Oh! Sorry, I've overread that!

@eaman
I use exactly the same package on Debian Wheezy (in fact it is a mixed system, otherwise I couldn't use Debian Sid packages). For me it worked out of the box.

If you tried it before with an older package, you maybe need to delete the "Arduino Uno" project in Eclipse (be sure to delete it from the disc, not only discard it in Eclipse) and than recreate it (by creating a new Arduino project).
Title: Re: Arduino Eclipse Plugin <Update>
Post by: eaman on Dec 22, 2011, 06:07 pm

@eaman
I use exactly the same package on Debian Wheezy (in fact it is a mixed system, otherwise I couldn't use Debian Sid packages). For me it worked out of the box.

Actually I'm just trying to compile by command line, I've got Eclipse on an other workstation of mine and I could give it a try there.

Still, I'd like to use plain vim for Arduino development, but I won't hijack this thread about Eclipse.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Dec 23, 2011, 01:25 pm
eaman
Sorry but I had missed your post on the wiring.c.
I've checked the code and it seems that F_CPU has not been defined. This define is given with the compile command you can see that in the eclipse console.
Code: [Select]
avr-g++ -I"C:\arduino-1.0\hardware\arduino\cores\arduino" -I"C:\Users\IBM_ADMIN\Documents\data\Arduino1\MaaiRobot" -I"C:\arduino-1.0\hardware\arduino\variants\standard" -I"C:\Users\IBM_ADMIN\Documents\Arduino\libraries\JanHelpers" -I"C:\Users\IBM_ADMIN\Documents\Arduino\libraries\MegaMotoDriver" -DARDUINO=100 -Wall -Os -ffunction-sections -fdata-sections -fno-exceptions -g -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"MegaMotoDriver/MegaMotoDriver.d" -MT"MegaMotoDriver/MegaMotoDriver.d" -c -o "MegaMotoDriver/MegaMotoDriver.o" -x c++ "C:/Users/IBM_ADMIN/Documents/Arduino/libraries/MegaMotoDriver/MegaMotoDriver.cpp"
The example above shows the atmega328p which has a clock speed of 16000000 (-DF_CPU=16000000UL).
If this is not properly set it is probably because the board is not properly set in the project properties->arduino->arduino.
If it looks ok change it to another board; delete the existing Arduino library project (inclusive the content on disk) and then change back to your correct board.
You can delete the Arduino project again.
I hope this helps
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: drapal on Dec 27, 2011, 11:34 pm
I finally got this configured on Mac OSX (Snow Leopard).  I was able to create a new sketch and compile it, however there were numerous "Unsupported operating systems" pop-ups during each activity (more than 5).  The build seemed to work fine - don't have any hardware here so I couldn't test to make sure.

Using the latest version (1.1.3?) from your update site.  Any ideas?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Dec 28, 2011, 01:54 pm
Drapal
I do not have a osx os at my disposal. As long as nobody tells me that it works like it should I consider it unsupported. There are 2 things I can do now
1) Change the error to a warning. This will make the dialog boxes go away and only a logging in the error window will appear
2) Support OSX. This will make the errors and warning go away. Before I do this I need to know whether it works out of the box. More precisely I need to know whether you needed to modify the box shown below.
If so please show me your version of the dialog, this way I can have the plugin to set the correct settings
If not tell me then I'll remove the error and the warning.
Best regards
Jantje
(http://iloapp.baeyens.it/data/_gallery//public/1/1320528725_resized.png)

Title: Re: Arduino Eclipse Plugin <Update>
Post by: drapal on Dec 29, 2011, 05:42 pm
Here are the settings from the Preferences pages on the Mac.  You can't use the browse button to set these, since the Arduino application on the Mac is a package.  You can enter the paths by hand and they work fine - the build process generates exactly the same size code for the Blink application in Eclipse and the Arduino IDE.

Preferences->Arduino->Arduino:

Arduino IDE Path: /Applications/Arduino.app/Contents/Resources/Java

Preferences->Arduino->Paths:

AVR-GCC: /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin
GNU Make: /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin
AVR Header Files: /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include
AVRDude: /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin

Also, I may not understand how to use the Library Import feature of this plugin- I can't make it work on the Mac nor on Windows.  The Finish button doesn't seem to do anything (even though it's enabled).  I tried what is in your FAQ/Instructions on how to use the plugin and it won't import on either platform (again, version 1.1.3).
Title: Re: Arduino Eclipse Plugin <Update>
Post by: eaman on Dec 29, 2011, 06:48 pm

eaman
Sorry but I had missed your post on the wiring.c.
I've checked the code and it seems that F_CPU has not been defined. This define is given with the compile command you can see that in the eclipse console.

Thanks for the note, I've added the F_CPU flag in my Makefile and I've made a step forward, but my compile still doesn't work. As it is an issue probably related to my OS (Debian Sid) and command line environment (not Eclipse) I started a new thread:
-  http://arduino.cc/forum/index.php/topic,84916.0.html

Thanks again for your advice.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Dec 30, 2011, 01:01 am
drapal
Thanks for your input. I made a new version 1.1.5 which I prereleased (I can't test it myself so I don't want to take the risk to release it)
You can get the prerelease version in eclipse with the standard update feature when you add following location to the update sites "http://www.baeyens.it/eclipse/prerelease"
I tested the library import. I have no problems on windows. I have updated the faq page with information on how to find out more about the problem http://www.baeyens.it/eclipse/Arduino%20eclipse%20plugin%20FAQ.htm#errorLog (http://www.baeyens.it/eclipse/Arduino%20eclipse%20plugin%20FAQ.htm#errorLog)
I hope this can help you out.
Can you let me know whether this new version works fine o mac os?
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: drapal on Dec 30, 2011, 04:33 pm
Jantje,

The 1.1.5 version works great for me on the Mac - thanks so much.

After posting yesterday, I figured out my issue with the library import function - I was making it much more complicated than it really was.  It's working fine for me.

Thanks for the great tool!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: aBoogieman on Jan 02, 2012, 05:58 pm
Hi Jantje,

Thank you for all your work on this great plugin! I installed the new version, configured (per your instructions on the first page of this thread), created a project, and it just worked. This is cool! 8)

It seems very complete to me, except that I don't know if there is a Serial Monitor window, or equivalent. I found the "Target Management" project. Is that the best option that you know of? (I'm sure I could just use Putty, or something, too. It would just be nice to have it within Eclipse.)

Oh, one quirk that I noticed. But I expect this is part of the AVR plugin. I can hit Ctrl-B to build the project, but then if I click the AVR icon to upload, sometimes it says, "No AVR project selected". That seems funny, because Ctrl-B knew which one was selected and it just built with the AVR toolchain. Right now, I'm not sure how to reproduce that, other than to say that it happens sometimes when I open a workspace and do the build/upload right away. Please let me know if you'd like more information and I'll document the steps required.

BTW, I plan to write a blog post about this, but first I want to make a little more progress on our current project. (Mjolnir - which is also open-source.) It will definitely be a favorable post!

Thanks again,
Leland...
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 05, 2012, 11:25 am
Drapal
Thanks for the feedback. I'm a bit busy now so I will not be able to release this soon. In the mean time I made some other changes so 1.1.5 will never become  real release. I'm still fighting this update site feature.

aBoogieman
I'm happy to hear you like the plugin.
I also noticed this strange "project not found" behavior. I happened to be looking at the code to find the project because I needed it to find the active project when doing an import. 1.1.6 will have the project to import to filled in automatically.
As to the serial monitor the home page eclipse.baeyens.it (http://eclipse.baeyens.it) states
Quote
There is no serial monitor in this project. Use the IDE one or any one of your choice
. I use the IDE because I also get the com port from there. I'll have a look at the "Target Management" project though.

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 08, 2012, 05:43 pm
Leland
I have been watching the differences in behavior of the build and the upload button.
When I can build but not upload I see the build builds all projects. In other words the build has no active project so he builds all projects. In this case the behavior seems correct because there is no single sketch to upload (the plugin can not upload all projects).
If you see incorrect behavior please try to reproduce and let me know how you would like it to work.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: avenue33 on Jan 09, 2012, 01:04 pm

The 1.1.5 version works great for me on the Mac - thanks so much.


The 1.1.5 worked fine for a plain sketch and a sketch with an external=user library.

However, when I tried to use the internal=supplied with Arduino library Wire.h, I had to import it manually digging into /Applications/Arduino.app/Contents/Resources/Java/libraries.

What is the parameter in charge of internal=supplied with Arduino libraries?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 09, 2012, 06:22 pm
Avenue33
I do not understand your remark.
First of all there is no code/configuration or whatever that makes a distinction between internal and external libraries.
The only thing is that when you import a library the default folder is pointing to the subfolder of the arduino IDE delivered libraries.
The import does actually very little. What it does is:

You have to add <library>.h to the code yourself. (as is indicated in <your project name>.h)
There is no validation or whatever on the code. You could even import an existing IDE folder containing a sketch this way (you have to delete the 2 created files in the project to avoid compile conflict)
I just tried the wire library and it works fine on my system. To be able to use the functionality you need to include wire.h as you can see below
Code: [Select]
// Only modify this file to include
// - function definitions (prototypes)
// - include files
// - extern variable definitions
// In the appropriate section

#ifndef test_H_
#define test_H_
#include "WProgram.h"
//add your includes for the project test here
#include "wire.h"

//end of add your includes here
#ifdef __cplusplus
extern "C" {
#endif
void loop();
void setup();
#ifdef __cplusplus
} // extern "C"
#endif

//add your function definitions for the project test here




//Do not add code below this line
#endif /* test_H_ */


Please be aware that eclipse is a complex environment and the eclipse plugin in contrast to the Arduino IDE assumes C C++ knowledge. There is a section in the faq that deals with this http://www.baeyens.it/eclipse/Arduino%20eclipse%20plugin%20FAQ.htm#benefitIDE (http://www.baeyens.it/eclipse/Arduino%20eclipse%20plugin%20FAQ.htm#benefitIDE)

If you think there is a genuine problem; please be more precise on what the problem is. What is your console output? If a dialog box appears; please add a screenshot. If you are not precise in the problem description I can not help you out.
Best regards
Jantje

Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 09, 2012, 07:28 pm
Avenue33
There is a problem related to the eclipse plugin and the wire library in Arduino. I created a post that explains the problem and proposes a fix here http://arduino.cc/forum/index.php/topic,86344.0.html (http://arduino.cc/forum/index.php/topic,86344.0.html)
You can apply the fix in your environment.

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: avenue33 on Jan 09, 2012, 08:17 pm
Jantje,

Thank you for your answers.


About Importing libraries -- Menu File > Import, Select Arduino > Import an Arduino library in the current project,

First time, the window rightly points to /Applications/Arduino.app/Contents/Resources/Java/libraries --called internal libraries

Now, I go to my own libraries at /Users/avenue33/Documents/Sketchbook/Libraries --called external libraries or user libraries-- and take the library I'm looking for.

Next time, if I want to import the Wire library inside /Applications/Arduino.app/Contents/Resources/Java/libraries, I can't go there because:


This is purely Mac OS X related.
(https://lh3.googleusercontent.com/-pj6Ikq3Cy0s/Tws8J4xYdtI/AAAAAAAAI1s/4NUk1n7PDCs/s800/Bundle.png) Ouvrir = Open launches the app. Afficher le contenu du paquet = Show bundle gives that:
(https://lh3.googleusercontent.com/-g0_CW_vvGIk/Tws8rgj1etI/AAAAAAAAI18/xDPq6I1qidY/s640/Capture%252520d%2525E2%252580%252599e%2525CC%252581cran%2525202012-01-09%252520a%2525CC%252580%25252020.08.44.png)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 09, 2012, 09:48 pm
Avenue33
I understand the problem but I cant explain it. (I'm not related to mac  8) )
As you can see from the code below I always go back to the "internal libraries". controlLibraryPath.getText() returns the content of the dialog box and that should be empty. Therefore the path should always be set to the "internal libraries".
If there are mac experts who know how to solve this issue, please let me know.
Best regards
Jantje


Code: [Select]
@Override
public void widgetSelected(SelectionEvent event) {
final Shell shell = new Shell();
DirectoryDialog theDialog = new DirectoryDialog(shell);
if ((controlLibraryPath.getText()==null) | (controlLibraryPath.getText()==""))
{
theDialog.setFilterPath(ArduinoInstancePreferences.getArduinoPath().append( ArduinoConst.LIBRARY_PATH_SUFFIX).toString());
}
else
{
theDialog.setFilterPath(controlLibraryPath.getText());
}

String Path = theDialog.open();
if (Path!=null)
{
controlLibraryPath.setText(Path);
updateWidgetEnablements();
}
}
Title: Re: Arduino Eclipse Plugin <Update>
Post by: mo-seph on Jan 10, 2012, 12:41 am
Hi,

Just wanted to confirm that this works on OSX! Thanks for the great work - I've been hoping someone will do this for ages!

I'd like to check whether I've understood compatibility with the Arduino editor correctly. It seems like to start working with an Arduino project which has multiple files, you need to:
* add all the .pde files to your project
* import libraries and add includes to $project.h
* in $project.h declare any global functions and externs for all global variables, and copy all #defines
* add #include "$project.h" to all .pde files

The last step means that it's not directly compatible with the Arduino editor any more, as there won't be a $project.h. Also, in order to keep the main file compatible, #defines need to be both in $project.pde and $project.h (if they are used in other files). I guess that they can get wrapped in an #ifdef
Title: Re: Arduino Eclipse Plugin <Update>
Post by: garretto on Jan 12, 2012, 12:53 am
I'm trying to create a new project with a board: Arduino Mega (ATmega1280)

When I try to create the new project, I get an error:
Failed to create project test1
Path variable name cannot contain character: ).


Anyway I can modify the name of the board to take out the parenthesis?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 12, 2012, 11:22 pm
Garetto
The ( problem in the board name should be fixed in the latest version 1.1.6 released earlier this week.

mo-seph
read this article http://arduino.cc/en/Hacking/BuildProcess (http://arduino.cc/en/Hacking/BuildProcess) it will give you a better understanding on the compatibility.

The first thing to realize is that we talk about code compatibility. This means that both the IDE and Eclipse can compile the same code.
The second thing to ask is do you want
compatibility from Arduino IDE to eclipse.
or Eclipse to arduino IDE
or Arduino IDE from and to Eclipse (both directions)

Because the Arduino IDE provides functionality at the level of code preprocessing it is very hard to guaranteed 100% compatibility from the Arduino IDE to Eclipse. It is not my intention to add this preprocessing functionality to the plugin. (However if someone else wants to do it I don't care)
Because of this: when I talk about compatibility I talk about compatibility from Eclipse to Arduino only.
Because Eclipse has "less capabilities" code from Eclipse compiles as such in the arduino IDE.
BUT
Shakespeare already stated a lang time ago "There are more things in heaven and earth, Horatio, Than are dreamt of in your philosophy". 8)
So there is more than code only. There are also libraries, include paths and library paths.
When you import an Arduino library in Eclipse with the plugin the include path and library paths are changed for you.
When you compile Eclipse code in the Arduino IDE you need to provide this info to the Arduino IDE.
Luckily the Arduino IDE provides "more source functionality". Therefore a simple include of the header file of the library in the pde/ino file is enough to overcome this problem. It has to be the pde/ino file due to a short coming in the Arduino IDE.
Because this "extra" include (you already need to include the library header to use the functionality) is harmless in the Eclipse IDE you can have 100% compatible code.
You can have the IDE and eclipse "point" to the same folder so you do not have to move code around.

I hope this makes it clearer
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: julius59 on Jan 13, 2012, 01:32 pm
Hi,

I get an error too regarding the name in 1.1.6 :

Naming my project "test_arduino1.0", while importing an arduino lib :
"Failed to import library
Path variable name cannot contain character: .. "

Otherwise, good job !
Title: Re: Arduino Eclipse Plugin <Update>
Post by: garretto on Jan 13, 2012, 10:18 pm
I'm actually already using version 1.1.6 and getting that issue.  Otherwise great plugin!!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 15, 2012, 12:01 am
Garetto and Julius59
I tested it now and indeed it didn't work.
I used wikipedia to know all "problem Characters" http://en.wikipedia.org/wiki/Filename (http://en.wikipedia.org/wiki/Filename). Today; this page does not contain ( and )
I admit I didn't test this  :smiley-sad-blue:  and even worse I didn't test 1.1.7 I just released :smiley-mr-green: .
I hope it works now.
Best regards
Jan
Title: Re: Arduino Eclipse Plugin <Update>
Post by: garretto on Jan 16, 2012, 07:49 am
Fantastic thank you!

One other problem I'm having, which isn't that big of a deal, is that Eclipse isn't able to find library classes like Serial.  When I write a line like Serial.println("Hello World"); Eclipse underlines it in red and says Serial cannot be resolved.  It ends up compiling just fine, however, so like I said it is not a big deal.  However, it would be nice if Eclipse could see the proper libraries so it doesn't mark this with an error.

Anyone know how to fix this?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: kiwidude on Jan 16, 2012, 11:24 am
Eclipse has a static analysis tool built in which looks at your code and points out any issues it has with it. It is independent of the compiler, although you could view it as one that doesn't produce code, just warnings. Like the compiler, the static analysis tool needs to know where the sources are. By and large eclipse (or probably rather the CDT plugin) tries to be automagic, but it doesn't always work.

There are some settings you can tweak:
Workspace preferences -> C/C++ -> Indexer.

Project properties:
C/C++ General -> Indexer.
C/C++ Build -> Discovery Options. I'm not too sure what best to put here. If you leave the discovery profile on "per language", make sure you check the settings for each language(!). The "clear discovered entries now:" has a clear button, use it (for all languages) to force a re-discovery after something is wonky.

You can make use of path variables:
Project properties -> Resource -> Linked resource, path variables tab.

Check the path discovery has worked correctly by looking at
C/C++ General -> Paths and Symbols -> Includes tab, for each(!) language.
The yellow/green folder icons are the paths found; they can't be edited. The purplish ones are the ones you added in C/C++ Build -> Settings -> Tool settings tab, (Asm Paths, C and C++ Compiler Directories).

Also make good use of clearing the index. In the project explorer, right click on the project, Index -> Rebuild.

Now all this advice comes with the proviso that I'm not 100% familiar with eclipse myself (it's too damn complicated), and I am only using the AVR plugin so far, but not the Arduino plugin. The problem you describe shows up for me though when something in indexing/discovery doesn't work properly.
There are also some reports of the CDT plugin being buggy in those areas, the AVR plugin having path problems, and "individual settings for build configurations" in the AVR plugin messing things up irrecoverably. By and large it works for me though, but it's possible I have to try moe than once to knock it into shape.

Another potential problem area is if your sources (like Arduino core, or official libraries ) are outside of your workspace. I suggest you use path variables then, and use them to tell eclipse where the paths are to search for sources (and hope indexer/discovery pick up on it). For starters I made one project in the workspace containing all of the core (this setup is required to keep code space down), with the libraries actually used in the project directory. I use Linux, so using symlinks is very convenient for the project layout without having to copy files. Don't use eclipse's virtual file/folder feature until you have everything working, there were some comments that that messes things up too.

Hope this helps :-)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 16, 2012, 09:01 pm
garetto

As for kiwidude comments
Quote
There are some settings you can tweak:
Workspace preferences -> C/C++ -> Indexer.

This is 4.4 of the installation instructions. Note some people state setting the option "index source and headers opened in the editor" helps.

Quote
C/C++ General -> Indexer.

Unless you know what you are doing do not enable project specific indexer settings.

Quote
C/C++ Build -> Discovery Options

Here you can remove "cashed includes" which may cause issues with the indexer. For instance f you changed Arduino versions in the windows->preferences->arduino. Select "per language" and click clear for each language.

Quote
Project properties -> Resource -> Linked resource, path variables tab.

I have never used this page. More info on how this could help indexing would be helpfull  :)

Quote
C/C++ General -> Paths and Symbols -> Includes tab, for each(!) language.

Turn on show built-values before validation. There should be "/${ARDUINOBOARDNAME}/arduino" if you use the arduino eclipse plugin in GNU C and GNU C++. s,S,asm should not have custom (those are printed in bold) settings. If you have imported libraries you have other values here as well.
Look at the source location to see how library code is added.

Quote
The purplish ones are the ones you added in C/C++ Build -> Settings -> Tool settings tab, (Asm Paths, C and C++ Compiler Directories).

You can also directly set them here. I think this is easier. The 2 locations are updated accordingly.

Quote
Also make good use of clearing the index. In the project explorer, right click on the project, Index -> Rebuild.

Spot on. Even if you got plenty of warning the plugin will rebuild the index, rebuilding this way helps out frequently.

Quote
I am only using the AVR plugin so far, but not the Arduino plugin

The arduino plugin contains a clone of the win AVR plugin. Basically it is the same thing. I added some pages that set Arduino specific things in the AVR plugin or set multiple settings based on the Arduino board. If you confortable with Win AVR there is little advantage to go to the arduino plugin because it will probably confuse you because you can set vallues at several locations (and that will confuse the arduino plugin)

Quote
There are also some reports of the CDT plugin being buggy in those areas

fully agree.

Quote
The AVR plugin having path problems

These manifest most when you start deleting imported libraries. If you find a way to reproduce tell me how and I will try to fix it.

Quote
"individual settings for build configurations"

Arduino plugin only has 1 configuration "release" and does not use this option.

Quote
plugin messing things up irrecoverably

Untill now I have been able to recover all of them but it is hard. Easiest is just creating a new project (easy with the wizard) reimport the libraries and copy the code, delete old project.

Hope it is clearer now.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: garretto on Jan 17, 2012, 06:58 pm
Okay I checked "index source and headers opened in the editor" under indexer in C/C++ settings and that seemed to do the trick!  Thanks for your help everyone, this plugin has made my life so much easier working on Mac OS 10.7.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 17, 2012, 07:34 pm
garetto
Happy to hear it works fine for you
Makes me feel like the effort was worth it  :)
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: razorjack on Jan 20, 2012, 01:42 am
i like Eclipse, i think that's a good move :)

but, what's wrong with  AVR Studio 5 ? it's free, isn't it?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 20, 2012, 01:56 am
razorjack
Did someone say there is something wrong with AVR Studio 5?
I can't recall I did so. It would be very unwise as I don't know it. 8)
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: razorjack on Jan 20, 2012, 02:19 am
why don't you use avr studio? are there any problems ?
i didn't use it, i'm just thinking about something more sophisticated than Arduino IDE (i'm accustomed to Eclipse and VisualStudio)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 20, 2012, 10:52 am
razorjack
The discussion avr studio versus eclipse versus arduino IDE (and any others) is as religious as Windows versus mac versus Linux.
I'm not going there. (see my footer)
Note that I cannot find avr studio in the Arduino playground on the development page. It may be there under another name. If you really think avr studio is the way to go you should update that page.

I'm willing to share with the forum why I developed the eclipse plugin. I do not claim my decision are based on "knowledge and research". I just took the most obvious route with my the knowledge I had at that time. This is not a translation but it is similar to the story you can find at http://www.baeyens.it/#post8 (http://www.baeyens.it/#post8) in dutch posted some time ago.
I have been doing software development from beginning 1980. I have always been interested in electronics but never got my head around the 555. So when I learned about PIC's I was hopeful again, until I understood I needed a 555 to get it running. When I learned about Arduino a couple of years ago I was enthusiastic.  This was a board that I could extend with simple electronic circuits and with my programming knowledge programming would be easy.
Just like other people coming from software development I was happy it worked but frustrated by the lack of functionality of the Arduino IDE.
So I started looking at alternatives. And eclipse was the first I found, with was free and runs on windows.
It took me a lot of time to get the complete tool chain to work. This because I hardly know what AVR is all about and I didn't even realize the whole code was simply parsed by a c++ compiler  :smiley-eek:
I think WINavr in eclipse is good and is the way to go in eclipse if you understand about AVR but for me it asked to much time to understand and set all options correctly. This because it is not focused on Arduino but it is a general AVR development environment.

I had some spare time -which I could not spend on direct Arduino development- and therefore I build this eclipse plugin for my learning. I had never before build an eclipse plugin and for professional reasons I wanted to build one.

So I started of by building a plugin on top of -and in collaboration with- winAVR. Due to communications problems and differences in speed I ended up forking winAVR in my plugin. I consider this as a bad thing because changes to winAVR are not automatically promoted to this plugin. And because I do not want to give the impression I am taking the credits of winAVR.

Now the plugin is published I'm surprised about how many people download it and use it. I have 800+ hits a day on my site now (and rising) but I have no clue how many downloads have been done. I think this proves Arduino is maturing and growth paths to "more professional development tools" are needed.
Many people have told me that the plugin works "out of the box". I understand this as: "I know about eclipse and C++, further on I don't know what I am doing but I have been able to build a sketch and upload it to the Arduino board".  :)
So -without knowing all the other tools around- I dare to state that currently my plugin is the closest you can get to "an Arduino IDE's for dummies for experienced software developers".
For which I feel proud  8)

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: razorjack on Jan 20, 2012, 02:02 pm
I need to test it then :)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 20, 2012, 02:19 pm
razorjack
please do and share your findings.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Mr_RGB on Jan 22, 2012, 04:37 am
Hi!

During December, I gave this plugin a spin. Once I got it set up, it definitely was preferable to using the Arduino IDE. However, getting it set up (more-or-less) correctly was quite difficult. Here are some of the problems I ran into. I would love it if the plugin handled more of these automatically so that new users weren't confused by these issues (and so they didn't have to follow a bazillion steps in setup instructions.)

Problem #1:
First of all, it would be helpful to make clear that users of this plugin are not expected to download the C++ edition of Eclipse to install it into. I did this at first, and it really confused me. You should probably clearly state very clearly exactly what version of Eclipse to use with the plugin.

Problem #2:
I found that in order to get my Arduino 1.0 code to compile properly, and also for many of its symbols to be resolved correctly in Eclipse as I was editing (otherwise they are marked as errors in edit windows), I needed to add some defined values to each of the following pages:

"Properties->C/C++ Build->Settings->Tool Settings->AVR Compiler->Symbols->Define Syms (-D)"
"Properties->C/C++ Build->Settings->Tool Settings->AVR C++ Compiler->Symbols->Define Syms (-D)"

Specifically, I added:

ARDUINO = 100
__AVR_ATmega328P__ = 1 (or whatever chip you are using) in GCC and/or G++
__IN_ECLIPSE__ = 1   (more on this later)

It would be nice if the plugin prompted for at least the first two of these in some obvious way (on a project configuration page?), so users didn't have to go digging into compiler options in order to set these values. Having to change them in two places is also annoying.

Problem #3:
That helped, but I was still seeing symbols such as Arduino-specific methods marked as errors. Therefore, in each of the following pages:

"Properties->C/C++ Build->Settings->Tool Settings->AVR Compiler->Directories->Include Paths (-I)"
"Properties->C/C++ Build->Settings->Tool Settings->AVR C++ Compiler->Directories->Include Paths (-I)"

I added the following entries:
<PathToMyArduinoIDEFolder>\arduino-1.0\hardware\tools\avr\avr\include
<PathToMyArduinoIDEFolder>\arduino-1.0\hardware\tools\avr\lib\gcc\avr\4.3.2\include

Again, it would be nice if the plugin automatically added these to the include paths, so users didn't have to go digging into compiler options in order to set these values.

This resolved most of the "red" text indicators. However, some were still left. It seems that Eclipse has some bugs in that if a file is imported via an #include which includes a relative path, such as '#include "avr/foo.h"', and it includes another include via the same relative path ("#include 'avr/bar.h") then at edit time, Eclipse doesn't seem to find and parse the most-deeply-nested included file. Among other things, this meant that my "Serial" object was always marked as an error. This resulted in me having to work around the problem by adding a few declarations into my source files that would only be processed when I was editing in Eclipse, thus quieting the error indicators. In one file, for instance, I added this at the top of the file:

#ifdef __IN_ECLIPSE__
extern HardwareSerial Serial;
static void eeprom_write_byte (uint8_t *__p, uint8_t __value);
#endif

Problem #4:
I was still seeing Eclipse warning messages about constructs like:

   const char helpText1[] PROGMEM = "stuff";

which stated "only initialized variables can be placed into program memory area". Apparently this is a bug with avr-g++:

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=57011

A bug report was filed against it, and is reported as "fixed" for version 4.6.2 of the gcc compiler:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734

It would be nice if the plugin could include this version of the compiler or later.

My main advice to you would be to automate as much of this kind of setup as possible, so that users will not have to figure out what's wrong and what to do about it. It took me a long time to figure out how to get this working, and judging from some of the recent comments to this forum, I'm not the only one. Having the plugin ask some questions at install time (or when requested) and then setting itself up automatically from those would be really helpful, especially to people who are unfamiliar with the intricacies of the Eclipse C++ build process.
   
Thanks very much for writing the plugin!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Phille on Jan 22, 2012, 09:13 pm
Hi!
Great work on this plugin!

However, i have a slight problem everytime i try to upload to my Duemilanove 328. I constantly get the error message

"AVRDude does not support the project target MCU(Atmega328P)

Please select a different target MCU if you want to use AVRDude"

Is it something i missed out during the installation or is there a way around this?

I am running this on  OSX Snow Leopard.

Any help is greatly appreciated!

/Phil
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 22, 2012, 10:52 pm
Mr_RGB
I'm really sorry you have so much problems using the plugin. I'm also gratefull you took the time to write them down.
Are you sure you installed my plugin (http://eclipse.baeyens.it/ (http://eclipse.baeyens.it/))? The latest version (1.1.7)? Did you use the installation instructions available at http://eclipse.baeyens.it/Install.html (http://eclipse.baeyens.it/Install.html)
I'm wondering because most of the problems you refer to have not been reported before.
Below I'm going into the problems you mentioned. I became a bit extensive but because you took the time to write it down I feel you deserve a answer.

Quote
Problem #1:
First of all, it would be helpful to make clear that users of this plugin are not expected to download the C++ edition of Eclipse to install it into. I did this at first, and it really confused me. You should probably clearly state very clearly exactly what version of Eclipse to use with the plugin.

You must install the C++ version of eclipse. I checked my installation manual and it doesn't clearly state this. I will update the installation manual.
If you did not install the C++ eclipse version my plugin should not install (I never tested this)

Quote
Problem #2:
I found that in order to get my Arduino 1.0 code to compile properly, and also for many of its symbols to be resolved correctly in Eclipse as I was editing (otherwise they are marked as errors in edit windows), I needed to add some defined values to each of the following pages:

This should not be needed. The intent of the plugin is to avoid having to do this.

Quote
"Properties->C/C++ Build->Settings->Tool Settings->AVR Compiler->Symbols->Define Syms (-D)"
"Properties->C/C++ Build->Settings->Tool Settings->AVR C++ Compiler->Symbols->Define Syms (-D)"

Absolutely not needed.

Quote
ARDUINO = 100
__AVR_ATmega328P__ = 1 (or whatever chip you are using) in GCC and/or G++
__IN_ECLIPSE__ = 1   (more on this later)

ARDUINO = 100/0023/0022 is set by the plugin based on the selected Arduino folder.
__AVR_ATmega328P__ = 1 Is set based on the selected board
__IN_ECLIPSE__ = 1 Is not used

Quote
Problem #3:
That helped, but I was still seeing symbols such as Arduino-specific methods marked as errors. Therefore, in each of the following pages:

"Properties->C/C++ Build->Settings->Tool Settings->AVR Compiler->Directories->Include Paths (-I)"
"Properties->C/C++ Build->Settings->Tool Settings->AVR C++ Compiler->Directories->Include Paths (-I)"

I added the following entries:
<PathToMyArduinoIDEFolder>\arduino-1.0\hardware\tools\avr\avr\include
<PathToMyArduinoIDEFolder>\arduino-1.0\hardware\tools\avr\lib\gcc\avr\4.3.2\include

All of this is set automatically. Not sure why it didn't happen for you.

Quote
This resolved most of the "red" text indicators. However, some were still left. It seems that Eclipse has some bugs in that if a file is imported via an #include which includes a relative path, such as '#include "avr/foo.h"', and it includes another include via the same relative path ("#include 'avr/bar.h") then at edit time, Eclipse doesn't seem to find and parse the most-deeply-nested included file. Among other things, this meant that my "Serial" object was always marked as an error. This resulted in me having to work around the problem by adding a few declarations into my source files that would only be processed when I was editing in Eclipse, thus quieting the error indicators. In one file, for instance, I added this at the top of the file:

The Serial problem is an eclipse CDT (this is the C++ plugin) problem and relates to the indexer. The indexer is the "real time compiler tht actually does not compile". It is a neat feature that verifies your code as you type. The same functionality is available in java but there it works great. In C++ the indexer has some "issues". However this does not impact the compilation. The code compiles fine but the gui markes a problem which is not a problem.
Mostly you can get the indexer to work correctly if you set the correct settings in preferences. (see installation instructions) Then right click you project select index and select all options one after another with rebuild as last one. This mostly solves the problem. But it will come back. Then redo the rebuild. Lets hope a new version of the CDT  fixes this issue. As stated before : "It is an annoying thing but it doesn't influence the results".


Quote
Problem #4:
I was still seeing Eclipse warning messages about constructs like:

   const char helpText1[] PROGMEM = "stuff";

which stated "only initialized variables can be placed into program memory area". Apparently this is a bug with avr-g++:

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=57011

A bug report was filed against it, and is reported as "fixed" for version 4.6.2 of the gcc compiler:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734

It would be nice if the plugin could include this version of the compiler or later.

This is completely true. However I do not want to use 4.6.2 in the plugin. I'm using the same compiler as the Arduino IDE because I want to have a hex script that matches as much as possible with what the Arduino IDE produces.
If you want to use the latest compiler you can use winAVR directly or do not select "use Arduino IDE tool in Eclipse"  in the windows preferences.
(http://iloapp.baeyens.it/data/_gallery//public/1/1321528286_resized.png)
Then you need to install the compiler on your system and point to it in the plugin as you can see below (this is a screen from winAVR)
(http://iloapp.baeyens.it/data/_gallery//public/1/1320528725_resized.png)

Quote
My main advice to you would be to automate as much of this kind of setup as possible, so that users will not have to figure out what's wrong and what to do about it. It took me a long time to figure out how to get this working, and judging from some of the recent comments to this forum, I'm not the only one. Having the plugin ask some questions at install time (or when requested) and then setting itself up automatically from those would be really helpful, especially to people who are unfamiliar with the intricacies of the Eclipse C++ build process.

I'm sorry it took you so much time to install it. From what yo write I think you have spend an enormous amount of time on this. Other people tell me it works "out of the box" so I'm surprised you had so much troubles. I think that you must have had bad luck at the start which made you start on the wrong foot. Given a strong dedication (which is apparent from your mail) you have reached the end. I really appreciate your dedication but I feel it would have been "quicker" to ask a question on the forum earlier.

   
Quote
Thanks very much for writing the plugin!

I'm not sure I have to take this serious.
I have been looking at some tools to make some video's on how to use the tool this weekend. I feel this would avoid some wrong installations. Just like you it wasn't a very satisfying search.

I do hope you take another look and try again. Please post if you encounter problems.
Best regards.
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 22, 2012, 10:56 pm
Phille
Are you using the latest version of the plugin? 1.1.7.
I have seen this problem in previous versions but I fixed that a long time ago.
If you are using the latest version please post the console output.
I'll investigate.
Best regards
Jantje

PS I'm using this board as well so I'm pretty sure it should work  :)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Phille on Jan 23, 2012, 08:10 am
Jantje
I think i solved the problem, the path to the avrdude.conf file was in my case:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf

instead of the default:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avrdude.conf

Replacing the default path with the above seemed to solve the problem, i can now compile and upload sketches!

I am using version 1.1.7 of the plugin and version 1.0 of the arduino IDE.

Thanks!

/Phil
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 23, 2012, 08:05 pm
Phil
Thanks for the input. I'm driving a bit blind in regards Mac OS as I don't own one.
I was told arduino installed the conf file at
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avrdude.conf
If this is incorrect I should change it.
Do you have a default installation of the Arduino IDE?
Do you think I should change the plugin to point to
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf
My problem is that the first is the Linux setup. The second is the windows setup. What is the mac setup?

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: SPlatten on Jan 23, 2012, 08:43 pm
Will this plug enable eclipse to debug arduino projects?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 23, 2012, 08:52 pm
SPlatten
There is no debugging functionality in the Eclipse. I'll look at this as soon as we know more about the due who is supposed to support debugging.
Best regards
Jantje

PS If you know how you could debug with eclipse please start a new post on how to do it. I would very interested.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: SPlatten on Jan 23, 2012, 09:01 pm
Ty, regretably I don't.  If you can't debug projects then why use eclipse?  Seems like a lot of effort for no gain?

I like eclipse and use it at work for c /c++ and java.  The arduino IDE seems to have its fair share of display bugs at least on windows 7...but I can live with those.

I have another thread going in which I've reported a problem I'm having, unfortunately no replies...it's in the programming questions forum...thanks again, I will keep an eye on this thread.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 23, 2012, 09:17 pm
Splatten
If you try again with eclipse try my plugin. Lots easier than the winAVR approach.
http://www.baeyens.it/eclipse (http://www.baeyens.it/eclipse)

Quote
If you can't debug projects then why use eclipse?  Seems like a lot of effort for no gain?

You can find this on my FAQ
http://www.baeyens.it/eclipse/Arduino%20eclipse%20plugin%20FAQ.htm (http://www.baeyens.it/eclipse/Arduino%20eclipse%20plugin%20FAQ.htm)

What is the benefit of the Arduino IDE to the eclipse plugin
The Arduino IDE does a great job in introducing people to Arduino. This is so for hardware people writing their first C++ code and for software developers doing their first electronics experience. So if you are new to Arduino stop reading and learn to use the Arduino IDE. The Arduino IDE does this by "hiding" C++ code complexity and Hardware complexity. The hardware complexity is hidden in the libraries/compiler/winAVR which are also used by the eclipse plugin. So there is no "real" difference there. The plugin currently (?) does not hide the C++ code complexity. For someone used to develop C/C++ this will not be a problem. People not used to writing C++ will need to learn about

    * Function declarations
    * Using Include files
    * The usage of extern

This because the way the Arduino IDE is set up it hides or avoids the need of these functionalities. There are plenty of good C/C++ documents on the web that explain these things, so I won't.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: SPlatten on Jan 23, 2012, 09:28 pm
Ty, I will have a go at getting this plugin to work.  I've followed a guide on the main site but I'm not sure if it's for a different plugin...so far I haven't got it working.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 23, 2012, 10:13 pm
SPlatten
You must have missed the top of the page  ;)
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: strykeroz on Jan 23, 2012, 10:24 pm

Ty, regretably I don't.  If you can't debug projects then why use eclipse?  Seems like a lot of effort for no gain
while eclipse won't do it for you I have to report it is far easier to debug your code using eclipse than the arduino IDE, since the error reporting is far more comprehensive.  I had a library reporting an error in the IDE that wasnt accurate.  In eclipse it showed me the true causes.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: SPlatten on Jan 24, 2012, 08:53 pm
Ty, I'll have another go this weekend.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: garretto on Jan 26, 2012, 08:40 am
FYI for Mac OS X users - I created a tutorial that explains how to setup this pluggin on my project website. :)

Check it out here: http://robots.dacloughb.com/project-1/setting-up-the-arduino-eclipse-environment-on-mac-os-x-lion/
Title: Re: Arduino Eclipse Plugin <Update>
Post by: jonek on Jan 26, 2012, 07:02 pm
Hi Jantje,

just to let you know that I have just built and uploaded my first Arduino Uno sketch using your Eclipse plugin on Ubuntu 10.04 Lucid.
I'd like to express my thanks for all the hard work you have put into this.

For others who are using Ubuntu: it took me a few hours to go through the install as I first needed to install


I, also, made the mistake of NOT installing C++ support in Eclipse but that can be retro-fitted. You only notice when the 'New Sketch' is created as Eclipse fails to open the perspective although the projects are created anyway.

My project will use a Java application on the PC communicating with the Arduino via USB so Eclipse makes a great development platform even without a debugger. I guess we need an emulator?

- jon.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 26, 2012, 09:30 pm
Jon
Txs for the feedback.
I'm happy it works for you.
I updated my site to explicitly state the plugin needs the C/C++ eclipse version.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: aBoogieman on Jan 28, 2012, 01:25 am
Hi Jantje,

I'd like to point out that I downloaded the Eclipse Classic (Eclipse Indigo / 3.7.1 / eclipse-SDK-3.7.1-win32.zip) and added the C/C++ tools, and the plugin works great.

I believe that the only differences between that and "Eclipse IDE for C/C++ Developers" are the plugins that come with it. I think that you just need to install the ""C/C++ Development Tools" (CDT). I do have other plugins installed, so I may be wrong about that. But I know it's working, and that's the version of Eclipse I installed.  8)

However, I am familiar with Eclipse and I'm a professional programmer who has written C/C++ for a long time. I do think your recommendation is best for general instructions. I just wanted to mention this for the more experienced people that may already have another version installed.




Since I said it works great, I have to say that I've found a couple of problems.  :smiley-red: They're relatively minor, though. :)

The first is something you wouldn't normally do. Import an Arduino library; delete the folder it creates; then import the same library again. This breaks the build. It looks like it's including a relative path twice. E.g., import SPI twice and the path(s) in the project read "SPI/SPI". Import a 3rd time and you'll see "SPI/SPI/SPI".

The second is that projects created are not portable; either across platforms, or even across folders. By across folders I mean that if I rename a workspace folder, then open the workspace (in the renamed folder), I get errors that I didn't get before. This is something I hadn't tried with Eclipse before, and since the Arduino plugin does not create the workspace, I tend to think it is an Eclipse issue.

What I'd really like is to be able to commit a project file to GitHub and allow collaborators to 1) download and build the project and 2) modify the project and push the changes so that I could pull them down and build.

I've not looked into either issue. I plan to install Ubuntu on my Linux box this weekend and see what's involved. So I may be able to provide more details. (I do know that the project doesn't work as-is on Linux because a friend couldn't build unless he created another Arduino project and imported the files.)

Finally, you should take the thanks seriously! IMO, This is a very important project. I do appreciate it, as I think others do, too.

Best regards,
Leland...
Title: Re: Arduino Eclipse Plugin <Update>
Post by: aBoogieman on Jan 28, 2012, 01:32 am
Everyone,

I forgot one thing, that is a good thing.  8)

You do not have to live with Indexer errors when using Serial. What you want is:

#include <HardwareSerial.h>
extern HardwareSerial Serial;

That gives you the "normal" serial. For the Mega you have Serial1 through Serial4.

I did tweak the settings for Indexer. If this information isn't enough, please let me know and I'll post a screenshot.

Leland...
Title: Re: Arduino Eclipse Plugin <Update>
Post by: ppanish on Jan 28, 2012, 11:02 pm
I've just started trying to use the eclipse plugin and am having a null pointer exception in the baeyens library. This occurs after I've selected the "Import a arduino library in the current project" as soon as I hit Next. I then get an Unhandled event loop exception error. The contents of the error log are as follows:

java.lang.NullPointerException
   at it.baeyens.arduino.tools.Import_Arduino_Library_Page.setImportProject(Import_Arduino_Library_Page.java:146)
   at it.baeyens.arduino.tools.Import_Arduino_Library.init(Import_Arduino_Library.java:41)
   at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizard(WorkbenchWizardNode.java:185)
   at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(WizardSelectionPage.java:104)
   at org.eclipse.ui.internal.dialogs.WorkbenchWizardSelectionPage.getNextPage(WorkbenchWizardSelectionPage.java:100)
   at org.eclipse.ui.internal.dialogs.ImportExportPage.getNextPage(ImportExportPage.java:431)
   at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:908)
   at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:428)
   at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
   at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
   at org.eclipse.jface.window.Window.open(Window.java:801)
   at org.eclipse.ui.internal.handlers.WizardHandler$Import.executeHandler(WizardHandler.java:150)
   at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277)
   at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
   at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
   at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
   at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
   at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
   at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
   at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
   at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
   at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
   at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
   at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1410)


I'm new to eclipse, so I'm afraid I can't be of much more help in debugging without some instructions. I had the same problem with another eclipse install of the JavaEE image combined with C/C++. I then downloaded the C/C++ version in a fresh state and had the same results. I'm running the Arduino-1.0 IDE on a Windows 7 platform. Any help would be appreciated.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: crusy on Jan 29, 2012, 07:16 pm

FYI for Mac OS X users - I created a tutorial that explains how to setup this pluggin on my project website. :)

Check it out here: http://robots.dacloughb.com/project-1/setting-up-the-arduino-eclipse-environment-on-mac-os-x-lion/


garretto, you're the man!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 29, 2012, 09:08 pm
aBoogieman
Thanks for the feedback
The CDT is enough I know. I think it is easier to start with the Eclipse C/C++ version. Experienced users may opt differently.

Quote
Import an Arduino library; delete the folder it creates; then import the same library again.

I have been looking and requesting a sequence that corrupted this. I'll try this sequence and maybe I can fix it.

Quote
The second is that projects created are not portable; either across platforms, or even across folders. By across folders I mean that if I rename a workspace folder, then open the workspace (in the renamed folder), I get errors that I didn't get before. This is something I hadn't tried with Eclipse before, and since the Arduino plugin does not create the workspace, I tend to think it is an Eclipse issue.

I should try this. However I don't want to give this priority for now. Please create an issue on github https://github.com/jantje/arduino-eclipse-plugin/issues (https://github.com/jantje/arduino-eclipse-plugin/issues)

Quote
What I'd really like is to be able to commit a project file to GitHub and allow collaborators to 1) download and build the project and 2) modify the project and push the changes so that I could pull them down and build.

If the above doesn't work this is probably also not going to work. I haven't tried it though. I'm not aware of any code that should make this impossible.
Again it is not high on my priority list so create a github issue if you tested and it failed.

Best regards
Jantje

Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jan 29, 2012, 09:20 pm
ppanish
You have found a bug created in 1.1.7.
To avoid the bug select the project you want to add the library to before selecting "import"
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: rfrankla on Feb 04, 2012, 12:10 am
Hi, I have been using the plugin for about one month now, and its fantastic!
Particularly, I am using Arduino realtime software projects imported into this Eclipse environment -- DuinOS, FreeRTOS as a library (by fat16lib), my own Arduino integration with FreeRTOS 7.1.0 (latest). No real problems with the plugin. I will be trying with fat16lib's ChibiOS/RT soon.

But, I also have the AVR Eclipse plugin, this is confusing because the toolchains are duplicated in the new project wizards. Also, there are two AVR menus and two Upload icons in the toolbar.

But, I am an Eclipse developer, so I have downloaded (git) the source and I will take a look. I have read this forum thread completely and there is mention you would like to depend upon the official AVR plugin and still provide all the customizations for Arduino out-of-the-box. I intend to make this possible. I am between contracts and between re-locating from UK to Silicon Valley, so I have a few days on my hands.

Lastly, I have spent the last six months developing debugger plugins for other target MCUs for a large Japanese Microprocessor manufacturer, so I'm just gona' get me an AVR-dragon and we will have debugging integrated....

Well, thanks for listening... Rick.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: mariusl on Feb 04, 2012, 02:06 pm
@Jantje
I am trying to install the plugin. Is it correct to use the update site for first time install?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: aBoogieman on Feb 04, 2012, 03:26 pm

@Jantje
I am trying to install the plugin. Is it correct to use the update site for first time install?


Marius, That's what I did, and it works fine.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: mariusl on Feb 04, 2012, 04:51 pm
That's what I thought. I get this error when I try

Code: [Select]
Cannot complete the install because one or more required items could not be found.
  Software being installed: Arduino eclipse extensions 1.1.7 (it.baeyens.arduino.feature.feature.group 1.1.7)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: aBoogieman on Feb 04, 2012, 06:16 pm
Do you have the recommended version of Eclipse? Are you using "http://www.baeyens.it/eclipse/update site/ (http://www.baeyens.it/eclipse/update site/)"? (Edit: Be sure to include the space and "site".)

When I look, I see two items from there, one is 1.0.6 and one is 1.1.7. I'm not sure what the difference is, or if they are, in fact, (a part of) the same thing. The lower version shows up under "Uncategorized" and the newer one is under "Arduino".

I thought the doubled "feature" might be a new problem, but I do see the identifier "it.baeyens.arduino.feature.feature.group" when I look at my installed plugin.

HTH,
Leland...
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Feb 04, 2012, 07:35 pm
Marius
Have a look at the documentation and installation instructions at http://eclipse.baeyens.it/ (http://eclipse.baeyens.it/)

aBoogieman
The latest version is 1.1.7 the fact the version 1.0.6 is Uncategorized is an error on my behalf I will try to fix it in the next release.

rfrankla
Thanks for the nice words.
In fact I wanted to have my plugin on top of win avr. I have been communicating with Thomas from the WinAVR but due to differences in time availabilities, the fixes and changes needed in WinAVR for my plugin didn't get "fast enough" in WinAvr (as to my taste).
Therefore I copied the WinAVR in my plugin. This started causing problems when you have the WinAVR  plugin and my plugin loaded. Therefore I changed all the ID's of WinAVR in my copy. Now you can have both plugins at the same time. However there is no need to as it is the same code.
What my plugin does on top of the WinAVR is (from the top of my head)

So unless there is a new version of the winAVR plugin there is no reason to install both.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: mariusl on Feb 05, 2012, 12:46 am
@boogieman I have the following Eclipse

Code: [Select]
Eclipse IDE for C/C++ Developers

Version: Helios Service Release 2
Build id: 20110218-0911

(c) Copyright Eclipse contributors and others 2000, 2011.  All rights reserved.
Visit http://eclipse.org/

This product includes software developed by the
Apache Software Foundation http://apache.org/
Title: Re: Arduino Eclipse Plugin <Update>
Post by: aBoogieman on Feb 05, 2012, 02:18 am
@Marius,

You have the C/C++ version, so that's all that should matter. At this point, I'm with Jantje. Please follow his link to the installation instructions, and let us know how it goes. Those did work for me.

(You don't have anti-virus software or something blocking that site, do you? Anything else that you can provide details about? Maybe someone will have an idea.)

Good luck,
Leland...
Title: Re: Arduino Eclipse Plugin <Update>
Post by: mariusl on Feb 05, 2012, 10:19 am
@Leland
It would seem that there several difirences between the Indigo C++ packages and the Helios C++. I tries to install again after I fixed the first problem

Code: [Select]
Cannot complete the install because one or more required items could not be found.
  Software being installed: Arduino eclipse extensions 1.1.7 (it.baeyens.arduino.feature.feature.group 1.1.7)
  Missing requirement: Arduino eclipse extensions 1.1.7 (it.baeyens.arduino.feature.feature.group 1.1.7) requires 'org.eclipse.cdt.managedbuilder.ui 8.0.0' but it could not be found


And for some reason my packages thinks that they are up to date and does not update automatically.
There are more issues as I go along. I dont think that Helios is as compatible.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: And1G on Feb 05, 2012, 12:03 pm
What's your operating system? I'm using Kubuntu 11.10 on my notebook and get the same error while trying to install. On the PC with Fedora 16 it's working fine.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: mariusl on Feb 05, 2012, 02:21 pm
@And1D
I am using Windows 7. with Helios Eclipse.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Feb 08, 2012, 10:58 am
Marius
Indigo is the 2011 release http://www.eclipse.org/indigo/ (http://www.eclipse.org/indigo/)
Helios is the 2010 release http://www.eclipse.org/helios/ (http://www.eclipse.org/helios/)
It may be that org.eclipse.cdt.managedbuilder.ui 8.0.0 was not part of the 2010 release
Best regards
Jan
Title: Re: Arduino Eclipse Plugin <Update>
Post by: And1G on Feb 08, 2012, 01:40 pm
Just solved the problem for me by adding the Eclipse Update-Repo: http://download.eclipse.org/releases/indigo/
I am using Indigo, version 3.7.0 from the Ubuntu Repositories, maybe I missed a package?
These are the available ones, those I installed are bold:

eclipse                eclipse-emf            eclipse-emf-sdk        eclipse-pde            eclipse-platform-data  eclipse-rse            eclipse-xsd-sdk       
eclipse-cdt            eclipse-emf-examples   eclipse-jdt            eclipse-platform       eclipse-rcp            eclipse-xsd

At least from the description, the other packages don't look like they have to be installed:

Code: [Select]

andreas@ANDILAPTOP:~$ LANG=en_US apt-cache show eclipse-emf
Package: eclipse-emf
Priority: optional
Section: universe/java
Installed-Size: 5596
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Architecture: all
Version: 2.5.0-1
Depends: default-jre | java5-runtime | java6-runtime, eclipse-platform (>= 3.5.2)
Filename: pool/universe/e/eclipse-emf/eclipse-emf_2.5.0-1_all.deb
Size: 4399242
MD5sum: 8ab2d1d7fd2ee9258552b1d148a1b38e
SHA1: 1e736327a1c6ce26f7684232ad6d6ba320fcf658
SHA256: a01204b9fd8a77d5ef36fc7a806c4712d2db9a1bb666cf321d34be73612cf316
Description-en: Eclipse Modeling Framework (EMF)
The Eclipse Modeling Framework (EMF) allows developers to build tools and
other applications based on a structured data model. From a model
specification described in XMI, EMF provides tools and runtime support to
produce a set of Java classes for the model, along with a set of adapter
classes that enable viewing and command-based editing of the model, and a
basic editor.
Homepage: http://www.eclipse.org/emf
Description-md5: e69740fa93be495e9d51f2e0a423ce03
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

andreas@ANDILAPTOP:~$ LANG=en_US apt-cache show eclipse-rse
Package: eclipse-rse
Priority: optional
Section: universe/java
Installed-Size: 19048
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Orbital Alignment Team <pkg-java-maintainers@lists.alioth.debian.org>
Architecture: all
Version: 3.1.2-1
Depends: default-jre | java5-runtime | java6-runtime, eclipse-emf (>= 2.0.8), eclipse-platform (>= 3.5.2)
Filename: pool/universe/e/eclipse-rse/eclipse-rse_3.1.2-1_all.deb
Size: 16353940
MD5sum: 2d1d5c88610e0ec27bd7badec878a0a0
SHA1: ab2acee4e1077f07ad2f3b86cf6eff4c903d06d3
SHA256: ca83f5eba18d637ad088212d83f8b1f66bb1ee95477775a3cf35ed88f59ba871
Description-en: Eclipse Remote System Explorer (RSE)
Remote System Explorer is a framework and toolkit in Eclipse Workbench
that allows you to connect and work with a variety of remote systems.
.
RSE is a framework and toolkit in Eclipse Workbench, that allows you
to connect and work with a variety of remote systems, including
.
    * remote file systems through SSH, FTP or dstore agents,
    * remote shell access (compiling with error navigation),
    * remote process handling through dstore agents,
    * and remote debugging through CDT / gdb.
Homepage: http://www.eclipse.org/dsdp/tm/
Description-md5: 238e55b33a060bc80a8e678f48e67e65
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

andreas@ANDILAPTOP:~$ LANG=en_US apt-cache show eclipse-rcp
Package: eclipse-rcp
Priority: optional
Section: universe/devel
Installed-Size: 11796
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Orbital Alignment Team <pkg-java-maintainers@lists.alioth.debian.org>
Architecture: amd64
Source: eclipse
Version: 3.7.0-0ubuntu1
Replaces: eclipse-rcp-gcj, libswt-gtk-3.4-java, libswt-gtk-3.4-jni, libswt-gtk-3.5-jni (<< 3.5.1+repack), libswt3.2-gtk-gcj, libswt3.2-gtk-java, libswt3.2-gtk-jni
Depends: default-jre | java5-runtime | java6-runtime, libequinox-osgi-java (= 3.7.0-0ubuntu1), libicu4j-4.4-java (>= 4.4.2), libatk1.0-0 (>= 1.12.4), libc6 (>= 2.7), libcairo2 (>= 1.2.4), libglib2.0-0 (>= 2.12.0), libgtk2.0-0 (>= 2.8.0), libsoup2.4-1 (>= 2.26.1), libwebkitgtk-1.0-0 (>= 1.3.10), libxtst6
Recommends: libgl1-mesa-glx | libgl1, libgnomeui-0 (>= 2.22.0), libgnomevfs2-0 (>= 1:2.17.90)
Suggests: eclipse
Filename: pool/universe/e/eclipse/eclipse-rcp_3.7.0-0ubuntu1_amd64.deb
Size: 9206028
MD5sum: a63c7909affd89ebccad74828dc10779
SHA1: 1a18740081b9240474d6c17a796d0e28113cc45a
SHA256: b20225f03dca5cf9461b5ac2ad29405f61a6df67256ce2efa6cee6a69dd251cc
Description-en: Eclipse Rich Client Platform (RCP)
The Eclipse Platform is an open and extensible platform for anything and yet
nothing in particular. It provides a foundation for constructing and running
integrated software-development tools. The Eclipse Platform allows tool
builders to independently develop tools that integrate with other people's
tools so seamlessly you can't tell where one tool ends and another starts.
.
This package includes only the Eclipse Rich Client Platform (RCP), which is
the basis upon other Eclipse-based applications are built. It does not
include any development plug-ins. These are available on different packages:
.
  * eclipse-jdt Java Development Tools
  * eclipse-pde Plug-in Development Tools
  * eclipse Complete development environment
.
This package is the basis for all Eclipse applications.
Homepage: http://www.eclipse.org/
Description-md5: d6ca6e58221bde47c10d03c757d983db
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

andreas@ANDILAPTOP:~$ LANG=en_US apt-cache show eclipse-xsd
Package: eclipse-xsd
Priority: optional
Section: universe/java
Installed-Size: 1708
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Architecture: all
Source: eclipse-emf
Version: 2.5.0-1
Depends: default-jre | java5-runtime | java6-runtime, eclipse-emf (= 2.5.0-1)
Filename: pool/universe/e/eclipse-emf/eclipse-xsd_2.5.0-1_all.deb
Size: 1302130
MD5sum: 20f12661fd0a1a20be5423a1c570ad49
SHA1: 4491e182f3b4e162329b35d32653e7cacf8d8932
SHA256: e5de0e30ae89826fd129d829a9fa0eb0db00a3e762e6c70814589d746c378eff
Description-en: XML Schema Definition (XSD) for Eclipse
The XML Schema Definition (XSD) plugin is a library that provides an API for
manipulating the components of an XML Schema as described by the W3C XML
Schema specifications, as well as an API for manipulating the DOM-accessible
representation of XML Schema as a series of XML documents.
Homepage: http://www.eclipse.org/emf
Description-md5: f4253d1c7ee4828b1ca2847d1febd3aa
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Feb 08, 2012, 01:47 pm
And1G
It is the eclipse and eclipse-cdt you needed
you may have needed eclipse-platform-data and eclipse-platform
you don't need eclipse-pde  eclipse-jdt     
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: themessedupone on Feb 20, 2012, 02:20 am
HI,

when I try to upload a programmer to my Arduino I get the following error: "avrdude: ser_open(): can't open device "411": No such file or directory" and "ioctl("TIOCMGET"): Inappropriate ioctl for device"



I've checked the port, and Arduino Uno is using port 411. (/dev/tty.usbmodem411)

Am I entering the port number in the wrong format? any suggestion?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Feb 20, 2012, 10:40 am
Hi
You should use /dev/tty.usbmodem411 and not 411.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: themessedupone on Feb 20, 2012, 09:13 pm
Hey,

it worked. Thanks!  :P XD
Title: Re: Arduino Eclipse Plugin <Update>
Post by: And1G on Feb 21, 2012, 02:55 am
Has anyone here used this DS1307 library with the Eclipse Plugin by Jantje? https://github.com/davidhbrown/RealTimeClockDS1307

With the Arduino IDE the library example compiles fine. But with Eclipse the compiler struggles over this construct:
Code: [Select]

  #if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
  #else
  #include "WProgram.h"
  #endif


When I hover ARDUINO, Eclipse tells me the macro expansion is 0100 but the inclusion of Arduino.h is greyed out, so WProgram.h gets included. When I now try to compile, obviously WProgram.h cannot be found.

Has anybody a solution for this?
Where is ARDUINO defined? I have not found it in Arduino.h or any of the other header files...
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Feb 21, 2012, 09:30 am
Hi
The defenition of ARDUINO=0100 is done by the eclipse plugin based on the revisions.txt in the arduino folder.
To be honest I don't know why the compiler thinks 0100 is not equal to 100
I use the following code and that works fine
Code: [Select]
  #if defined(ARDUINO) && ARDUINO > 99
  #include "Arduino.h"
  #else
  #include "WProgram.h"
  #endif

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: mariusl on Feb 21, 2012, 09:44 am
Quote
To be honest I don't know why the compiler thinks 0100 is not equal to 100


Defines are literal. you define a pattern not a value - so 0100 is not the same as 100 in pattern but in value they are the same. If it is substituted in an equation it will be evaluated as 100. Very strange but literal or like a string rather.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Feb 21, 2012, 11:38 pm
Hi
I released version 1.2.0 of the plugin
The improvements.

The plugin is available as always on "eclipse.baeyens.it (http://eclipse.baeyens.it)update site"
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: bjornhanson on Mar 16, 2012, 01:20 am
Jantje, I'd really like to try out your Eclipse plugin, but it seems like your update site (http://www.baeyens.it/eclipse/update%20site/ (http://www.baeyens.it/eclipse/update%20site/)) is blocked.  I've tried it from a couple different ISPs and get the 403 Forbidden error ("You don't have permission to access /eclipse/update site/ on this server.")  Can you look into this?

Thanks,
Bjorn
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Mar 16, 2012, 01:28 am
Bjorn
Have you read the documentation available at http://eclipse.baeyens.it/ (http://eclipse.baeyens.it/) ?
More specifically: Did you follow the installation instructions at http://eclipse.baeyens.it/Install.html (http://eclipse.baeyens.it/Install.html)
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: bjornhanson on Mar 16, 2012, 02:57 am
Yep, I followed the directions.  I put the URL into Eclipse and it was giving me errors about not being able to find the repository.  I tried it many times last night, and couldn't get it to work...but now it worked.  Sorry, I guess I did something wrong.  I didn't realize Eclipse was adding it to the list of repositories every time, even though it wasn't working.  It would seem deleting them all just now made it start working.  Whatever happened...at least it works now.  Sorry to blame your server, it looks like it was my fault.  Thanks!  I'm looking forward to using Eclipse for Arduino development!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Mar 16, 2012, 11:58 am
Bjorn
No worries. I'm happy it works now.
Did you know that in eclipse you can/must specify how to get to  the internet?
In windows->preferences->general->network connections you can specify direct, manual or native.
The eclipse documentation states as follows:
Quote
Specifies the settings profile to be used when opening connections. Choosing the Direct provider causes all the connections to be opened without the use of a proxy server. Selecting Manual causes settings defined in Eclipse to be used. On some platforms there is also a Native provider available, selecting this one causes settings that were discovered in the OS to be used.

Sometimes it doesn't work with me as well. Going with a browser to "http://www.baeyens.it/eclipse/update%20site/site.xm (http://www.baeyens.it/eclipse/update%20site/site.xm)l" works fine but with eclipse it doesn't. I switched from native to direct and I haven't had the problem anymore.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: bjornhanson on Mar 17, 2012, 01:23 am
Cool, I didn't know that. Thanks for the tip!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: pak on Mar 21, 2012, 07:06 am
Hi Jantje,
     Thank for making plug-in for arduino. I've tried to install eclipse according to http://eclipse.baeyens.it/Install.html (http://eclipse.baeyens.it/Install.html), but I have some problem with plug-in installation and I stuck with (3.6)Enter the information as below (select the newest version of the plugin) Site: http://www.baeyens.it/eclipse/update site. Then I've got the following error message from eclipse.
Quote
An error occurred while collecting items to be installed
session context was:(profile=epp.package.cpp, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Unable to read repository at http://www.baeyens.it/eclipse/update%20site/plugins/it.baeyens.avreclipse.ui_4.0.6.jar.
Read timed out


I've tried on "http://www.baeyens.it/eclipse/update%20site/site.xml" too, but no luck. By the way, I also tried on both current plug-in version of 1.2.0 and 1.0.8.

regards,
pak


Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Mar 21, 2012, 01:38 pm
pak
I click on the link and it starts to download.
Can you check again to see we are not looking at temporary network problems.
By the way. To avoid space problems it is better to use http://www.baeyens.it/eclipse/update
best regards
jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: pak on Mar 22, 2012, 02:14 am
Hi dude,
     Thank for reply, I've found "jantje-arduino-eclipse-plugin-2100277.zip" from somewhere and successfully installed. https://nodeload.github.com/jantje/arduino-eclipse-plugin/zipball/master (https://nodeload.github.com/jantje/arduino-eclipse-plugin/zipball/master)

But I have another problem with compiling the sketch. My sketch is a simple one as follow:
Code: [Select]
// Do not remove the include below
#include "My_Sketch.h"


//The setup function is called once at startup of the sketch
void setup()
{
pinMode(13, OUTPUT);
}

// The loop function is called in an endless loop
void loop()
{
//Add your repeated code here
}



I think I miss something like header or library to put in my sketch. Can you please post some example sketch?

Thank for your hard work to make easier and effective ide for arduino.

Regards,
pak
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Mar 22, 2012, 10:59 pm
pak
I don't know this zippball thing and you are not clear what your problem is.
Have you read the faq? http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm (http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm)
Please be precise in what the problem is.
best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: loretoparisi on Mar 26, 2012, 01:51 am

**** Build of configuration Release for project Arduino_Uno ****

make all
Building file: /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.cpp
Invoking: AVR C++ Compiler
avr-g++ -I"/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino" -I"/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard" -Wall -Os -fno-exceptions -g  -ffunction-sections  -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"arduino/Print.d" -MT"arduino/Print.d" -c -o "arduino/Print.o" "/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.cpp"
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.cpp: In member function 'size_t Print::print(const __FlashStringHelper*)':
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.cpp:44:9: error: 'prog_char' does not name a type
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.cpp:47:23: error: 'p' was not declared in this scope
make: *** [arduino/Print.o] Error 1

**** Build Finished ****

What's wrong :( ?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: loretoparisi on Mar 26, 2012, 02:10 am
So found out.
It's the patch https://github.com/arduino/Arduino/commit/0acebeeff48cdb28c602f04e1a5906c6b2149a02

that is not into the compiled IDE yet.

To get more info, http://arduino.cc/forum/index.php?topic=87186.5;wap2
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Mar 26, 2012, 08:54 am
loretoparisi
I have read through these posts. As far as I understand this has nothing to do with my eclipse plugin.
Correct me if I'm wrong
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: AgeBee on Apr 15, 2012, 08:59 pm
Hi Jantje or all,
concerning your post « Reply #7 on: November 05, 2011, 10:08:00 PM » http://arduino.cc/forum/index.php/topic,70547.msg589022.html#msg589022 (http://arduino.cc/forum/index.php/topic,70547.msg589022.html#msg589022) where you described within a screenshot how to configure the paths there arose a question: Where do I find the AVR GCC, GNU make, AVR Header Files and AVRDude ? I downloaded the arduino-023 package but there is no folder avr within folder tools. Is there a separate download for these tools ?
Thank you
AgeBee
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Apr 15, 2012, 11:04 pm
AgeBee
On my system in Windows there is.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: AgeBee on Apr 18, 2012, 07:47 am

AgeBee
On my system in Windows there is.
Best regards
Jantje


Hello Jantje,
thanks for your quick reply.
So there seems to be a difference between Windows and Linux (Ubuntu in my case).
I post the screenshots for those who go with Linux to demonstrate how my settings are.
One for the preferences the other for the project properties.
(http://Prefs.png)
(http://props.png)
Regards
AgeBee
Title: Re: Arduino Eclipse Plugin <Update>
Post by: And1G on Apr 18, 2012, 11:53 am
Why do you have a custom avrdude? I installed the Packages from the repository (using Fedora) and it seems to use the standard system files.
Where did you get your arduino installation?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: AgeBee on Apr 19, 2012, 07:11 am

Why do you have a custom avrdude? I installed the Packages from the repository (using Fedora) and it seems to use the standard system files.
Where did you get your arduino installation?


I got it for my Ubuntu 11.10 via the Ubuntu Software Center by asking for Arduino. There was only one application to install.
So I did not do any custom installation.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: AgeBee on Apr 20, 2012, 08:41 pm

AgeBee
On my system in Windows there is.
Best regards
Jantje


Hi Jantje,
if I setup a blank project with Eclipse and I write the line

Serial.begin(9600);

into function setup() I get an error that
"Symbol 'Serial' could not be resolved" and
"Method 'begin' could not be resolved".

Serial.h or something like that seems to be missing.

Have you got any ideas why these sources are not found ? Actually, in which folder can I find them ?
The Serial-stuff is standard functionality within the Arduino IDE.
Thanks
AgeBee
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Apr 21, 2012, 04:33 pm
AgeBee
Do you have this problem in the console?
Please see http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#bugs (http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#bugs) on how to get rid of the indexer problem.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: AgeBee on Apr 22, 2012, 08:30 am
Hi Jantje
thanks a lot for your quick response.
No, I did not get the error within the console. However, your post pointed my to the solution of the problem.
I figured out that I had to add an additional include which seems to be only necessary under Ubuntu.
I set the path these additional include to: /usr/share/arduino/hardware/arduino/cores/arduino
(see screenshot).

(http://Eclipse_AdditionalPath.png)

And that worked for me.

By the way:
I got an error then which read:

avrdude: stk500_recv(): programmer is not responding

I had to change the USB port to /dev/ttyACM0 (see screenshot) and that solved the problem.
(http://Eclipse_Error.png)
Best regards
AgeBee
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Apr 22, 2012, 04:13 pm
AgeBee

Quote
I figured out that I had to add an additional include which seems to be only necessary under Ubuntu.
I set the path these additional include to: /usr/share/arduino/hardware/arduino/cores/arduino

This is not necessary. Not even on Ubuntu.
This include is exactly the same as "/${ARDUINOBOARDNAME}/arduino" which you can see on the image you provided.

Quote
avrdude: stk500_recv(): programmer is not responding

I had to change the USB port to /dev/ttyACM0 (see screenshot) and that solved the problem.

Yes you have to provide a proper USB name for it to work.

Best regards
Jantje

Title: Re: Arduino Eclipse Plugin <Update>
Post by: inagy on May 09, 2012, 09:34 pm
Hi!

I'm trying to use this plugin however i can't even compile the template sketch the IDE generates me on new project. I get this:

Code: [Select]
**** Build of configuration Release for project test ****

make all

Error: Cannot run program "make" (in directory "C:\Users\inagy\workspace\test\Release"): CreateProcess error=2, The system cannot find the file specified

**** Build Finished ****


I've seen this error at the beginning of this topic where someone could solve this by reinstalling Eclipse and the plugin. I've tried this but it's not working by me :( I've checked the path's under Preferences -> Arduino -> Paths and they seems fine. I have Arduino-1.0 installed.
I'm using Windows x64. What should i do?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: inagy on May 09, 2012, 11:53 pm
Okay i made it working. I had the Eclipse Java edition installed. I've assumed that Eclipse will download all required dependencies for the plugin and i can use my Eclipse as a mixed Java/C++ development environment. Looks like it's not the case. I've installed the Eclipse C++ edition plus the plugin and it's working now.

I'm wondering why i can't use this plugin with the Java edition. It actually downloaded the CDT components because i can switch to C/C++ view and the Preferences page / project types also expanded with the new options. But the compilation fails.

Anyway, i'm curious if this plugin could be used to program an ATtiny45 this way: http://hlt.media.mit.edu/?p=1229 (http://hlt.media.mit.edu/?p=1229) :)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on May 10, 2012, 12:14 pm
Inagy
it may or it may not. I don't know. What I do know is that it is more likely to work when you follow the instructions  ;)

Best regards
Jantje
Title: No AVR project selected
Post by: PaulVvz on May 30, 2012, 12:32 pm
I have tried to make a simple Arduino project in Eclipse.

Now, after a succesful build of a small Arduino project, the "Upload Project to Target Device" button fails with a popup: "No AVR Project selected". This occurs even when I have selected the project.

Does anyone has seen this problem and can show me how to solve this? Thanks.

I used Eclipse IDE for C/C++ Developers 1.4.2.20120213-0813 and Arduino Eclipse extensions 1.2.0.

In the properties of my project, NO entry AVR is shown. It seems to me that here should be an AVR entry in the list "Resource, Builders, C/C++ Build, ....".
Paul
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on May 30, 2012, 08:05 pm
Paul
There is no AVR in the project properties in an arduino project. There is however a arduino option in the project properties.
If you do not have a Arduino option in your project properties something has gone wrong.
Best is to read through the documentation available at www.baeyens.it\eclipse and find out what has gone wrong.
In worst case restart from scratch following the documentation.
Best regards
Jantje



Title: Re: Arduino Eclipse Plugin <Update>
Post by: PaulVvz on May 31, 2012, 12:04 pm
Jantje,
thanks for your answer.
There is an Arduino option in the project properties for a project that I create with File - New - Other - New Arduino sketch. Uploading works here.
There is no such option in the project properties for a project that I create with File - New - C project - AVR Cross Target Application.
I really want to program from scratch, without the Arduino framework.
Any ideas to get the upload functionality working with a AVR Cross Target Application?
Paul
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on May 31, 2012, 06:51 pm
Paul
As you can read at multiple places in this thread he arduino plugin is build on top of AVR win.
You are looking for the AVR win functionality. Please read earlier messages on how to go around this.

Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: PeterO on May 31, 2012, 10:02 pm
Just to say "thanks" for this plug-in Jantje.  I use eclipse "for real work" and it's nice to be able to use the same tools for "fun".   
The ability to incorporate assembler (.S) files into a sketch is a big plus point for me.  I must admit I was impressed when the ethernet examples worked "out of the box".

A serial monitor would be nice, but since I'm using a mega2560 I can use Serial1..3 for debugging ;-)

PeterO
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on May 31, 2012, 10:23 pm
Peter
Txs for the nice words.
What exactly do you mean with "I'm using a mega2560 I can use Serial1..3 for debugging ;-)"?
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: PeterO on May 31, 2012, 10:50 pm

What exactly do you mean with "I'm using a mega2560 I can use Serial1..3 for debugging ;-)"?

It has got 4 hardware serial ports, so I don't have to use the first one that is connected to the USB interface for debugging.  I write to Serial1 which has a TTL to RS232 converter connected to /dev/ttyS0 (which has a terminal program running on it).
PeterO
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on May 31, 2012, 10:54 pm

It has got 4 hardware serial ports, so I don't have to use the first one that is connected to the USB interface for debugging.  I write to Serial1 which has a TTL to RS232 converter connected to /dev/ttyS0 (which has a terminal program running on it).

I hadn't thought about that one. But indeed that takes the "double usage" of the serial port away which makes life a bit easier.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: brownerthanu on Jun 07, 2012, 09:32 pm
Hello everyone. I am trying to use the Eclipse plugin but I am running into the following problem. I've browsed the forum for a solution and couldn't find an answer, but I apologize if this has already been answered elsewhere. I would very much appreciate some assistance!  :)

When I try upload my project to the Arduino I get this error message:

(http://www.cs.princeton.edu/~roda/img/upload_error.png)

Then I went to Project > Properties > Arduion > Target Hardware > Load from MCU and got this error:

(http://www.cs.princeton.edu/~roda/img/executable_not_found.png)

So I went to Preferences > Arduino > Paths and input the path to avrdude. However, when I saved the preferences and re-opened them, the path was still unset. It would not save. It looks like this:

(http://www.cs.princeton.edu/~roda/img/eclipse_prefs.png)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jun 07, 2012, 10:14 pm
Hi
As you are on mac. Have you read this article? http://robots.dacloughb.com/project-1/setting-up-the-arduino-eclipse-environment-on-mac-os-x-lion/ (http://robots.dacloughb.com/project-1/setting-up-the-arduino-eclipse-environment-on-mac-os-x-lion/)

I see you are configuring some things you should not configure. Have you been reading the documentation on www.baeyens.it/eclipse (http://www.baeyens.it/eclipse)?
If this doesn't help you to fix the problem. Please read the troubleshooting section in the FAQ http://www.baeyens.it/eclipse/Arduino%20eclipse%20plugin%20FAQ.htm#doesntwork (http://www.baeyens.it/eclipse/Arduino%20eclipse%20plugin%20FAQ.htm#doesntwork) and post the console output.

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: brownerthanu on Jun 09, 2012, 08:51 am
Thanks so much for the reply! I really appreciate your helpfulness. It works now. I did a fresh install of the Arduino IDE, Eclipse and the plugin.  :)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jun 09, 2012, 12:42 pm
Glad to hear it works.
Have fun with it.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: And1G on Jun 09, 2012, 07:06 pm
Is it possible to use your plugin with Eclipse Juno? I updated my machine to Fedora 17 Beefy Miracle yesterday and realized it shipped Juno.

I was able to install your plugin but when I try to create a new project, on the page where you enter your Arduino data like type or  serial port everything is grayed out and you cannot finish.
When I open an existing project and hit the "Build Project" button, an error message pops out.
Also, the upload button is missing.

Any chance for an update?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jun 10, 2012, 12:38 am
Juno is not jet officially released.
I want first to release a version that includes a serial monitor (nearly finished)
Then I'll probably look at juno support when doing other things.
If there is really a incompatibility with Juno, I do not expect to have a compatible release before August.
You can easily install the indigo next to the juno. So I see no reason to hurry.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: And1G on Jun 10, 2012, 01:21 am
OK, did not expect Fedora to be *that* bleeding edge. :P
I'll have a try with a parallel installation of the other Indigo release. If that does not work I'll have to stick with Verne on my notebook, despite the severe graphics incopatibilities with my notebook which are fixed in Beefy Miracle...
Thanks for your information!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: brownerthanu on Jun 12, 2012, 01:02 am
I've run into another problem while installing the plugin that I'm hoping you can help with. The symptom I am seeing now is that when I try to upload to the board I get the message: "Serial port ____ already in use. Try quitting any programs that may be using it"

This occurs even if I have recently rebooted and there are no other programs running. After I dismiss the error message dialogue box, it appears to upload properly and I get the following output from avrdude:

Code: [Select]
Launching /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -patmega328p -carduino -P/dev/tty.usbmodemfa131 -b115200 -Uflash:w:test.hex:a -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf
Output:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
        To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "test.hex"
avrdude: input file test.hex auto detected as Intel Hex
avrdude: writing flash (466 bytes):

Writing | ################################################## | 100% 0.08s

avrdude: 466 bytes of flash written
avrdude: verifying flash memory against test.hex:
avrdude: load data flash data from input file test.hex:
avrdude: input file test.hex auto detected as Intel Hex
avrdude: input file test.hex contains 466 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.06s

avrdude: verifying ...
avrdude: 466 bytes of flash verified

avrdude done.  Thank you.

avrdude finished


No errors, however by the behavior of the board, it's clear that it was not properly programmed. Here is the output from the Eclipse Error Log:

Code: [Select]
Failed to handle Com port properly
Serial port /dev/tty.usbmodemfa131 already in use. Try quiting any programs that may be using it
Serial port /dev/tty.usbmodemfa131 already in use. Try quiting any programs that may be using it


Any advice would be greatly appreciated!!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jun 13, 2012, 09:45 am
Hi
I have never seen this problem before. It looks like the plugin can launch the rxtx dll but fails to open the com port.
Avrdude which uses his own rxtx code succeeds in opening the port.
Basically this means that the plugin can not reset arduino before upload. As most boards are reset by avrdude now this is less of a problem.
It also means that in the latest version you won't be able to use the serial monitor; which may be a bigger problem.

A question: when you select the board and com port; are the com ports of your system listed?

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: brownerthanu on Jun 21, 2012, 11:44 pm
I don't know what the problem was exactly, but I got it working by reinstalling. Actually, I think it might have been user error. I think it's likely that I had not re-compiled the current project and was successfully uploading and older version. Thanks a lot for your help!
Title: Re: Arduino Eclipse Plugin <Update>
Post by: wolberine on Jul 08, 2012, 11:23 pm
Hi

I've been unable to get the Eclipse plug-in to work with the Ethernet WebClient example in Arduino 1.01.  Is there a trick to adding libraries that I might be missing?

So far, I copy the Ethernet WebClient example directly to Eclipse and I do not include the SPI.h and Ethernet.h headers in the .cpp file.  I put the headers into the .h file for the project.  I then import the SPI and Ethernet libraries into the project.  I then try to compile the example and I am unable to do so.

Thanks for any help,
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jul 08, 2012, 11:27 pm
have you followed the instructions on http://eclipse.baeyens.it/UsethePlugin.html (http://eclipse.baeyens.it/UsethePlugin.html)
Note that the new version has a better import option. See the video linked to at the bottom of http://eclipse.baeyens.it/ (http://eclipse.baeyens.it/)
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: ghps on Jul 17, 2012, 05:20 pm

Juno is not jet officially released.
I want first to release a version that includes a serial monitor (nearly finished)
Then I'll probably look at juno support when doing other things.
If there is really a incompatibility with Juno, I do not expect to have a compatible release before August.


I'm also interested in updating from Indigo to Juno.
It would be very nice if you could give a hint when it's safe to switch to Juno.
Since your plugin has become so essential...

And perhaps: Is there a way to upgrade without installing everytime again from scratch?
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jul 17, 2012, 07:48 pm
ghps

I'm also interested in updating from Indigo to Juno.

Can you tell me what would make your life more interesting with Indigo? I ask because I havn' had time to look into Juno


It would be very nice if you could give a hint when it's safe to switch to Juno.

I'm a bit overloaded right now. I'm expecting to be able to work on it starting august.  I plan first to make a version which works with Leornardo (I found out today it doesn't work and it seems easy to fix)


Since your plugin has become so essential...

Thanks for the compliment.


And perhaps: Is there a way to upgrade without installing everytime again from scratch?

I do not quite understand this remark. What do you mean with installing from scratch?
Normally the upgrade and installation goes quite easy. Someone who works with eclipse regularly and has done it before can do it in less than 10 minutes.
As this is an new eclipse it is a bit more work but you should be able to reuse your workspaces which means you only need to install Juno c++ version and the plugin and open your workspace an off you go.

Please let me know:
Why Juno?
What is time consuming to you when upgrading the plugin.

Best regards
Jan


PS Switching to juno for me is lots more work as I also need the java development environment and the eclipse and CDT development environment and I need to keep both environments up to date for bugfixing.

Title: Re: Arduino Eclipse Plugin <Update>
Post by: RogerParkinson on Jul 19, 2012, 01:14 am
Jantje,

I tried the Eclipse AVR plugin and ran into problems, then spotted yours. It installed and compiled cleanly for me. So all good so far, thanks.

However my target platform is ATTiny85 (and also Teensy but that isn't my immediate focus). I found the option to specify the board under Arduino->Arduino,
and there is also an option to specify the Target Hardware. The two options don't match, ie the list under 'board' is quite small (and doesn't include ATTiny).
The list under Target Hardware/MCU Type seems to be derived from the conf file in my Arduino dir.

Can we have some explanation of just how the 'board' and the 'MCU Type' are used? I guess they end up as compiler options?

Thanks
Roger
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Jul 19, 2012, 04:48 pm
Roger
My plugin is based on the AVR plugin. My plugin started as a layer on top of the AVR plugin. So strongly simplified my plugin reads the boards.txt from arduino and sets the AVR plugin settings accordingly.
Next to that it also sets lots of "default" settings for Arduino and it adss -more and more- .

On ATTiny85 and Teensy read the following 2 faq (note I used WINAVR but I mean AVR plugin)
http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#WINAVR (http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#WINAVR)
http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#2Locations (http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#2Locations)

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: RogerParkinson on Jul 26, 2012, 12:03 pm
Thanks, Jantje, I have it working now and it was simpler than I expected.
I edited the ATTiny info into boards.txt
The ATTiny info I was using has semicolons (;) in the description of the board and that caused a problem
so I had to edit out the semicolons. I also had my ATTiny source files (eg Arduino.h etc) in a directory that
is not under <arduino>/hardware/arduino/cores so I created a link from cores to the correct dir,
there are other ways to make that work but that was my approach.
With that in place the plugin generates the library project correctly for the ATTiny, and a simple program gives me a clean compile.
Roger
Title: Re: Arduino Eclipse Plugin <Update>
Post by: RogerParkinson on Jul 30, 2012, 04:47 am
I have an update on my progress with getting an Attiny building and flashing from the Bayenes plugin.
This is all working now, but I found I needed to separate my usual Arduino directory where I use the IDE, from the one I use with the plugin.
So this is just a file copy. The reason is that I needed to put a link named 'tiny' into <arduino>/hardware/arduino/cores pointing to
<arduino>/hardware/tiny/cores/tiny. With this in place the Arduino IDE no longer works.
It also means my edits of the boards.txt don't need to go into the IDE dir.
This is what I added to boards.txt
Code: [Select]
attiny85at1.name=ATtiny85 @ 1 MHz  (internal oscillator BOD disabled)

# The following do NOT work...
# attiny85at1.upload.using=avrispv2
# attiny85at1.upload.using=Pololu USB AVR Programmer

# The following DO work (pick one)...
attiny85at1.upload.using=arduino:arduinoisp
# attiny85at1.upload.protocol=avrispv2
# attiny85at1.upload.using=pololu
attiny85at1.upload.protocol=stk500v1
attiny85at1.upload.speed=9600

attiny85at1.upload.maximum_size=8192

# Default clock (slowly rising power; long delay to clock; 8 MHz internal; divide clock by 8)
# Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default value
# Divide clock by 8 internally; [CKDIV8=0]
# Brown-out detection disabled; [BODLEVEL=111]
# Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]

attiny85at1.bootloader.low_fuses=0x62
attiny85at1.bootloader.high_fuses=0xD7
attiny85at1.bootloader.extended_fuses=0xFF
attiny85at1.bootloader.path=empty
attiny85at1.bootloader.file=empty85at1.hex

attiny85at1.build.mcu=attiny85
attiny85at1.build.f_cpu=1000000L
attiny85at1.build.core=tiny

Note that there is no semicolon in the "internal oscillator BOD disabled" (though there is in the distributed version) because the plugin doesn't like it.
Also the "attiny85at1.build.core=tiny" uses the link I already mentioned.
Avrdude works fine flashing the Attiny, using a Teensy 2.0 as the ISP.

I also want to do the same thing with a Teensy. I am stil working on that.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: aquadat0r on Aug 08, 2012, 01:21 pm
Hi Jantje,

Thank you for this plugin. I have updated to Juno on Mac OSX and I am suffering form a build error.

Errors occurred during the build.
Errors running builder 'CDT Builder' on project 'Copter'.
Internal error building project Copter configuration Release
java.lang.NullPointerException
Internal error building project Copter configuration Release
java.lang.NullPointerException

Can you please assist?

John
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Aug 08, 2012, 01:28 pm
aquadat0r

please read http://arduino.cc/forum/index.php/topic,79595.msg853000.html#msg853000 (http://arduino.cc/forum/index.php/topic,79595.msg853000.html#msg853000)

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Ken_C on Aug 08, 2012, 04:07 pm
Jantje,

One of the few nice features in the Arduino IDE is the handling of new boards. We drop a 'hardware' tree in the users Arduino directory and those boards are automaticly showing up in the boards available in the IDE. But it seems the only way to see new boards for the plugin is to edit the IDE master boards.txt. But also seem to have to merge other parts into the Arduino IDE space so the referenced parts are also in the right paths. It would be nice if the plugin could see the tree in the local space and do the merge of the parts too.

Or is that one of those things that Eclipse doesn't do well?? I was looking over many of the posts here and didn't spot mention of that 'system' and 'user' board merge feature difference.

My use of the plugin is for the OpenLCB/NMRAnet project. A number of people who are part of that also use Eclipse for the Java side in the jmri.org project and figuring out how we can share a common environment is what I'm playing with right now. One being Java and the other being C/C++ these are totally different workspaces, but Eclipse would be great to use for both projects.

Hoping to hear your thoughts on this,
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Aug 10, 2012, 12:59 am
Ken
Is there some doc that explains the feature that you describe?
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Aug 19, 2012, 11:32 pm
Johan
Please don't crosspost. You posted this message on 3 different locations with 3 times different levels of details.

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: aquadat0r on Aug 20, 2012, 04:06 pm
Hi Jantje,

My apologies.

Please find attached my debug from the console during build time.

**** Build of configuration Release for project Testing ****

make all
Building file: /Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c
Invoking: AVR Compiler
avr-gcc -I"/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino" -I"/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard" -I"/Users/johansmit/Documents/workspace/Testing" -I"/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP" -D__IN_ECLIPSE__=1 -DARDUINO= -DUSB_PID= -DUSB_VID= -Wall -Os -g -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"NanodeUIP/uip/unix/clock-arch.d" -MT"NanodeUIP/uip/unix/clock-arch.d"  -c -o "NanodeUIP/uip/unix/clock-arch.o" "/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c"
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:42:22: warning: sys/time.h: No such file or directory
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c: In function 'clock_time':
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:48: error: storage size of 'tv' isn't known
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:49: error: storage size of 'tz' isn't known
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:51: warning: implicit declaration of function 'gettimeofday'
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:49: warning: unused variable 'tz'
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:48: warning: unused variable 'tv'
make: *** [NanodeUIP/uip/unix/clock-arch.o] Error 1

**** Build Finished ****

Regards,
John
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Aug 20, 2012, 05:44 pm
John

As I see it the time.h file should define some stuff. Due to the absence this generates errors later on.
If this compiles fine in the Arduino IDE there must be a different command line between the arduino IDE and eclipse.
I would advice to look at the Arduino IDE verbose build output and see the compile instruction used to compile clock-arch.c. There must be a difference in the command line. If you want me to have a closer look please post the Arduino IDE command to compile clock-arch.c.
What I can see from the eclipse output is:

Quote
-DARDUINO=

The Arduino version is unknown. This points to a problem in your configuration. Please check the windows->preferences->arduino->arduino settings. This may explain your problem.

Quote
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:

I don't know this environment but you are on a mac and you are using unix code. This may be perfectly alright but it is not a standard arduino ide installation. Currently the eclipse plugin only supports the standard Arduino IDE. If you installed extensions they may not work "out of the box".

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: aquadat0r on Aug 20, 2012, 07:29 pm
Hi Jantje,

Thank you. I do agree that it must be something to do with the command line. Please have a look at the attached Arduino IDE debug output. I do not see any compilation for clock-arch.c.

All these files come standard with the NanodeUIP library, and I do not think that I have anything out of the ordinary in my installation. I have fixed the -DARDUINO=1.01 tag as well, with no success.

It seems that the ArduinoIDE is omitting compiling the unix stuff, I just don't know why.

Perhaps you can try to build this library with your setup just by including NandodeUIP? https://github.com/sde1000/NanodeUIP
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Aug 20, 2012, 09:25 pm
John
The Eclipse plugin does not care about makefiles. It makes it's own makefilesfor each and every folder in the project.
To exclude a folder from the build: right click the folder->Resouce configurations->exclude from build and make sure release (there should ony be release) is selected.
Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: aquadat0r on Aug 21, 2012, 08:48 am

John
The Eclipse plugin does not care about makefiles. It makes it's own makefilesfor each and every folder in the project.
To exclude a folder from the build: right click the folder->Resouce configurations->exclude from build and make sure release (there should ony be release) is selected.
Best regards
Jantje


Hi Jantje,

Thank you, I excluded one or two folders and my code is now building successfully. I'm also able to upload with my serial port set as /dev/tty.PL2303-00002014 with no problems.

Next, I'm trying to get the serial monitor to work, however the port selection dropdown is empty. I tried to add this to the eclipse config but it did not work so I removed it again.

Any ideas?

Thank you
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Aug 21, 2012, 12:56 pm

Any ideas?

I updated the FAQ.
I also closed the issue you created on Github

Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: orangeLearner on Sep 16, 2012, 06:28 pm
I am using Eclipse C++ Juno as well and I successfully uploaded a blink sketch to my Arduino Nano 328. I can change the blink interval. However, it was a long and arduous setup process. I followed this tutorial (http://robots.dacloughb.com/project-1/setting-up-the-arduino-eclipse-environment-on-mac-os-x-lion/) but after the build process was finished, I believe it succeeded but it gives

Errors occurred during the build.
Errors running builder 'CDT Builder' on project 'Basic_blink_eclipse'.
Internal error building project Basic_blink_eclipse configuration Release
java.lang.NullPointerException
Internal error building project Basic_blink_eclipse configuration Release
java.lang.NullPointerException

When I want to upload, I hit the Upload to AVR button, then it complains that the serial port is in use when it really is not. I press OK then it uploads fine. Overall it works but having to click four buttons to upload code is a bit annoying.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Sep 16, 2012, 10:02 pm
orangeLearner
I'm sorry to hear you had such a hard time to install the plugin. Not sure what has cost you so much effort as most people succeed in installing the plugin in less than half an hour. Mac 64 bit with Juno is the most challenging environment though.
About the 2 remaining issues.
The error during build.
As you are running eclipse Juno you should upgrade to the latest version of the plugin. That should fix the issue. Note that you will need to create new projects as the existing ones contain "a bug" which is not cleaned.
To clear "the bug" manually see the comment of bgolenko at https://github.com/jantje/arduino-eclipse-plugin/issues/12 (https://github.com/jantje/arduino-eclipse-plugin/issues/12)

The upload problem.
This is a pure mac related problem where Peter send me a good solution.
I've added the solution to my FAQ which you can find at http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#MAC_Lock (http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#MAC_Lock)

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: pico on Sep 17, 2012, 06:36 am
Jante,

There's a thread over on the Leaflabs forum discussing using eclipse for the Maple IDE, and it occurred to me that your plug-in might be useful in that context as well:

http://forums.leaflabs.com/topic.php?id=681#post-3846

Title: Re: Arduino Eclipse Plugin <Update>
Post by: rockwallaby on Sep 17, 2012, 03:09 pm
Goede dag Jante,

Just posting in here to say a really big thank you for the work you have put in to make this plugin for Eclipse.

I have been using the standard Arduino IDE for some time now and wanted to move to an IDE that would provide more features for me.
I had looked at Eclipse a long while ago, but it was quite complicated to have it working with Arduino at that time.

So, the other day, I installed on my mac mini the 64 bit Eclipse Juno version 4.3.0 with CDT, followed by your plugin version 1.2.5.5.
The installs went well, as did the configurations once I figured out a few things.

I initially had problems with all sorts of errors coming up at build time and no hex file being made, my project uses Ethernet, SPI and TimerOne libraries.
I wanted very much that it would compile without errors, so that as I further develop my code using Eclipse as my IDE, any real problems would be highlighted, an no phantom errors.
After going carefully through my project and noticing what I had done incorrectly, I was rewarded with a successful build and could upload to a board, in this case a Freetronics EtherMega http://www.freetronics.com/collections/arduino/products/ethermega-arduino-mega-2560-compatible-with-onboard-ethernet#.UFcekmbeWfg (http://www.freetronics.com/collections/arduino/products/ethermega-arduino-mega-2560-compatible-with-onboard-ethernet#.UFcekmbeWfg).

My other platform is Linux, ubuntu, so I will in time install the same setup on there as well.

Two questions though, if I could;





I have installed CoolTerm as my serial monitor now and it seems to be a great app for any serial comms. Plus I can configure it the way I like, in terms of gui style.

Again, Jante, bedankt voor de plugin,

Paul  :)
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Sep 17, 2012, 03:33 pm
Paul
Nice to hear you like the plugin.
As to your 2 questions:
Quote
Is this something that might be rectified in your plugin at some point in the future?

it is on my big todo list. Your only impact on the priority in this list is via http://eclipse.baeyens.it/donate.html (http://eclipse.baeyens.it/donate.html)  8)

Quote
In your opinion, is this an important setting to have?

Not at all. It is just annoying that the indexer does not recognize Serial. Because of that typing "Serial."+ctrl space will not show you a list of options.
It does not impact the compiler outcome. The indexer behavior is inconsistent or hard to predict, this setting may or may not help; only the indexer may know.  ]:D
You can read more at http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#bugs (http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#bugs)

lastly: you say you use CoolTerm as serial monitor. Have you tried the one in the plugin? It allows for 3 serial connections at the same time.
See a demo at http://eclipse.baeyens.it/serial_demo.wmv (http://eclipse.baeyens.it/serial_demo.wmv) (It may take some time to load)

Best regards
Jantje


Title: Re: Arduino Eclipse Plugin <Update>
Post by: nicoverduin on Sep 30, 2013, 07:31 pm
Hi Jantje
Any idea how to use ATTINY on the ECLIPSE with the plugin? I noticed a lot of approaches but no final solution.
Excuse my ignorance.
Regards
Nico
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Sep 30, 2013, 10:54 pm

Hi Jantje
Any idea how to use ATTINY on the ECLIPSE with the plugin? I noticed a lot of approaches but no final solution.
Excuse my ignorance.
Regards
Nico

I have no experience with the attiny at all. But My guess is that the best way is to use Arduino IDE 1.5.2 and modify or add the boards.txt and platform.txt. That should make it work in the Arduino IDE and the eclipse plugin.

Best regards
Jantje
Title: Re: Arduino Eclipse Plugin <Update>
Post by: nicoverduin on Sep 30, 2013, 10:59 pm
Thanks
I'll upgrade first.
Regards
Nico
Title: Re: Arduino Eclipse Plugin <Update>
Post by: nicoverduin on Oct 04, 2013, 06:03 pm
Got it fixed. Load the ATTiny master (on github) and added the boards to the master board file and the correct folders into hardware etc. Restarted Eclipse and now I have te correct ATTIny boards supported as well. I have to add the include folders manually in properties but that is all.
Title: Re: Arduino Eclipse Plugin <Update>
Post by: Jantje on Oct 04, 2013, 07:01 pm
great
Thanks for the update
Title: Help Me
Post by: jusuchon on Jun 19, 2015, 09:37 pm
(https://drive.google.com/file/d/0ByPqrAa0tC19aHh4djRlYnBJVDA/view?usp=sharing)