Windows/Linux/Mac Eclipse plugin to compile and upload arduino sketches

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

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.

Are you running the nightly?
It looks like

Adding -MT"$@" to the command line fixes tis if you do not want to upgrade to the nightly.

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

have you tried
make -k all
on the command line?
Jantje

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.

Default there is no -k in the compile command.

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 Arduino Eclipse Plugin - How To. If this works compare the settings between the 2 projects o fix your original project.

Jantje

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 Arduino Eclipse Plugin - How To

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.

Nice to hear it works.
Don't forget to visit You are to late to Support Sloeber
Jantje

I recently started with arduino and this awesome plugin.
The help did not mention a way to utilize a programmer like USBtiny.
In eclipse the external tool is allowing to add support for external programmers.

If there is a better way to handle this, pleas let me know.

sounds like a good way to do it.
The only improvement I can think of is to use the variable to specify the file to upload instead of the file prompt.
Not sure if it is possible though.
Best regards
Jantje

I've just started using the plugin and its very impressive.
I am trying to make a serial connection using the serial monitor via bluetooth to an HC05 (on Win7) but although the COM ports are listed (COM7 and COM8) the plugin complains that COM7 is in use by another program. If I then try to connect via putty it works fine. Any ideas?

@rodwsm
Are you using the nightly? I ask because we changed from rxtx to something else (I keep on foregetting what)
If not, give te nightly a try.
Jantje

That did it, 2.4.0 works fine. Thanks Jantje

great
Do not forget to visit You are to late to Support Sloeber
Best regards
Jantje

Hi Jan,

I can not get any sketch to compile due to dependency errors. I have read tons of docs, but can't find the cause, nor the solution.

Here's my setup:

  • Linux Mint 17
  • Arduino 1.5.2
  • Arduino Eclipse cloned from Github today (20150213) and built without any problem.

I have configured the plugin so it knows where the Arduino install is. Is does recognise the version properly.

When I create a new sketch regular Arduino commands like pinMode can't be resolved. The Arduino libraries are not recognised.
Needles to say I can not compile the code.

I have checked the project properties and the arduino/core and arduino/variant directories are available in the included paths. I removed them and added them back, but that did not change anything.

Hope you can help.

Bert

P.S. How's Marvin doing?

Hi Bert
As you can read on Sloeber- Pre Requisites all os comments.

Arduino IDE 1.5.2 beta and 1.5.4 beta are not supported due to a change in the library system.

I haven't tried 1.6 yet -released a couple of days ago- but that should be fine and is no longer a Beta.
If that doesn't work give me a call so we can meet and I can see what is wrong.

Marvin is going slowly but ewa has made some progress. i hope to come to timelab in the comming weeks and I'll be at the arduino jam :slight_smile:

Best regards
Jantje

I did find the remark about not using 1.5.4 but not the one about 1.5.2. DOH!!

What version do you recommend then? I just tried 1.5.3 but the plugin is saying 1.5.3 and 1.5.4 are not supported. On your site you just mention 1.5.2 and 1.5.4.
I did go over all the pages on your site but all you say is the versions NOT to use. :-/

I did try 1.6.0 and aparently it is working. I have not tried any libraries yet.
One interesting thing I found is that you get the same problem when not defining *.ino and *.pde files ad C++ source code files.

I'll stop by on the Arduino Jam, but participating is not possible. I can't get away from the family for a whole weekend.
See you then.

Can you post the build error?

If the ino file does not have a include you need to help the indexer by including "arduino.h" in the ino file

I found the problem. The *.ino and *.pde files were not recognised as C++ source files even though I had set them. For some reason the configuration did not get saved. Adding the configuration again solved the problem.

I must say I did a huge face plant when I did read the error in more detail. Yep, it told me exactly the problem above. DOH!

I was misled by the fact the dependencies were not working and I had set the file type already (which was not stored).

Stupid mistake due to a chronic lack of sleep.

I'm using 1.6.0 now and it seems to work fine on Linux Mint 17.