Go Down

Topic: Eclipse Mars and Arduino 1.6.5 (Read 6133 times) previous topic - next topic

Roger_Woollett

I have been trying to use Eclipse Mars with the Arduino V2 addin. So far I have found this:

There is no make in arduino 1.6.5 so copy from an older version
I copied make.exe from <arduino1.0.5>/hardware/tools/avr/utils/bin
to <arduino1.6.5>/hardware/tools/avr/avr/bin

Create a new sketch and put these lines in the cpp file
   pinMode(13,OUTPUT);
   digitalWrite(13,HIGH);
They will be flagged by the editor for wrong parameters.
This is because the editor has found arduino.h but not
the standard C++ headers.

Open the project properties and go to C/C++General/Paths and Symbols
In the includes tab click C++ and add
<arduino>\hardware\tools\avr\lib\gcc\avr\4.8.1
and then
<arduino>\hardware\tools\avr\avr\include
Note that the order is important.
This should fix the editor errors

If you try to build make will not find the compiler
Go to project/properties/c-c++build/environment
Add A.RUNTIME.TOOLS.AVR-GCC.PATH with value <arduino>/hardware/tools/avr

and now to make upload word add
A.TOOLS.BOSSAC.PATH with value <arduino>/hardware/tools/avr

Unfortunately you have to do the path and environment changes for each new project. Does anyone know a way to make all new Arduino projects have these changes?

Also I have only tested on very simple programs. There may be other snags I have not found yet.

Roger_Woollett

Further testing has shown that it is not neccessary to add the includes. Just do a build and they will be found. It is necessary to copy make.exe and add the environment variables. I should have said that I am using Windows Vista.

geebee3xx

Hi

I am also trying to get this running on windows 8.1 64 bit, arduino 1.6.5-r5 and eclipse mars. Following the advices given above on Project/Build all make.exe crashes. It was copied from version 1.0.6. Has anyone also tried or even succeeded in installing and using the arduino plugin in eclipse mars ?

Roger_Woollett

I have it running on Windows 10 64bit. I copied make.exe to hardware/tools/avr/bin and hardware/tools/avr/avr/bin. Also I set the environment variables as user environment variables rather than in Eclipse - they have a habit of disappearing in Eclipse.
When you say it crashes what do you see in the console window?

geebee3xx

The console window is quite "clean" :

Quote
23:26:07 **** Incremental Build of configuration Release for project qqq ****
make all

23:26:13 Build Finished (took 5s.781ms)
What confuses me are the numerous environment and path variables to be set all over the place. Right now the problems window lists :
Quote
Invalid project path: Duplicate path entries found (/qqq [Include path] isSystemInclude:true includePath:C:/Program Files (x86)/arduino-1.6.5-r5/hardware/tools/avr/avr/include), path: [/qqq]. qqq pathentry Path Entry Problem

Roger_Woollett

Not sure I can help with that. There are certainly a lot of environment variables set within Eclipse but as far as I can remember the only ones I have had to change are the ones I quoted. I can only suggest you look at the windows variables and see if there are conflicts with the ones set in Eclipse.

Jantje

Hello
Jantje here (The guy who writes the plugin)
I'm not sure whether you use the nightly build or the lastest stable. From some comments it looks like you are using the last stable. For instance the missing A.RUNTIME.TOOLS.AVR-GCC.PATH

If so: you should know this: Arduino has come a long way since the latest stable release. For instance arduino IDE 1.6.5 added a completely new boards manager which invalidates the assumptions used in the latest stable. We are currently

As to the bunch of environment variables. I know there are lots of environment variables but you should not have to care because that is the internal workings of the plugin.
Basically the boards.txt and the platform.txt are converted to environment variables and then I add my own stuff to link it all up.
If you want to know more about it see
Code: [Select]
http://blog.baeyens.it/#post22

For windows user having the make issue. on this page
Code: [Select]
http://eclipse.baeyens.it/installAdvice.shtml in the windows comments, I advise to install mingw core component and copy cmake.exe to make.exe and add mingw/bin to the path. (I'm planning to make a video about that but time is missing)

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 -

Roger_Woollett

Thanks for that Jantje. Yes I am using the latest stable release. It works for me - I am only really playing so I will stick with it until the next stable release. If/when I start a real Arduino project I will think again.
Thank you for all your work.

geebee3xx

I repeated the installations, using the latest stable eclipse (mars, 64 bit for windows ) and the lower link in
Quote
http://eclipse.baeyens.it/stable-win.html
which gives version 2.2.0.1. In the earlier try I followed some advice to copy make.exe from a legacy arduino version into the folder where eclipse.exe is in. He did find this and tried to execute.
 I just  installed cygwin as adviced ( cygwin64, respectively ). Could anyone please go into a bit more detail what is meant by
Quote
To install make you can install make from cygwin (only install make and the core components) and add the C:/cygwinXXX/bin folder to your path.
on
Quote
http://eclipse.baeyens.it/installAdvice.shtml
. I am not sure if Project - Properties - C/C++ Build Environment is the right place to put hands on.

Thanks

Roger_Woollett

I have not installed cygwin and it appears to worh fine.

Jantje

you can not use the latest stable with Arduino IDE 1.6.5
Make may or may not be installed on your system. You only need to install it if it is not installed.
Mac and linux have "standard install options" for make.
Windows users can install make from mingw or cygwin or simply download ftp://ftp.equation.com/make/32/make.exe and place it in the path of your system.
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 -

Roger_Woollett

> you can not use the latest stable with Arduino IDE 1.6.5

Jantje - You obviously know far more about this than I do but I appear to be doing just that. I have a very small program that flashes the pin 13 LED and am using an Arduino UNO. Build and load appear to work.

geebee3xx

A bit of further testing showed Build project works if make.exe is copied into <arduino>/hardware/tools/avr/bin or into<eclipse> directories. This works if make.exe is used from either arduino 1.0.6 or cygwin. On my system upload fails for some reason
Quote
Starting upload
using arduino loader


Launching /bin/avrdude -C/etc/avrdude.conf -patmega328p -carduino -P COM11 -b115200 -D -Uflash:w:C:\Users\whoami\workspace\qqq/Release/qqq.hex:i
Output:
upload failed
(in the workspace project folder I do not see any .hex file, project name is qqq,setup and loop functions are empty since I only want to test verification, build and upload processes ). Furthermore, I observed a variable A.RUNTIME.TOOLS.AVR-GCC.PATH disappear in Properties/C/C++Build.  Adding it again solved this issue for the moment. ( I had copied the value of PATH and other variables it is composed of into a text file in order to analyse and understand it.)

If the remaining issues are related to arduino version 1.6.5-r5  I will test later. Behaviour is similar for both UNO and Mega2560.


Roger_Woollett

To get make to work you have to set A.TOOLS.BOSSAC.PATH (see my original post). I also found that if I set environment variables in Eclipse they disappeared when the project settings were changed. To fix this set them in Windows. In Windows10 type env in the search box and then select "edit environment variables for your account" You can then add the two variables you need and they will be permanent.

Roger_Woollett

> To get make to work
My mistake - I mean upload.

Go Up