Pages: 1 ... 12 13 [14] 15 16 ... 31   Go Down
Author Topic: Windows/Linux/Mac Eclipse plugin to compile and upload arduino sketches  (Read 98365 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Edison Member
*
Karma: 68
Posts: 1893
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a different variant file for micro and leonardo so I would not use leonardo to program a micro.
So try with arduino IDE 1.0.2 and enabled RXTX

Quote
When Disable RXTX is selected, does the plugin not try and reset the arduino?
Not at all. How do you go from "disabling RXTX" to "resetting"?
When you disable RXTX the plugin stops doing all com port actions. So no reset before upload (you have to press the reset button yourself) and no serial monitor. How can the plugin still upload? Because the plugin starts avrdude who does the com port actions.

Best regards
Jantje

PS If you fiddle around like you are; it is nice to warn the reader in advance.
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: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for taking so long to get back.

I tried upgrading to 1.0.2 and I am able to upload to the micro with RXTX enabled  However I still have to reset the micro before upload (press the reset button).

Logged

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

Nice to hear you're got it working with the reset work around.
I have a micro now but I don't get it to work on my redhat :-(
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: 68
Posts: 1893
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

For those owning a due and those wanting to use Arduino IDE 1.5.2 beta for other reasons:
I have released beta V2 that supports Arduino IDE 1.5.2. beta.
Read more at http://blog.baeyens.it/#post4

If you do not need Arduino IDE 1.5.2 beta and you already use the plugin I advice to stick to the plugin version as described at http://www.baeyens.it/eclipse untill Arduino IDE 1.5.X is no longer beta.

For people starting with the plugin V2 can be considered.

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 -

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Jantje, thank you very much for your great plugin!

I have tested it successfully with gentoo linux now. My environment:

Portage 2.1.11.55 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.7.10-gentoo x86_64)
dev-util/eclipse-sdk-3.7.1-r11 (Indigo, seden overlay)
dev-embedded/arduino-1.0.3-r1
dev-java/icedtea-bin-7.2.3.6
sys-devel/crossdev-20120721 ('-r1' include my local patch for using multilib on AVR's)
-->cross-avr/avr-libc-1.8.0
-->cross-avr/gcc-4.6.3
-->cross-avr/binutils-2.20.1-r1
dev-embedded/avrdude-5.11.1 ('-r1' include my local patch for higher timout in case of manual reset)
!!But for my very first tests avrdude is used from Arduino-IDE!!
Arduino Eclipse Extension 1.2.4 installed via "http://www.baeyens.it/eclipse/update"

Arduino NG rev.c (tested with Blink.cpp und DoubleCounter.cpp)
Arduino Mega2560 rev. 1 (tested with Blink.cpp und DoubleCounter.cpp)
Arduino Pro Mini328 5V/16MHz (not tested yet)

For some further improvements for linux users here example entries for udev rules (will always get device "/dev/arduino"):
#Bus 005 Device 004: ID 2341:0010 Arduino SA Mega 2560 (CDC ACM)
#ATTRS{manufacturer}=="Arduino (www.arduino.cc)"
#ATTRS{product}=="Arduino Mega 2560"
SUBSYSTEMS=="usb", ATTRS{product}=="Arduino Mega 2560", ATTRS{manufacturer}=="Arduino (www.arduino.cc)", NAME="ttyACM%n", SYMLINK+="arduino"

#Bus 005 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
#ATTRS{manufacturer}=="FTDI"
#ATTRS{product}=="FT232R USB UART"
SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{manufacturer}=="FTDI", NAME="ttyUSB%n", SYMLINK+="arduino"

Good Luck, Thomas
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Now I have made some pictures of my running configuration (gentoo linux) to share with you, because I have found only pictures from Windows's and Mac's. Eventually someone could need this to getting started on linux.

Good Luck, Thomas


* ConfigArduino.png (67.25 KB, 1052x842 - viewed 34 times.)

* ConfigAVRDude.png (58.85 KB, 1050x843 - viewed 33 times.)

* ConfigPaths.png (54.69 KB, 1049x843 - viewed 29 times.)
Logged

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

Thomas
Thanks for the feedback and sharing the images.
For those watching the images. With version 2 of the plugin only the first image is valid. The other configuration pages originated from avrEclipse and no longer exist in V2.

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 -

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Jantje, after some further playing around I have some questions and suggestions.

1.) Is there a possibility to configure the name of the automatically generated library f.e. "Arduino_Mega_2560_or_Mega_ADK" --> I would prefer the name "000b_ArduinoMega2560_Core". This will force the libraries to be listed on first position, before all other projects.

2.) Using "Serial Monitor View" give me only "/dev/ttyS0" (instead of "/dev/ttyACM0"), but "/dev/ttyS0" up to "/dev/ttyS3" is already in use on my linux box (eventually on all gentoo linux systems). Is this configurable or hard coded? Eventually you could add "/dev/arduino" in the search list? Than linux users could map any device using the udev rules to "/dev/arduino".

3.) Arduino-Configuration page, renaming suggestion: "test serial dll" --> "test serial library (rxtx)" would be better understandable for linux, mac and windows users

Again, Thank you for the great work! I had fiddling around with the old AVR-Plugin two days without success. Your's worked after 1 hour.

Let me know how I can help you improving the plugin.

Some ideas:
-testing with gentoo (at the moment only indigo is possible)
-write an wiki for gentoo users --> http://en.gentoo-wiki.com
-make some usability test (I'm an usability engineer) --> create issues at git
-translation to german language
-make some small bugfixes
-make a donation for an picaxe  smiley-red
Logged

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

Thomas
1.) Is there a possibility to configure the name of the automatically generated library f.e. "Arduino_Mega_2560_or_Mega_ADK" --> I would prefer the name "000b_ArduinoMega2560_Core". This will force the libraries to be listed on first position, before all other projects.
Version 2 no longer has a separate Arduino project. There is a Arduino folder in each and every sketch and a library folder containing the imported libraries. If this is really important I would advice to go to V2. However this functionality relies on CDT 1.8.1 which needs Juno.
The only option I can think of is to download the code and do the mod yourself.
https://github.com/jantje/arduino-eclipse-plugin/blob/master/it.baeyens.arduino.common/src/it/baeyens/arduino/common/ArduinoConst.java
Code:
public static final String CoreProjectNamePrefix = ""; //used to be arduino_ but when chaging from MCU to board replaced by nothing
As you are using version 1.2.4 you do not want this version but the one tagged with Release 1.2.4


2.) Using "Serial Monitor View" give me only "/dev/ttyS0" (instead of "/dev/ttyACM0"), but "/dev/ttyS0" up to "/dev/ttyS3" is already in use on my linux box (eventually on all gentoo linux systems). Is this configurable or hard coded? Eventually you could add "/dev/arduino" in the search list? Than linux users could map any device using the udev rules to "/dev/arduino".
I know what you are talking about  smiley-confuse
This is actually a rxtx feature. Arduino has its own version of the rxtx dll. The problem you mention is a Linux only issue and has recently been discussed on the developers list. The only correct way to find the serial devices is to look at /dev/serial. The Arduino team is looking at https://github.com/ffissore/java-simple-serial-connector as a replacement for rxtx. I have not yet (and I'm not planning to) look at what the impact will be on the eclipse plugin.
Workaround is to add following line to your eclipse.ini file
Code:
-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0:/dev/ttyACM1:/dev/ttyACM2:/dev/ttyACM3:/dev/ttyUSB0:/dev/ttyUSB1:/dev/ttyUSB2:/dev/ttyUSB3:/dev/ttyUSB4:/dev/arduino

3.) Arduino-Configuration page, renaming suggestion: "test serial dll" --> "test serial library (rxtx)" would be better understandable for linux, mac and windows users
Is your objection against the word dll or the lack of rxtx.


Let me know how I can help you improving the plugin.

Some ideas:
-testing with gentoo (at the moment only indigo is possible)
-write an wiki for gentoo users --> http://en.gentoo-wiki.com
-make some usability test (I'm an usability engineer) --> create issues at git
-translation to german language
-make some small bugfixes
-make a donation for an picaxe  smiley-red
Help is welcome. There are however some things to keep in mind.
1) I'm not planning to release any more V1 versions (Normally Arduino IDE 1.0.3 should have been the last V1 Arduino IDE release.)
2) V2 is a complete rewrite (both for my plugin as for the Arduino IDE)
3) I have not foreseen translation functionality in the plugin.
4) Due to health constraints there is no time for me to spend on the plugin in the coming months. Even adding a picaxe donation button will have to wait.

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 -

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Jantje, Thank you for your answers!
I will test your suggestions to solve my little problems.

Quote
Q: 1.) Is there a possibility to configure the name of the automatically generated library f.e. "Arduino_Mega_2560_or_Mega_ADK" --> I would prefer the name "000b_ArduinoMega2560_Core". This will force the libraries to be listed on first position, before all other projects.
A: The only option I can think of is to download the code and do the mod yourself.
Now I have modified a little bit the file "Boards.txt" (/usr/share/arduino/hardware/arduino/) which is used to generate the names. Sketch was compilable, downloadable and seems to work.

I would advice to go to V2. However this functionality relies on CDT 1.8.1 which needs Juno.
Yes, that is an problem actually for gentoo users - unfortunately there is no official release for eclipse Juno. Also the Indigo, I'm using, is from an overlay (seden) but quite stable. For the future do you plan to separate the V1 and V2 update site or is this already the case? If yes, how to use it?

The problem you mention is a Linux only issue and has recently been discussed on the developers list.
Please can you post an link to follow this discussion.

Is your objection against the word dll or the lack of rxtx.
The word 'dll' is the name for the file extension/suffix of the library used in windows environment (Dynamic Link Library?). Linux and possible Mac users don't know about that (linux extensions are f.e. ".a", ".so" for libraries).

Even adding a picaxe donation button will have to wait.
Oh sorry, this was only a joke. I hope your answer also.

Help is welcome.
HOW can I help you? Please give me some notes.

Best regards, Thomas
« Last Edit: March 26, 2013, 03:06:01 pm by gen2thomas » Logged

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

Hey Jantje,

I don't know if it's the right place here for asking for your help, but I don't know further anymore.

When I run avrdude from within eclipse it always gives me:
 "AVRDude does not support the project target MCU [ATmega32U4]".
But on the other hand if I'm typing in the exact same command from within console it works fine
Code:
avrdude -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -Uflash:w:testSerial.hex:a

It makes no difference whether I check the box "use custom configuration file" in the avrdude preferences and giving him the right config file.
I'm using ubuntu 12.10 64 bit with an arduino leonardo.

Do you have any clue about this?

Thanks, Sh4kE
Logged

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

@SH4kE
Try
Code:
which avrdude
and see whether it is the Arduino provided avrdude you are running on the command line.
If it is not the same that explains your problem.

@gen2thomas
Quote
For the future do you plan to separate the V1 and V2 update site or is this already the case? If yes, how to use it?
V1 and V2 are on different update sites. This to avoid unwanted upgrades. V2 update site is at
http://www.baeyens.it/eclipse/V2

Quote
Please can you post an link to follow this discussion.
The discussion was/is on the Arduino developers mailing list. I do not know whether there is a HTML history version.

Quote
The word 'dll' is the name for the file extension/suffix of the library used in windows environment (Dynamic Link Library?). Linux and possible Mac users don't know about that (linux extensions are f.e. ".a", ".so" for libraries).
For me this is a typical cross platform naming discussion. I'll consider writing "Dynamic Link Library" or just "Library". We'll see what happens in 1.5.3 with rxtx.

Quote
I hope your answer also.
No joke.

Quote
HOW can I help you? Please give me some notes.
Following options you propose are very helpfull
Quote
-write an wiki for gentoo users --> http://en.gentoo-wiki.com
-make some usability test (I'm an usability engineer) --> create issues at git
Other things I could use help with are
Note that the website is on github, but I need to check whether that is the latest 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 -

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

Loving V2 so far, just ironing out a few bugs...

1.) The upload ignores build configurations and always tries to upload from the "Release" Directory no matter what build configuration is active.

2.) The only way I've got my Leonardo to work is by setting the project preferences to the bootloader com port then doing a manual reset on upload, if I use the normal com port setting, then upload resets the board (the board led starts flashing and windows re-aquirres the bootloader port) but the process then errors saying "Leonardo upload port is not appearing after reset"

3.) Currently I've not got my Due to work, compile goes fine, upload appears to work fine, but after upload the due freezes and can;t be reset, the only way to make it come back to life is to upload something from the Arduino IDE, then it will work properly - I'm still investigating this one...


As you've said your ill (Get well!) and not going to have much time, do you have V2 on Github so I could take a look?


Deeply appreciate all the work you've done and will be "buying you an arduino" when next month's paycheck comes in, as being able to work in a sensible IDE is wonderful!


Thanks in advance!


Logged

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

katekarnage
Thanks for the nice words

1.) The upload ignores build configurations and always tries to upload from the "Release" Directory no matter what build configuration is active.
I'm surprised you got it going until the upload.
I took the design decision to hard code "Release" as configuration name. Given the fact that all settings are coming from boards.txt and platform.txt I don't see the usage of more configurations and as such the configuration name is irrelevant. Can you explain your use case for having more or another configuration name?

2.) The only way I've got my Leonardo to work is by setting the project preferences to the bootloader com port then doing a manual reset on upload, if I use the normal com port setting, then upload resets the board (the board led starts flashing and windows re-aquirres the bootloader port) but the process then errors saying "Leonardo upload port is not appearing after reset"

3.) Currently I've not got my Due to work, compile goes fine, upload appears to work fine, but after upload the due freezes and can;t be reset, the only way to make it come back to life is to upload something from the Arduino IDE, then it will work properly - I'm still investigating this one...
I just tried due on Linux and tha works fine. Which os are you using?

As you've said your ill (Get well!) and not going to have much time, do you have V2 on Github so I could take a look?
It's quite some work to upload to github and I still havn't decided how I will treat V1 and V2 in github. I attached the upload code so you can have a look.
Note that I proposed a different upload definition to the arduino team so I didn't touch this code to much (and it is not top quality code)
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: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My console-version is /usr/bin/avrdude and the same goes for arduino-ide itself. But I can't set the /usr/bin/ folder in the preferences. It just tells me that it is not the right arduino-folder. I decided to clone the current arduino-ide from github and gave that folder in the settings. But then the former error appears.

Can you set /usr/bin/ as your arduino folder in the preferences?
Logged

Pages: 1 ... 12 13 [14] 15 16 ... 31   Go Up
Jump to: