Go Down

Topic: Arduino Eclipse Plugin <Update> (Read 124714 times) previous topic - next topic

Jantje

Great  :)
I nearly finished the import library wizard
Jantje
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 -

Trump211

Did you update the update site? My IDE doesn't find updates for it.

Jantje

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

Jantje

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

Klaro00

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

Klaro00

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

Jantje

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

Klaro00

Jantje
thanks for your help. I already had the current plugin version, tried your hints anyway, and now it works. *smile*

// Klaus

Spindoctor

#23
Dec 16, 2011, 09:01 pm Last Edit: Dec 16, 2011, 09:28 pm by Spindoctor Reason: 1
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 ****

Jantje

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

Spindoctor

#25
Dec 17, 2011, 01:42 am Last Edit: Dec 17, 2011, 01:51 am by Spindoctor Reason: 1
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!

Jantje

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

Spindoctor

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!

maqifrnswa

#28
Dec 18, 2011, 07:33 pm Last Edit: Dec 18, 2011, 07:46 pm by Scott H Reason: 1
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

Spindoctor

Hi Scott!

Thank you for taking care of this! It is people like you who make debian so great  8)

Go Up