Go Down

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

big_red_frog

First huge thanks for this solution and the support you have provided.

I have successfully installed the full package version and had been happily building and deploying code based around adafruit neopixel libs for 2812.

However, I hit a problem as I have described at

http://forums.adafruit.com/viewtopic.php?f=47&t=52705

Basically when I add in the adafruit neomatrix libs my project no longer seems to boot, simple single led debug in the setup function is not seen to run. All other main loop code has been removed for this investigation.

As the same code seems fine in arduino IDE I must be missing something that is messing with my boot up.

Happy to provide any artifacts that may help, but any ideas where I should be looking?

Jantje

big_red_frog
I have read your adafruit post but I do not have any of the hardware so there is little I can do to progress than give you a way to find out what the problem is.
So here we go:
verify the sketch in arduino ide with verbose compilation on (file preferences)

verify the sketch in eclipse

compare the outcome of the console in the arduino ide and eclipse. Apart from the know differences -as partly described here http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.html#errorLog- there is a difference that is causing your problem.

I consider it less likely but the upload may cause the problem as well.
The same way as described above can be used for upload verification.

If you found that root cause difference we can think of a solution.

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 -

big_red_frog

Greatly appreciate the response.

I am going to dig through the artifacts in general tonight, and then reproduce on my main machine tomorrow.

Meanwhile, it is worth noting, you dont need to have any hardware beyond maybe an arduino nano, ( I also have an uno I can try )

As even when I gut the functional code, so there is no establishment of the matrix code, and nothing driving the neopixels, it just doesn't boot, I am just using separate discrete LEDs to check for basic setup running, with a 1 second on/off/on/off.

Anyway, its always healthy to dig through when things aren't working, so I can learn something  :)

Is there an easy way to get a verbose map and symbol output from the build? I want to check the size of the various components as I binary chop the inclusion of the neomatrix lib ( I will also try adding the underlying code as direct source files to see if it is a lib effect )

big_red_frog

Ill keep rambling here as I make any progress, If I am dirtying the intent of this forum thread, just highlight and i can post as you see fit.

On a separate machine and another Nano board, I can reproduce the boot failing when adding in the NeoMatrix Lib, without actually calling any of its functionality.

In this case I actually copy the source files directly into the project to avoid any Lib management implications.

Further, by excluding the files again, I can make the build boot once more, so I have something I can chop on this machine.

big_red_frog

#439
Apr 17, 2014, 05:42 am Last Edit: Apr 17, 2014, 05:56 am by big_red_frog Reason: 1
Ok, take me up the woods, and put me out of my misery!

There is a subfolder in the NeoMatrix lib directory called extras that contains a file called gamma.c

As there is a legitimate gamma.h in the lib build, I hadn't questioned the gamma.c file.

However, chopping through excluding each file, I isolated, that gamma,c could be excluded, and everything was fine.

Looking in the file, it is obvious there is a main() function in there!

The file clearly states

// THIS IS NOT ARDUINO CODE -- DON'T INCLUDE IN YOUR SKETCH.  It's a
// command-line tool that outputs a gamma correction table to stdout;
// redirect or copy and paste the results into header file for the
// NeoMatrix library code.

So its a support tool

The Arduino IDE seems to ignore this file, however, importing the same lib into Arduino Eclipse IDE tries to roll it in, and the wrong main is run, surprised the build doesn't fail with two "main" functions though.

Anyway, you may want to look into this as an improvement to lib import to prevent this from occurring, if it can be legitimately excluded, I am not familiar with the expectation for libs...

I am smiling right now  :)




Jantje

great that you found it.
Do you have a pointer to the lib so I can look at why gamma.c is included in eclipse and not in Arduino.ide?
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 -

big_red_frog

Context and libs are here

https://learn.adafruit.com/adafruit-neopixel-uberguide/neomatrix-library

Jantje

Apparently arduino ide does not only skip the examples folder but also the extras folder.
Seems logic.
Can you create a issue in github? https://github.com/jantje/arduino-eclipse-plugin/issues?direction=desc&sort=updated&state=open
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 -


big_red_frog

Done

https://github.com/jantje/arduino-eclipse-plugin/issues/138

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 -

beingobserver

Hi. Can you please check this issue over Github?

https://github.com/jantje/arduino-eclipse-plugin/issues/151

Thank you.
Damn amateur.

beingobserver

Dear Jantje, how can i make a little support (donation) for the project.

I have just started to use your plugin and this will be a starter donation.
If i continue to use your plugin i will make other donations as well.

Thank you for making and sharing this great tool.
Damn amateur.

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

Hello guys,

My environment is win7 64bit, Eclipse Juno, Arduino 1.5.6-r2, arduino plugin 2.2 nightly

I am follow the http://www.baeyens.it/eclipse/installAdvice.shtml
and run the batch command file.
when completed install plugin, new a sketch and run build

the error message as below

please help me to fix the problems. thank you all.

make all
Building file: ../.ino.cpp
Starting C++ compile
"C:/Program Files/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"' "-IC:/Program Files/Arduino/hardware/arduino/sam/system/libsam" "-IC:/Program Files/Arduino/hardware/arduino/sam/system/CMSIS/CMSIS/Include/" "-IC:/Program Files/Arduino/hardware/arduino/sam/system/CMSIS/Device/ATMEL/"   -MMD -MP -MF".ino.cpp.d" -MT".ino.cpp.d" -D__IN_ECLIPSE__=1 -x c++ "../.ino.cpp"  -o  ".ino.cpp.o"   -Wall
../.ino.cpp:6: fatal error: Arduino.h: No such file or directory
compilation terminated.
make: *** [.ino.cpp.o] Error 1

Go Up