Hi all,
I've been using eclipse IDE on a linux environment for development to the uno board but i'm finding a lot of issues with a leonardo board i've just acquired.
Summarizing the behavior, what happens is that i compile and upload the blink code from the arduino IDE (nightly ARDUINO 1.5.6 BETA) and it works ok and the leonardo recognized as a usb device, when i use eclipse i compile and upload ok (avrdude gives me the thanks) but the code is not executed and leonardo is no longer recognized as a usb device.
Since the avr-gcc from my system and from arduino IDE are different versions, i have made eclipse use to the arduino IDE avr-gcc but the results are the same.
I've tryed to align the compilation and linking options (detailed below) but with no sucess. I've linked the blink program with both core.a library compiled by the arduino IDE and compiled it myself in eclipse with the below options but with no success.
The issue doesnt seem to be in avrdude. Running avrdude from cmd with the .hex from arduino IDE works correctly but running with the eclipse hex doesnt. avrdude command detailed below. Before running from the command line i press the reset button.
Sorry for the long post.
Thanks for any help.
Cheers,
Miguel
Compilation options:
Eclipse:
avr-g++ -I"/mnt/workspace/eclipse/BlinkForLeonardo/leonardo/include" -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DARDUINO=155 -Wall -Os -ffunction-sections -fdata-sections -fno-exceptions -mmcu=atmega32u4 -DF_CPU=16000000UL -MMD -MP -MF"src/main.d" -MT"src/main.d" -c -o "src/main.o" "../src/main.cpp"
arduino IDE:
/usr/share/arduino-nightly/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DUSB_MANUFACTURER= -DUSB_PRODUCT="Arduino Leonardo" -I/usr/share/arduino-nightly/hardware/arduino/avr/cores/arduino -I/usr/share/arduino-nightly/hardware/arduino/avr/variants/leonardo /tmp/build2055841301381076699.tmp/Blink.cpp -o /tmp/build2055841301381076699.tmp/Blink.cpp.o
avrdude cmd line:
/usr/share/arduino-nightly/hardware/tools/avrdude -pm32u4 -cavr109 -P/dev/leonardo -b57600 -v -v -v -v -C/usr/share/arduino-nightly/hardware/tools/avrdude.conf -D -Uflash:w:BlinkForLeonardo.hex:i