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)"
ARDUINO = 100__AVR_ATmega328P__ = 1 (or whatever chip you are using) in GCC and/or G++__IN_ECLIPSE__ = 1 (more on this later)
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
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:
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=57011A 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=34734It 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!
If you can't debug projects then why use eclipse? Seems like a lot of effort for no gain?
Ty, regretably I don't. If you can't debug projects then why use eclipse? Seems like a lot of effort for no gain