Pages: 1 ... 4 5 [6] 7 8 ... 13   Go Down
Author Topic: Arduino Eclipse Plugin <Update>  (Read 57824 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Edison Member
*
Karma: 58
Posts: 1742
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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/)? 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.

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.

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)


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
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Belgium
Offline Offline
Edison Member
*
Karma: 58
Posts: 1742
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Belgium
Offline Offline
Edison Member
*
Karma: 58
Posts: 1742
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

United kingdom
Offline Offline
Full Member
***
Karma: 0
Posts: 108
just think how much free time you would have if everything worked first time!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Will this plug enable eclipse to debug arduino projects?
Logged

Kind Regards,
Sy

Belgium
Offline Offline
Edison Member
*
Karma: 58
Posts: 1742
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

United kingdom
Offline Offline
Full Member
***
Karma: 0
Posts: 108
just think how much free time you would have if everything worked first time!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: January 23, 2012, 03:07:20 pm by SPlatten » Logged

Kind Regards,
Sy

Belgium
Offline Offline
Edison Member
*
Karma: 58
Posts: 1742
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Splatten
If you try again with eclipse try my plugin. Lots easier than the winAVR approach.
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

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.
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

United kingdom
Offline Offline
Full Member
***
Karma: 0
Posts: 108
just think how much free time you would have if everything worked first time!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Kind Regards,
Sy

Belgium
Offline Offline
Edison Member
*
Karma: 58
Posts: 1742
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

SPlatten
You must have missed the top of the page  smiley-wink
Best regards
Jantje
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 29
Posts: 1074
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

United kingdom
Offline Offline
Full Member
***
Karma: 0
Posts: 108
just think how much free time you would have if everything worked first time!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ty, I'll have another go this weekend.
Logged

Kind Regards,
Sy

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Belgium
Offline Offline
Edison Member
*
Karma: 58
Posts: 1742
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Pages: 1 ... 4 5 [6] 7 8 ... 13   Go Up
Jump to: