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

Sh4kE
Arduino IDE and the eclipse plugin use the avrdude located at "\hardware\tools\avr\bin"
As the command line uses a different avrdude it is perfectly acceptable that the behavior is different.
On the other hand I completely fail to understand what you are trying to achieve.
Please read http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#doesntwork and say which part fails for you.
Best regards
Jante
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

Quote
G2T: 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).
JANTJE: 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.
No, this was not my intention! I'm using both (win7 at work and win7+linux at home) with more or less pros and cons of each, dependent of the task to do. The main goal was to help non windows users to understand your plugin's handling in the "usability engineers" point of few. But, yes the absence of rxtx will resolve this issue itself smiley-cool.

Quote
G2T: I hope your answer also.
JANTJE: No joke.
Ok, why not. Picaxes are inexpensive devices, but you would be missed here  smiley-cry.

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
The wiki is now available on the new gentoo wiki page: https://wiki.gentoo.org/wiki/Arduino
Feel free to send me suggestions for rework, if you don't want to do it yourself.

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

Sorry I'm not familiar with web site development. I will spend some time to measure/rate your plugin against the european norm ISO4291 (http://de.wikipedia.org/wiki/EN_ISO_9241, http://en.wikipedia.org/wiki/ISO_9241) and try to make some understandable issues on your git site. (But I'm afraid of the eclipse itself need more help on this topic than your plugin)

Have fun, Thomas
Logged

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

Thomas
Great work on the gentoo wiki. I made some small changes.
Is it really necessary to install the toolchains separately? They are included in the Linux64 bit package on arduino.cc.
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

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?


This is partially because I'm an old C/C++ programmer and have always been doing debug/release builds and have a lot of serial-emitted output dependent on a defined DEBUG and other symbols, even though, in this case I'm obviously not needing to change optomisations or debug symbol inclusion. Also I have several projects where the same arduino board is being used in a number of slightly different circumstances with a few compiletime directives to control the created code.

Build configurations are the easiest way of handling these, with adding a few -D direcetives to the compiler EXTRAFLAGS.

As, in this case there is only defines and no other changes to the compile environment, then, if this is too hard, then don;t worry as I can always sort it through altering defines in the main project header file and recompiling like that - more of a nicity really.
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?


Win7 64 bit with 32bit Eclipse Juno.

But...

I have done more investigation of this, I had an idea or 2, and have gone back to basics.

A simple blink program uploads and runs fine, so the basic upoloading is fine.

The problem seems to be when I attempt to use the Scheduler. This code will brick the Due from eclipse and need it to be reset with the arduino IDE:

TestSched.cpp:

Code:
// Do not remove the include below
#include "SchedTest.h"

#include <Scheduler.h>

int led = 13;

void setup() {
  pinMode(led, OUTPUT);
  Scheduler.startLoop(loop2);
}

void loop() {
  digitalWrite(led, HIGH);
  delay(1000);
}

void loop2() {
  delay(1300);
  digitalWrite(led, LOW);
}

TestSched.h:
Code:
// Only modify this file to include
// - function definitions (prototypes)
// - include files
// - extern variable definitions
// In the appropriate section

#ifndef SchedTest_H_
#define SchedTest_H_
#include "Arduino.h"
//add your includes for the project SchedTest here


//end of add your includes here
#ifdef __cplusplus
extern "C" {
#endif
void loop();
void loop2();
void setup();
#ifdef __cplusplus
} // extern "C"
#endif

//add your function definitions for the project SchedTest here

//Do not add code below this line
#endif /* SchedTest_H_ */

I will delve deeper into the build logs and see if I can isolate this a bit more, and check I haven;t made a galringly obvious mistake!

Thanks again for your good work!

Logged

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

Quote
This is partially because I'm an old C/C++ programmer and have always been doing debug/release builds and have a lot of serial-emitted output dependent on a defined DEBUG and other symbols, even though, in this case I'm obviously not needing to change optomisations or debug symbol inclusion. Also I have several projects where the same arduino board is being used in a number of slightly different circumstances with a few compiletime directives to control the created code.
I don't consider myself old but I have some decades of experiance in programming C/C++ myself; so I know what you are talking about.
I always had mixed feelings about not supporting multiple configurations. Now with he potential of debugging on the DUE this may become harder.
Point is however that the configuration in Arduino 1.5.X is done in 2 files ( boards.txt platform.txt) external to Eclipse. This is why I removed nearly all compiling options in V2. My current thinking is that if you want multiple configurations you have to modify the boards.txt file.
I currently see 2 options
1) adding a menu option for debug
2) adding a debug board (uno debug; mega debug ....)
Both are very easy to implement and supported by Arduino IDE and my Arduino eclipse plugin V2.
Do you think this can help you out?

I hope you can pinpoint the Due upload problem you are experiencing. (I see nothing glaringly wrong in the info)
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

Great work on the gentoo wiki. I made some small changes.
Thanks for compliment and the complements! I also made some small changes again.

Is it really necessary to install the toolchains separately? They are included in the Linux64 bit package on arduino.cc.
Now I have uninstalled the toolchain (emerge -C sys-devel/crossdev cross-avr/gcc cross-avr/binutils cross-avr/avr-libc). Than unmerge and remerge the arduino (emerge -C arduino, emerge arduino). After successfully open the IDE the compilation result in an error: 'Cannot run program "avr-g++" ...'.

For sure on gentoo the installation of an separate toolchain (f.e. with crossdev) is necessary. Btw. crossdev will be already merged as dependency of arduino.

Good luck, Thomas
Logged

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

First of all: a BIG "thank you" Jantje ! This plug-in is exatly what has been missing. After being accustomed to Eclipse-Style programming (mainly in Java), it was hard for me to type all the code and have no auto-completion, no F3 key, etc. Also compiling in the Arduino IDE takes much too long. I'm very happy you were able to implement the incremental builds. This saves so much time and it (almost) works like a charm! I installed a new Eclipse C++ (Juno) edition, installed V2beta of your plug-in and it worked fine.

There are two things I'm fighting with:
1) Using the procedure described in http://eclipse.baeyens.it/IDECompatibility.html does not work - no .o file is generated for the .ino file. This is what happens:
Code:
"Z:/development/arduino/arduino-1.5.2/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-gcc" -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -mcpu=cortex-m3 -DF_CPU=84000000L -DARDUINO=152 -D__SAM3X8E__ -mthumb -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON "-IZ:/development/arduino/arduino-1.5.2/hardware/arduino/sam/system/libsam" "-IZ:/development/arduino/arduino-1.5.2/hardware/arduino/sam/system/CMSIS/CMSIS/Include/" "-IZ:/development/arduino/arduino-1.5.2/hardware/arduino/sam/system/CMSIS/Device/ATMEL/"   -I"Z:\development\arduino\arduino-1.5.2\hardware\arduino\sam\cores\arduino" -I"Z:\development\arduino\arduino-1.5.2\hardware\arduino\sam\variants\arduino_due_x" -MMD -MP -MF"SensorOnLCD.ino.d" -MT"SensorOnLCD.ino.d" "../SensorOnLCD.ino"  -o  "SensorOnLCD.ino.o"
arm-none-eabi-gcc.exe: ../SensorOnLCD.ino: linker input file unused because linking not done
Finished building: ../SensorOnLCD.ino
Changing the file back to .cpp, calls the compiler like this (note: the g++ compiler is called instead of c++ and some parameters are different):
Code:
"Z:/development/arduino/arduino-1.5.2/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-g++" -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -mcpu=cortex-m3 -DF_CPU=84000000L -DARDUINO=152 -D__SAM3X8E__ -mthumb -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON "-IZ:/development/arduino/arduino-1.5.2/hardware/arduino/sam/system/libsam" "-IZ:/development/arduino/arduino-1.5.2/hardware/arduino/sam/system/CMSIS/CMSIS/Include/" "-IZ:/development/arduino/arduino-1.5.2/hardware/arduino/sam/system/CMSIS/Device/ATMEL/"   -I"Z:\development\arduino\arduino-1.5.2\hardware\arduino\sam\cores\arduino" -I"Z:\development\arduino\arduino-1.5.2\hardware\arduino\sam\variants\arduino_due_x" -MMD -MP -MF"SensorOnLCD.cpp.d" -MT"SensorOnLCD.cpp.d" -x c++ "../SensorOnLCD.cpp"  -o  "SensorOnLCD.cpp.o"
Finished building: ../SensorOnLCD.cpp

2) I wanted to access a LCD shield. I added the path to the library as described earlier for GNU C and GNU C++ under the tab "project properties -> C/C++ General -> Paths and Symbols -> Includes". This allowed me to work with the include files. But the LiquidCrystal.cpp did not get compiled. So I added the same path again under "C/C++ General -> Paths and Symbols -> Source Location" and added an exclusion filter for "examples" for this entry. This worked. Everything got compiled and the excutable works fine. But I'm not sure if this is the correct approach. Would it be possible for you to add a way to add such libraries under "project properties -> Arduino" (or elsewhere where it makes sense) ?

Regards,
 Michael
Logged

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

Michael
Thanks for the nice words.
As to your problems
1) I think you have defined .ino and .pde as C files and not as C++ files.
2) As you are using V2: Have you tried selecting "Arduino->Add a library to the selected project" in the menu bar?
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: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I'm trying to install the V2 to eclipse but seem that the server has problems (installed V1 without problem). Someone can check if the V2 release is installable via the url http://www.baeyens.it/eclipse/V2

Thank you.

Best regards,

inode

Logged

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

Quote
Thanks for the nice words.
Welcome, you more than deserve it!

Quote
1) I think you have defined .ino and .pde as C files and not as C++ files.
Argh, what a stupid mistake. Thanks for the support and sorry for bothering you.

Quote
2) As you are using V2: Have you tried selecting "Arduino->Add a library to the selected project" in the menu bar?
Holy smokes! No, I didn't see the menu yet. Fantastic work!

Regards,
 Michael
Logged

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

@inode
V1 and V2 are on the same server together with the web pages. All are using the same technology (HTTP). If you an read the web pages you should be able to install. I have heard of people having problems to install due to firewalls not allowing jar files.
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: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@inode
V1 and V2 are on the same server together with the web pages. All are using the same technology (HTTP). If you an read the web pages you should be able to install. I have heard of people having problems to install due to firewalls not allowing jar files.
Best regards
Jantje

First of all thank you for your work, hopeful that others people will donate to keep your project alive.

I'm working with eclipse 32 bit on windows, adding "http://www.baeyens.it/eclipse/update" to install software I can only see two version: 1.2.0 and 1.2.4 (I didn't see the 1.2.5.5). If I try to add "http://www.baeyens.it/eclipse/V2" eclipse doesn't show any package... I'm doing something wrong?

Thank you in advance
Logged

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

@inode
Do you have the settings as in the bottom part of this image from the installation instructions at http://eclipse.baeyens.it/Install.html?
I just checked on my windows machine and I can see both 1.2.5.5 and 2.0.0.18
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: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@inode
Do you have the settings as in the bottom part of this image from the installation instructions at http://eclipse.baeyens.it/Install.html?
I just checked on my windows machine and I can see both 1.2.5.5 and 2.0.0.18
Best regards
Jantje

It was my fault... I selected too "Group items by category" and so I saw the older version...

Thank you.
Logged

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

@ inode
Great to hear you got it working.
Thanks for the feedback
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 ... 13 14 [15] 16 17 ... 32   Go Up
Jump to: