Go Down

Topic: Windows/Linux/Mac Eclipse plugin to compile and upload arduino sketches (Read 119230 times) previous topic - next topic

Jantje

Ian
Quote
LiquidCrystal is one of the standard libraries supplied with Arduino v1.0 (and earlier I believe).

You are probably very right, I didn't check as that is not my point.

Let me explain my point in more detail.
As to the first supplied image there are 2 projects. First the standard Arduino library "arduino_duemilnova_w_atme.." project (which as to the icons didn't compile at all). And then the lcdtest project that contains no subfolders (which indicates there are no library in use) and 1 ino file and 1 header.
The arduino library contains a subfolder called "standard" which indicated that this is Arduino 1.0 (This in the pin layout file)
This is how you would expect it after the creation of your first project using arduino 1.0 and without having added a library which is as to "acronym" the case.
On the second image however you see he did import the LiquidCrystal library (you can only see it under path /lcdTest/LiquidCrystal because the project explorer has been cut of )

So I can not explain:
Why I get 2 images one with a library and 1 without the library as if they are the same project without any information.
Why is the project explorer cut off in the second image
Why is the Arduino library not build (It is not that obvious to remove the build link)
Why is arduino.h not found where all other items of arduino are found. (it is common with the indexer but not with the build)


So nothing adds up and I get very little and inconsistent information. That makes me think that the poster who posted only 2 posts may not be somebody in need but someone with a second agenda. That is why I asked "Are you trying to waist my time?"

Best regards
Jantje

PS as to how I know the Arduino Library is not build
The first image clearly shows a build has run (make***). The build "out of the box" starts with building the arduino library.
The arduino library is not build because the arduino library version 1.0 contains 1 warning and there is no warning icon on the image.

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 -

krsnsk

sorry but i dont want to waste your time. i try it step by step. Now every thing is okay but only wire library gives error.

slideshow: http://img339.imageshack.us/slideshow/webplayer.php?id=64902364.png



Jantje

krsnsk
This is much better for a problem analysis. Some description of what you are doing would make it a great input. :)

On your wire library. Read the FAQ. It is in general smart to do this before posting.

However from the images you provide I conclude that your Arduino install is corrupted.
The image below shows warnings in print.h. Arduino 1.0 does not generate warnings in print.h. If you look closely you see an error on line 80.
There are only 79 lines in print.h in Arduino 1.0


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 -

arcachofo

Very good job, thanks Jantje!!!

Just a point that could be better:
Each boards.txt entry has an "build.core" field, for example for uno:

uno.build.core=arduino

This allows to add alernative cores (as i do), then it could be great that this plugin takes this in account instead of always use the "arduino" core.

A cuestion:
Do you have highlighting for arduino functions ( for example delay() )??
In other projects sometimes i have it and sometimes i haven't... the indexer looks to work ramdomly well/bad.

Best regards.

Jantje

arcachofo
Thanks for the nice words.
However I do not understand what you mean with


Just a point that could be better:
Each boards.txt entry has an "build.core" field, for example for uno:

uno.build.core=arduino

This allows to add alernative cores (as i do), then it could be great that this plugin takes this in account instead of always use the "arduino" core.

I am using boards.txt as an input and I apply the parameters where I think they should be. Maybe I missed some place?


A cuestion:
Do you have highlighting for arduino functions ( for example delay() )??
In other projects sometimes i have it and sometimes i haven't... the indexer looks to work ramdomly well/bad.

The indexer is a ....(sensored)..
You can read more about how to get it to work on my faq page http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm. However I found out lately that also adding "cstdio.h"  to the "files to index upfront'" -as described in the faq -fixes the Serial problem.
Please let me know if this one works for you.
Highlighting arduino functions wil probably not work. I don't see any reason to do so as arduino functions are functions like any other function. There is probably a plugin that will help you to do so.
Did you know that you can always use autocomplete (CTRL + space) on all words (that is C C++ Arduino, libraries  and your code to name some).
You can a CTRL click and go to the implementation (also of the arduino code)
And hovering over a function shows you the code as well.

Please let me know about cstdio.h
Best regards
Jantje

PS I'm currently working on a new version with of improved functionality.
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 -

arcachofo

Thanks for the fast reply!!

First i forgot to say i'm using Ubuntu 10.04 and Eclipse IDE for C/C++ Developers, Version: Indigo Service Release 2
And your plugin worked perfectly at first try, just tested a blinkled.

Quote

I am using boards.txt as an input and I apply the parameters where I think they should be. Maybe I missed some place?


Maybe im not using the pluging correctly, let me explain what i'm doing:

There is the folder: arduino-1.0/hardware/arduino/cores/ where we can add other cores than original arduino, for example i'm using arduino-lite and have some other custom modifications in other cores, so i have these folders:

arduino-1.0/hardware/arduino/cores/arduino
arduino-1.0/hardware/arduino/cores/lite
arduino-1.0/hardware/arduino/cores/fast
...

I added new boards for this cores, for example for using "lite" core with mega1280:

##############################################################

megalite.name=Arduino Mega (ATmega1280) LITE

megalite.upload.protocol=arduino
megalite.upload.maximum_size=126976
megalite.upload.speed=57600

megalite.bootloader.low_fuses=0xFF
megalite.bootloader.high_fuses=0xDA
megalite.bootloader.extended_fuses=0xF5
megalite.bootloader.path=atmega
megalite.bootloader.file=ATmegaBOOT_168_atmega1280.hex
megalite.bootloader.unlock_bits=0x3F
megalite.bootloader.lock_bits=0x0F

megalite.build.mcu=atmega1280
megalite.build.f_cpu=16000000L
megalite.build.core=lite
megalite.build.variant=lite

##############################################################

So selecting this board should compile the core library from the sources located at:
arduino-1.0/hardware/arduino/cores/lite

As said in boards.txt:
megalite.build.core=lite

In the Arduino IDE this works ok, but this plugin looks to always build the lib from: arduino-1.0/hardware/arduino/cores/arduino.
I just created a new arduino-1.0 folder and replaced the original arduino core files by the "lite" ones and works properly, so this is not a big problem, but i think the correct behavior is build the proper core lib marked in "board.build.core" field.


Quote
The indexer is a ....(sensored)..
You can read more about how to get it to work on my faq page http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm. However I found out lately that also adding "cstdio.h"  to the "files to index upfront'" -as described in the faq -fixes the Serial problem.
Please let me know if this one works for you.


I will have a look and tell you...

Quote
Highlighting arduino functions wil probably not work. I don't see any reason to do so as arduino functions are functions like any other function. There is probably a plugin that will help you to do so.


Well.. it (sometimes) worked for me (i mean highligting function calls).


Quote
Did you know that you can always use autocomplete (CTRL + space) on all words (that is C C++ Arduino, libraries  and your code to name some).
You can a CTRL click and go to the implementation (also of the arduino code)
And hovering over a function shows you the code as well.


Yes!! this (an others) is the reason i like eclipse.
I also added a few autocompletion for digitalWrite, pinMode  an others, for example:

"dwh + ctrl-space" expans to:
digitalWrite(  |, HIGH );

"dwl + ctrl-space" expans to:
digitalWrite(  |, LOW );

Jantje


arduino-1.0/hardware/arduino/cores/arduino
arduino-1.0/hardware/arduino/cores/lite
arduino-1.0/hardware/arduino/cores/fast
...


I only have "arduino-1.0/hardware/arduino/cores/arduino" how do you get these other folders? What is the use of those?

If I understand it correctly you want me to use the value defined in the board.txt for var megalite.build.core as the subfolder in /hardware/arduino/cores/.
This should not be a real problem but it is currently "hardcoded" as arduino.
I need a setup however to test this and therefore I would like some more info about this as I like knowing what I do.
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 -

arcachofo

Quote
I only have "arduino-1.0/hardware/arduino/cores/arduino" how do you get these other folders? What is the use of those?


Yes, arduino comes just with one "core", but is possible to add other cores, i'm using arduino-lite, that is an alternative to original arduino ( more info: http://www.robopeak.net/blog/?p=131). Then i added arduino-1.0/hardware/arduino/cores/lite folder that contains arduino-lite.

arduino-1.0/hardware/arduino/cores/fast  contains  a custom core based on arduino and lite, that is: my own variant.

So is possible add new cores and use it, that's the reason to the "board.build.core" entry in boards.txt : the user can choose wich core should be build for that board. And that is the reason to the folder "cores".

That is the way that arduino IDE works, and is a very useful feature, so you can use existing alternatives or create/customize your own variants.

Quote
If I understand it correctly you want me to use the value defined in the board.txt for var megalite.build.core as the subfolder in /hardware/arduino/cores/.

Yes, that is the original use of that entry, if you want your plugin to work like Arduino IDE, this is the way.


Quote
I need a setup however to test this and therefore I would like some more info about this as I like knowing what I do.

Of course, to do a fast test you can copy arduino-1.0/hardware/arduino/cores/arduino to (for example) arduino-1.0/hardware/arduino/cores/test, then insert some sintax error for example in: arduino-1.0/hardware/arduino/cores/test/Arduino.h, then create a new board in boards.txt that uses "test" core, for example (based on mega1280):

##############################################################

testboard.name=TEST BOARD

testboard.upload.protocol=arduino
testboard.upload.maximum_size=126976
testboard.upload.speed=57600

testboard.bootloader.low_fuses=0xFF
testboard.bootloader.high_fuses=0xDA
testboard.bootloader.extended_fuses=0xF5
testboard.bootloader.path=atmega
testboard.bootloader.file=ATmegaBOOT_168_atmega1280.hex
testboard.bootloader.unlock_bits=0x3F
testboard.bootloader.lock_bits=0x0F

testboard.build.mcu=atmega1280
testboard.build.f_cpu=16000000L
testboard.build.core=test
testboard.build.variant=mega

##############################################################

Compiling some sketch for board "Arduino Mega (ATmega1280)"   (in Arduino IDE)  should compile ok (if no errors in sketch).
Compiling same sketch for the board "TEST BOARD"  (in Arduino IDE) should get the error you introduced in cores/test/Arduino.h .

Anyway is your choice evaluate if this will be useful for someone else than me, even when the original arduino IDE works this way.
I could also do the necessary changes to the plugin if you give me a hand.

Thanks for your atention and have good day.

arcachofo

About indexer... still messed up with this issue, adding Arduino.h to "files to index up-front" solved some false bug icons, but Arduino.h include didn't show any error...  ??
Also added cstdio.h, but not sure if this is doing something, i can't reproduce errors, looks just random.
Sometimes right-click project and index-Update_with_modified_files solve errors.

About the ghost highlighting, an example:
Here the delay() is not highlighted, but the glcd functions are:


I did this screenshot bcos i had the n_5110_lit project configured for "Metaboard LITE" board, but in the includes i had the atmega include from previous project, not sure if a plugin error or what, when i double-check this i'll tell you.


Here, i deleted the core lib project (testing about weird includes) and sudenly had delay() highlighted.. ??


arcachofo

For serial terminal in eclipse i'm using this plugin:

http://download.eclipse.org/releases/indigo/
    Mobile and Device Developement
        Target management terminal

Adding view at botom panel: Window-show_view-Other-terminal

It can send(single typing or lines) /receive text , configure port/baud, open several connections...

Perhaps it can be useful for somebody.

Regards.

Jantje

I'm currently beta testing my own Serial monitor.
I'll look into using the value defined in the board.txt for var megalite.build.core as the subfolder in /hardware/arduino/cores/.
But don't expect it soon as my robot needs so much time.
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 -

arcachofo

Quote
I'll look into using the value defined in the board.txt for var megalite.build.core as the subfolder in /hardware/arduino/cores/.
But don't expect it soon as my robot needs so much time.

Don't worry too much about it, now i have a complete arduino instalation for each core and just change path in preferences-Arduino, so i have it working and looks that this is not very useful for most users.

Have tested the plugin with several small projects and it works very well.


Best regards.

Jantje


[Don't worry too much about it, now i have a complete arduino instalation for each core and just change path in preferences-Arduino, so i have it working and looks that this is not very useful for most users.

Given CDT's behavior with changing this stuff I get even more nervous.
A better solution is as follows:
Modify the board file (as you probably did)
Create a project with your "TEST BOARD".
Go into the "TEST BOARD" project delete the core folder (you first have to right click the arduino folder -> resource configurations->exclude form build because CDT .... -see my fact for more details-)
and then use the import wizard to import the "test" folder under /hardware/arduino/cores/ in your "TEST BOARD" project.
This is exactly the same as the fix will do in the future.
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 -

arcachofo

Quote
A better solution is as follows:
Modify the board file (as you probably did)
Create a project with your "TEST BOARD".
Go into the "TEST BOARD" project delete the core folder (you first have to right click the arduino folder -> resource configurations->exclude form build because CDT .... -see my fact for more details-)
and then use the import wizard to import the "test" folder under /hardware/arduino/cores/ in your "TEST BOARD" project.
This is exactly the same as the fix will do in the future.


Yes.. good solution. Thanks.

And1G

Hello,

I'm just wondering if it's possible to use the AVR Dragon with you plugin. I have not found an option but is it somehow possible to use the Dragon as an ISP?

Go Up