Go Down

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

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 -

ccko

Thanks for your help

I change the arduino installation path.

right now, the error message  as below.


make all
Building file: ../.ino.cpp
Starting C++ compile
"D:/Arduino/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-g++" -c -g -Os -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -mcpu=cortex-m3 -DF_CPU=84000000L -DARDUINO=156-r2 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Due"' "-ID:/Arduino/hardware/arduino/sam/system/libsam" "-ID:/Arduino/hardware/arduino/sam/system/CMSIS/CMSIS/Include/" "-ID:/Arduino/hardware/arduino/sam/system/CMSIS/Device/ATMEL/"   -I"D:\Arduino\hardware\arduino\sam\cores\arduino" -I"D:\Arduino\hardware\arduino\sam\variants\arduino_due_x" -MMD -MP -MF".ino.cpp.d" -MT".ino.cpp.d" -D__IN_ECLIPSE__=1 -x c++ "../.ino.cpp"  -o  ".ino.cpp.o"   -Wall
In file included from ../.ino.cpp:15:
../test.ino: In function 'void setup()':
../test.ino:2: error: redefinition of 'void setup()'
../.ino.cpp:7: error: 'void setup()' previously defined here
../test.ino: In function 'void loop()':
../test.ino:8: error: redefinition of 'void loop()'
../.ino.cpp:10: error: 'void loop()' previously defined here
make: *** [.ino.cpp.o] Error 1

Jantje

can you share the files test.ino and .ino.cpp?
Do you use the product or the plugin?
Which version did you install ?
Which os are you running?

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 -

ccko


can you share the files test.ino and .ino.cpp?
Do you use the product or the plugin?
Which version did you install ?
Which os are you running?

Best regards
Jantje




OS: WIN 7 64bit
case 1: Eclipse Juno sr2 (use nightly plugin)
case 2:  win64.2014-07-01_02-06-34.tar.gz
Adruino 1.5.6-r2

case 1 and case 2 display same error message.

I just create a empty sketch named "test" and not edit it yet.


thank you.


Add project file as attacment

Jantje

funny
I just build win64.2014-07-01_02-06-34.tar.gz  because when testing the due build, I noticed there was a error introduced in the due build due to issue34.
But the error was at link time not at compile time (like in your case).

So win64.2014-07-01_02-06-34.tar.gz  should get you to a build due sketch.

Note that you are using the "nightly build" which means you are at the "bleeding edge" or "things have not been tested in depth"
If you want to be sure it works you should take the latest stable. In your case at the time of writing that is http://eclipse.baeyens.it/download/product/V2.2_win64.2014-01-19_15-16-30.tar.gz
If you are new to the tool please start using the latest stable version.
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 -

ccko

Thanks, stable version works fine for me.

when I use Serial.begin(9600)

it display error message as below

error: 'Serial' was not declared in this scope




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 -

ccko


Thanks, stable version works fine for me.

when I use Serial.begin(9600)

it display error message as below

error: 'Serial' was not declared in this scope






If I don't run the batch file in the last of http://eclipse.baeyens.it/installAdvice.shtml.

Serial.begin(9600) will verify success.

is it necessary to run the batch file?

Thank you.

By the way, when declare
USBHost Usb; ( I add arduino libaraies path at C/C++ General ->Paths and Symbols)

Eclipse will display warning
->undefined reference to `USBHost::USBHost()'

then cause the Serial.print("some text") not work.

It means serial monitor view not print the message.

if mark "USBHost usb;" everything works fine.

Any idea how to resolve this?
Thanks for your help.

Finally, I create a libraries folder in my project and move the UsbHost related *.cpp *.h to this folder.
it works fine.
But I want to know is there any other solution?

thanks


Jantje



If I don't run the batch file in the last of http://eclipse.baeyens.it/installAdvice.shtml.


The batch file i only needed with some  libraries. Depending on the arduino IDE version it can be nearly all libraries or none.

I'm sorry but I can't make sense out of the other comments.

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 -

ccko

I include Google ADK 2012 library in the project

when verify project. it display following error message.

please give me some advices. thank you.

E:/myProgram/Arduino/hardware/arduino/sam/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a(uotghs.o): In function `UOTGHS_Handler':
uotghs.c:(.text.UOTGHS_Handler+0x0): multiple definition of `UOTGHS_Handler'
./libraries/ADK2/usbh.c.o:E:\myProgram\eclipseArduino\workspace\test\Release/../libraries/ADK2/usbh.c:684: first defined here


goranj

Hi,
I try to install Eclipse IDE for Arduino Due (ARM Cortex ATSAM3X8E uC) on Windows Vista Business, I installed Sketch 1.5.7.
I followed your instructions and installed Indigo Reliease 2.
I am stacked at step 3.6, I cannot unzipp any of the files for Windows 32 bit from this site, I tried 6 different files, and received error message
*.gz file is corrupt, CRC failure for each one.

I located Arduino plugin on 'Eclipse market' but the installation doe not work:
Error message
Cannot complete the install because one or more required items could not be found.
  Software being installed: Arduino eclipse extensions 2.2.0.1 (it.baeyens.arduino.feature.feature.group 2.2.0.1)
  Missing requirement: Arduino eclipse plugin 2.2.0.1 (it.baeyens.arduino.core 2.2.0.1) requires 'package org.eclipse.cdt.core.language.settings.providers 0.0.0' but it could not be found
  Cannot satisfy dependency:
    From: Arduino eclipse extensions 2.2.0.1 (it.baeyens.arduino.feature.feature.group 2.2.0.1)
    To: it.baeyens.arduino.core [2.2.0.1]

Any idea? Thanks very much for your help.
Regards

Jantje


Any idea? Thanks very much for your help.
Regards


Install the "Eclipse IDE for C/C++ Developers" version and try again with the marketplace.

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 -

amx1

I switched to Arduino 1.5.7 and encounter now a strange problem.

My configuration is:

OS: Ubuntu 14.04.1 32bit on VMware
Version: Luna Release (4.4.0)
Build id: 20140612-0600
latest eclipse plugin from git
Arduino Version 1.5.7

Everthing runs very nice on ArduinoMega2560 and Arduino Due. (thank you very much Jantje, the plugin is really awesome)

With the new version 1.5.7 the automatic dependency generation fails. If I modify a .cpp file everything will be recompiled and built, but if I change a header file (.h) only, it is not recognized. The systems things that nothing has to be done. I checked it within the some environment - but switching back to 1.5.6-r2 - and there works. So the dependency information must be missing somehow.

Comparing the output of the first compiler step shows that the generated "xxxx.d" files are different. With Version 1.5.6. (avr-gcc 4.3.2) the first line of the corresponding "xxx.d" file defines the dependency for "xxx.d" AND "xxx.o"  . But with the new Version 1.5.7 (avr-gcc 4.8.1)  this line contains only the "xxx.d" filename. That means that there is no definition of the dependency of the "xxxx.o" files with the new version.  I checked this manually by just typing the same commands a terminal. The output of 4.3.2. is different to 4.8.1 with identical parameters and flags!

I think the problem could be solved by editing the compiler options. The parameter of the -MT Flag should be changed from "xxxx.d" to "xxxx.o". The missing dependency of the "xxxx.d" file is not critical because it is generated automatically everytime.

I searched the source code, but did not find the corresponding code segment or parameter file to change.

Best

Axel




amx1

I solved it - google helped.

see: http://stackoverflow.com/questions/14845428/auto-dependencies-not-working-with-eclipse-cdt-c-project

for eclipse luna you have to add the settings in:

properties / c/c++ build / environment / A.COMPILER.C.EXTRA_FLAGS the string: -MT"$@"

and

properties / c/c++ build / environment / A.COMPILER.CPP.EXTRA_FLAGS the string: -MT"$@"

Now it works.

Best

Axel

Jantje

thanks for the search.
I had this problem but I assumed my workspace was getting corrupted.

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 -

Go Up