Go Down

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

Headroom

Ok sorry, I explained it wrong, so let me start again.

Actual configuration:  I am running Linux mint 17 with kernel: 3.13.0
I have  arduino IDE 1.5.8, teensyduino 1.20 and eclipseArduino v2.4. I added to arduino IDE 1.5.8 all necessary files to make it work for teensy. following this tutorial:

http://trippylighting.com/teensy-arduino-ect/arduino-eclipse-plugin/installation-of-the-arduino-eclipse-ide-teensyduino-win-7/


my actual state with  TEENSY: I am able compile and upload my projects in eclipseArduino to teensy with teensybootloader - works as it should. What does not work, is compile project in arduino IDE. It returns following error:

Arduino: 1.5.8 (Linux), Board: "Teensy 3.1, Serial, 96 MHz (overclock), US English"

Cannot run program "/opt/arduino-1.5.8/hardware/teensy/teensy/tools/linux/arm-none-eabi/bin/arm-none-eabi-g++": error=2, No such file or directory

As this error says it  searches a file /teensy/teensy which,ofc, does not exists! I tried already some combinations where to save /teensy folder, but I never reached  successful compilation. I have to say this error does not bothers me, because I will never use Arduino IDE for developing. I will always use eclipseArduino which works correctly. I am giving you just information that it does not work.

my actual state with  ARDUINO DUE:

I can not upload project to arduino due(eclipseArduino arduino IDE), it writes error:
No device found on ttyACM0

I followed this tutorial: http://forum.arduino.cc/index.php?topic=148613.0
where they explain that before uploading to arduino due you have to set bound-rate to 1200 with following command:
stty -F /dev/ttyACM0 speed 1200 cs8 -cstopb -parenb

After using this command, I am able to upload ONCE my project but after,even I run again this command in terminal, I get always error No device found on ttyACM0

after executing commang ls /dev/tty* in terminal, I see that Linux see arduino due on port /dev/ttyACM0. Even lsusb sees my DUE:
Bus 003 Device 011: ID 2341:003d Arduino SA

I tryed to follows this tutorial :
http://playground.arduino.cc/Linux/All

I did not move with this error. I am not sure if I sated permissions correctly.


I hope after this explanation you will have more Ideas where is the problem on DUE + linux


Teensy/Teensyduino are not compatible with Arduino 1.5.8. You cannot even install  Teensyduino into Arduino 1.5.8 as it will not allow you to do it. If you want to use the Arduino IDE with Teensy, you need to install Teensyduino into Arduino IDE 1.0.6.
The Arduino 1.5.8 IDE is required for you to use Teensy with the Arduino Eclipse Plugin/IDE.

Also, the instructions you are referring to on my blog explain that the hardware folder can reside anywhere and does not have to be copied into the Arduino 1.5.x IDE. I personally actually avoid doing that so i don't have to redo all that when I want to test out a newer version of the Arduino 1.5.x IDE.

Headroom

I am working with the Arduino Eclipse 2.4 IDE. When I create a new project it automatically creates .ino files.

How do I turn this off in cases where I prefer to work with .cpp/.h files ?


Jantje

@headroom
In the sketch creation wizard after the page where you have selected the board you can select your "template" (cpp ino custom template or example sketch). There you can also select "use selection as default".

Note that when you have selected a example setting the default will not save the example sketches you have selected. Only that you want to start from an example.

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 -

Headroom

Aahh...cool. I've never seen that dialog as one step before you can already click "finish". Tanks for the tip!

rohmer

Hello,

First of all very cool project! :-)

I have 2 questions:
1. The first pertains to the makefile created.  My project doesnt build correctly either from the command line or the IDE.  Looking at the makefile there are a couple of oddities:

  A) -include ../makefile.init <-- Doesnt exist
  B) I dont see an "all" target in the makefile

2. Second question, what is the way to create a library output from the build?

Thanks!
Ron

Jantje

Hi Ron

The plugin does not make the makefile. It provides the "correct" info to CDT so it can make the makefile.
So I can't help you with yout first question.

I do not understand the second question.

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 -

rohmer

Ok, this is really strange.

I ran make with logging on and got the following (Def not all of it its > 1m):

Reading makefile `makefile'...
Reading makefile `../makefile.init' (search path) (don't care) (no ~ expansion)...
Reading makefile `sources.mk' (search path) (don't care) (no ~ expansion)...
Reading makefile `subdir.mk' (search path) (don't care) (no ~ expansion)...
Reading makefile `arduino/core/avr-libc/subdir.mk' (search path) (don't care) (no ~ expansion)...
Reading makefile `arduino/core/subdir.mk' (search path) (don't care) (no ~ expansion)...
Reading makefile `Logger/Time/subdir.mk' (search path) (don't care) (no ~ expansion)...
Reading makefile `Logger/Appenders/subdir.mk' (search path) (don't care) (no ~ expansion)...
Reading makefile `Logger/subdir.mk' (search path) (don't care) (no ~ expansion)...
Reading makefile `Libraries/SPI/subdir.mk' (search path) (don't care) (no ~ expansion)...

So, its getting those subdirectories.

BUT..

Considering target file `Logger/Logger.cpp.d'.
  File `Logger/Logger.cpp.d' does not exist.
  Looking for an implicit rule for `Logger/Logger.cpp.d'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d.o'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d.c'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d.cc'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d.cpp'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d.p'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d.f'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d.r'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d.s'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d.mod'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d.sh'.
  Trying pattern rule with stem `Logger.cpp.d'.
  Trying implicit prerequisite `Logger/Logger.cpp.d,v'.

I havent a clue where that .d at the end is coming from, that seems to be what is causing it to not build.  Any ideas?

rohmer

Said .d is the dependcies, which arent getting created :-(

rohmer

Ok, after messing about for quite a while I figured it out.  The errors were not propagating to the console, I got it to work.

Unfortunately with this current methodology I have to run my builds from the command line.

Jantje

Are you running the nightly?
It looks like
https://github.com/jantje/arduino-eclipse-plugin/issues/186
Adding -MT"$@" to the command line fixes tis if you do not want to upgrade to the nightly.
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 -

rohmer

No, not running nightly.

Here is the primary symptom:

The Console:
10:55:08 **** Incremental Build of configuration Release for project QueueManager ****
make -k all
'Building target: QueueManager'
'Printing size:'
"C:/Arduino/ArduinoIDE/hardware/tools/avr/bin/avr-size" -A "C:/Arduino/ArduinoRailroad/QueueManager/Release/QueueManager.elf"
C:/Arduino/ArduinoIDE/hardware/tools/avr/bin/avr-size: 'C:/Arduino/ArduinoRailroad/QueueManager/Release/QueueManager.elf': No such file
make: *** [QueueManager] Error 1
make: Target `all' not remade because of errors.

10:55:08 Build Finished (took 269ms)


Command Line:
C:\Arduino\ArduinoRailroad\QueueManager\Release>make
Building file: ../QueueManager.cpp
Starting C++ compile
"C:/Arduino/ArduinoIDE/hardware/tools/avr/bin/avr-g++" -c -g -Os -fno-exceptions
 -ffunction-sections -fdata-sections -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DA
RDUINO=155-r2 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR    -IC:/Arduino/ArduinoR
ailroad/QueueManager/stlport -I../QueueManager/stlport -I../QueueManager/stlport
/utility -I"C:\Users\rohmer\Arduino\libraries\stlport" -I"C:\Arduino\ArduinoIDE\
hardware\tools\avr\avr\include" -I"C:\Arduino\ArduinoIDE\hardware\arduino\avr\co
res\arduino" -I"C:\Arduino\ArduinoIDE\libraries\SD" -I"C:\Arduino\ArduinoIDE\lib
raries\SD\src" -I"C:\Arduino\ArduinoIDE\hardware\arduino\avr\variants\mega" -MMD
 -MP -MF"QueueManager.cpp.d" -MT"QueueManager.cpp.o" -D__IN_ECLIPSE__=1 -x c++ "
../QueueManager.cpp"  -o  "QueueManager.cpp.o"   -Wall  -MT"QueueManager.cpp.o"
In file included from ../QueueManager.h:12:0,
                 from ../QueueManager.cpp:9:
../Logger/Logger.hpp:12:20: fatal error: Common.h: No such file or directory
compilation terminated.
make: *** [QueueManager.cpp.o] Error 1


While I do have an error in the code, I wouldnt ever see that from the Console because it basically says the same thing regardless


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 -

rohmer

I get the same thing with make -k all on the command line as I do in the Console window.  It seems the make file isnt building the dependent items before trying to see the size of the elf.

Jantje

Default there is no -k in the compile command.
Code: [Select]
11:31:20 **** Incremental Build of configuration Release for project ewa ****
make all
Building file: ../Brains.cpp


I guess you have changed the build options in project properties->C/C++ build

I advice to create a new project and test http://eclipse.baeyens.it/how_to.shtml#/f. If this works compare the settings between the 2 projects o fix your original project.

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 -

rohmer

That seems to have done it.  I am totally not sure how it got fubar, but I recreated the project, reimported the code and now it seems to be working.

One note:  My version of the Arduino Eclipse Extensions:

2.4.0.2201501240112 doesnt look at all like the version in http://eclipse.baeyens.it/how_to.shtml#/f



I dont have the target hardware or avrdude options in the create, but I assume thats normal because you call that out...

Thx for the timely help.  I am very used to Visual Studio, but I havent used eclpise in ages.

Go Up