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/
)? The latest version (1.1.7)? Did you use the installation instructions available at 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.
Problem #1:You must install the C++ version of eclipse
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.
. 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)
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.
"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.
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
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:
All of this is set automatically. Not sure why it didn't happen for you.
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".
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.
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)
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.
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.