[Q]: Tailoring the Due to Eclipse..

Oops : you can use this simplified command line :

@mode com5:1200
@sleep 1
@C:\arduino-1.5.1r2\hardware\tools\bossac.exe %*

Nassa.

Not necessary to set your com port with this script :

@mode %2:1200
@sleep 1
@C:\arduino-1.5.1r2\hardware\tools\bossac.exe %*

Nassa.

Well, first sorry to bump this post but since my problem came using the guide posted here, I think this is the best choice.

I've followed the guide on OSX tweaking all the differences between the original Windows config to mine, and I got Eclipse to successfully build the library and the Blink project. I also followed a tip from Zad to generate a .bin file although it didn't solve my problem.
The thing is that despite the file is compiled (I think) correctly, and flashed without errors to the DUE, it doesn't work. The .hex file is 126kb and the .bin is 45kb. Any idea what can be wrong or any way I can debug it?

Anyway, thank you Nassarane for the guide, it's the only one I've found around and it's pretty straight forward.

And now my two cents:

One of the differences I encountered between Windows and OSX was the external tools part. The first tweak to Nassa's code is to change the way arguments are passed to Bossac inside the script. The unix command is $@ in stead of %*.
Then, the main change is how to erase the flash memory. If you run $ stty -f /dev/tty.usbmodemxxx 1200 from terminal it works perfectly, but it doesn't work from a script. To make it work this way you have to tweak ".Profile" file and I didn't feel like changing system files. So I came up with another solution, using a very simple Python script. You need to install Pyserial library to get it to work.

So now I have two script files: arduinoDueFlash.sh in bash, and eraseDueFlash.py in python. Here's the code:
arduinoDueFlash.sh

#!/bin/sh

python /Path/to/eraseDueFlash.py

sleep 1

/Path/to/bossac $@

eraseDueFlash.py

import serial

s = serial.Serial(port='/dev/tty.usbmodemXXX', baudrate=1200)
s.close()

It may also work a solution like Nassa's using the very argument to set the port and not to hardcode it. I'll try it eventually.

You must also check the path in the arguments you put in Eclipse:
--port=tty.usbmodem411 -U false -e -w -v -b ${workspace_loc}${project_path}/Release/${project_name}.bin -R

This works for OSX, I guess it works as well on any linux but I don't know if there's a simpler solution to open the port.

Cheers

Thanks for the good work Nassa & Zad,.
I am new to this and I followed your notes to start my work with my Arduino Due in Ubuntu 12.04,,I could build the ArduinoDueCoreLibrary with some warnings.I could build the ## ArduinoDue Blink example without errors ( I guess this [\code] at the end of the command line pattern came by mistake${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -Wl,--start-group ${INPUTS} -Wl,--end-group[\code]. I tried with that command line pattern, got some errors and then I removed[\code] and now it is building without errors., ) and without problems I can load the .hex to the board, but the LED is not blinking.What can be the problem?Please help me to solve this.I am waiting for your reply.

What should be the size for ArduinoDueCoreLibrary?? I am getting a lib.a file with 141.6kb size.
I can build the ArduinoDueCoreLibrary without errors,5 warnings.But after that if i try to open some files say Arduino.h it is giving semantic errors like Type 'uint32_t' could not be resolved.I did something wrong???? Please help, I am struggling with this..

I just noticed your questions did you ever get things straightened out?

I have eclipse working great on Ubuntu 13.04, I'll be glad to help if you still need any.

My libarduinoDueCore.a is 115,096 bytes.

Nope, still not working. I've been using a Teensy3 on Eclipse with Nassarane's guide on PJRC forums, very similar to this one.

This time I followed exactly step by step Zad's guide, as I am also using OSX, with the same result as before.
My libArduinoDuoCore.a is 121.846 bytes (pretty similar to yours) and the Blink.bin 42.340 bytes.
It compiles well, flashes it as Arduino IDE would do, but the LED is not flashing. I don't know what else to try.

I started a web tutorial that never got finished, then didn't update it to reflect the new library format. I'll try to get it completed and post a link in the next few days.

If I remember correctly when mine looked like it was good but the sketch didn't run there were some undefined symbols in the linking stage that eclipse didn't flag as errors, I found them in the console output.

I definitely have to subscribe to this thread :stuck_out_tongue:

Here's the console output for the library:

00:27:34 **** Incremental Build of configuration Debug for project ArduinoDueLib ****
make all 
Building file: ../variants/arduino_due_x/variant.cpp
Invoking: ARM Sourcery Mac OS X GCC C++ Compiler
arm-none-eabi-g++ -Dprintf=iprintf -DF_CPU=84000000L -DARDUINO=151 -D__SAM3X8E__ -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/libsam/ -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib/USB" -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib" -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib/variants/arduino_due_x" -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/CMSIS/CMSIS/Include/ -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/CMSIS/Device/ATMEL/ -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/libsam/ -Os -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="variants/arduino_due_x/variant.o.lst" -fno-exceptions -fno-rtti -c --param max-inline-insns-single=500 -nostdlib -MMD -MP -MF"variants/arduino_due_x/variant.d" -MT"variants/arduino_due_x/variant.d" -mcpu=cortex-m3 -mthumb -o "variants/arduino_due_x/variant.o" "../variants/arduino_due_x/variant.cpp"
../variants/arduino_due_x/variant.cpp: In function 'void init()':
../variants/arduino_due_x/variant.cpp:383: warning: comparison between signed and unsigned integer expressions
Finished building: ../variants/arduino_due_x/variant.cpp
 
Building file: ../avr/dtostrf.c
Invoking: ARM Sourcery Mac OS X GCC C Compiler
arm-none-eabi-gcc -Dprintf=iprintf -DF_CPU=84000000L -DARDUINO=151 -D__SAM3X8E__ -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/libsam/ -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib/USB" -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib" -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib/variants/arduino_due_x" -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/CMSIS/CMSIS/Include/ -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/CMSIS/Device/ATMEL/ -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/libsam/ -Os -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="avr/dtostrf.o.lst" -c --param max-inline-insns-single=500 -nostdlib -MMD -MP -MF"avr/dtostrf.d" -MT"avr/dtostrf.d" -mcpu=cortex-m3 -mthumb -o "avr/dtostrf.o" "../avr/dtostrf.c"
../avr/dtostrf.c: In function 'dtostrf':
../avr/dtostrf.c:23: warning: implicit declaration of function 'sprintf'
../avr/dtostrf.c:23: warning: incompatible implicit declaration of built-in function 'sprintf'
In file included from ../IPAddress.cpp:3:
/Users/X/Documents/arduino-workspace/ArduinoDueLib/IPAddress.h: In member function 'IPAddress::operator uint32_t()':
/Users/X/Documents/arduino-workspace/ArduinoDueLib/IPAddress.h:51: warning: dereferencing type-punned pointer will break strict-aliasing rules
/Users/X/Documents/arduino-workspace/ArduinoDueLib/IPAddress.h: In member function 'bool IPAddress::operator==(const IPAddress&)':
/Users/X/Documents/arduino-workspace/ArduinoDueLib/IPAddress.h:52: warning: dereferencing type-punned pointer will break strict-aliasing rules
/Users/X/Documents/arduino-workspace/ArduinoDueLib/IPAddress.h:52: warning: dereferencing type-punned pointer will break strict-aliasing rules
Finished building: ../avr/dtostrf.c
 
Building file: ../main.cpp
Invoking: ARM Sourcery Mac OS X GCC C++ Compiler
arm-none-eabi-g++ -Dprintf=iprintf -DF_CPU=84000000L -DARDUINO=151 -D__SAM3X8E__ -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/libsam/ -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib/USB" -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib" -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib/variants/arduino_due_x" -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/CMSIS/CMSIS/Include/ -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/CMSIS/Device/ATMEL/ -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/libsam/ -Os -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="main.o.lst" -fno-exceptions -fno-rtti -c --param max-inline-insns-single=500 -nostdlib -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m3 -mthumb -o "main.o" "../main.cpp"
Finished building: ../main.cpp
 
Building file: ../wiring_shift.c
Invoking: ARM Sourcery Mac OS X GCC C Compiler
arm-none-eabi-gcc -Dprintf=iprintf -DF_CPU=84000000L -DARDUINO=151 -D__SAM3X8E__ -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/libsam/ -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib/USB" -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib" -I"/Users/X/Documents/arduino-workspace/ArduinoDueLib/variants/arduino_due_x" -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/CMSIS/CMSIS/Include/ -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/CMSIS/Device/ATMEL/ -I/Applications/Arduino-due.app/Contents/Resources/Java/hardware/arduino/sam/system/libsam/ -Os -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="wiring_shift.o.lst" -c --param max-inline-insns-single=500 -nostdlib -MMD -MP -MF"wiring_shift.d" -MT"wiring_shift.d" -mcpu=cortex-m3 -mthumb -o "wiring_shift.o" "../wiring_shift.c"
Finished building: ../wiring_shift.c
 
Building target: libArduinoDueLib.a
Invoking: ARM Sourcery Mac OS X GCC Archiver
arm-none-eabi-ar -r  "libArduinoDueLib.a"  ./variants/arduino_due_x/variant.o  ./avr/dtostrf.o  ./USB/CDC.o ./USB/HID.o ./USB/USBCore.o  ./IPAddress.o ./Print.o ./Reset.o ./RingBuffer.o ./Stream.o ./UARTClass.o ./USARTClass.o ./WInterrupts.o ./WMath.o ./WString.o ./cortex_handlers.o ./cxxabi-compat.o ./hooks.o ./iar_calls_sam3.o ./itoa.o ./main.o ./syscalls_sam3.o ./wiring.o ./wiring_analog.o ./wiring_digital.o ./wiring_pulse.o ./wiring_shift.o   
Finished building target: libArduinoDueLib.a
 

00:28:05 Build Finished (took 31s.474ms)

I had to delete some stuff to meet the max characters limitation on the post

And here's console output for the published Blink.cpp:

00:39:07 **** Incremental Build of configuration Debug for project ArduinoTemplate ****
make all 
Building target: ArduinoTemplate.elf
Invoking: ARM Sourcery Mac OS X GCC C++ Linker
arm-none-eabi-g++ -L"/Users/victor/Documents/arduino-workspace/ArduinoDueLib/Debug" -L"/Users/victor/Documents/arduino-workspace/ArduinoDueLib/variants/arduino_due_x" -Wl,-Map,ArduinoTemplate.map -lm -lgcc  -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -mcpu=cortex-m3 -mthumb -o  "ArduinoTemplate.elf" -Wl,--start-group  ./Blink.o ./main.o  /Users/victor/Documents/arduino-workspace/ArduinoDueLib/Debug/syscalls_sam3.o -lArduinoDueLib -lsam_sam3x8e_gcc_rel -Wl,--end-group
/Applications/Arduino-due.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .fini by 2 bytes
/Applications/Arduino-due.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .fini by 2 bytes
Finished building target: ArduinoTemplate.elf
 
/Applications/Arduino-due.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .fini by 2 bytes
/Users/victor/Documents/arduino-workspace/ArduinoDueLib/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a(startup_sam3xa.o): In function `Reset_Handler':
startup_sam3xa.c:(.text.Reset_Handler+0x54): warning: undefined reference to `_srelocate'
startup_sam3xa.c:(.text.Reset_Handler+0x58): warning: undefined reference to `_szero'
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-print-directory post-build
/Applications/Arduino-due.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-objcopy -O binary ArduinoTemplate.elf ArduinoTemplate.bin
 
Invoking: ARM Sourcery Mac OS X GNU Create Flash Image
arm-none-eabi-objcopy -O ihex ArduinoTemplate.elf  "ArduinoTemplate.hex"
Finished building: ArduinoTemplate.hex
 
Invoking: ARM Sourcery Mac OS X GNU Create Listing
arm-none-eabi-objdump -h -S ArduinoTemplate.elf > "ArduinoTemplate.lst"
Finished building: ArduinoTemplate.lst
startup_sam3xa.c:(.text.Reset_Handler+0x5c): warning: undefined reference to `_erelocate'
startup_sam3xa.c:(.text.Reset_Handler+0x60): warning: undefined reference to `_ezero'
 
Invoking: ARM Sourcery Mac OS X GNU Print Size
arm-none-eabi-size  --format=berkeley ArduinoTemplate.elf
   text	   data	    bss	    dec	    hex	filename
   4078	     16	    424	   4518	   11a6	ArduinoTemplate.elf
Finished building: ArduinoTemplate.siz
 
startup_sam3xa.c:(.text.Reset_Handler+0x64): warning: undefined reference to `_sfixed'

00:39:08 Build Finished (took 942ms)

Aand it's not working. I don't see anything weird except for some Warnings and the fact that something inside Eclipse is using XCode's make, but I don't know if this is usual or not

The lines in your output that show this are the undefined symbols I was talking about.

startup_sam3xa.c:(.text.Reset_Handler+0x5c): warning: undefined reference to `_erelocate'
startup_sam3xa.c:(.text.Reset_Handler+0x60): warning: undefined reference to `_ezero'

These should be marked as errors but they aren't I'm sure it is related to some of the options in the linking command but as long as my set up works I'm not going to spend much effort to find it.

In any case, you are missing the linker script, for me it is:

${workspace_loc:}/arduinosource/hardware/arduino/sam/variants/arduino_due_x/linker_scripts/gcc/flash.ld

This is in the box at the top of the dialog under Properties->C/C++ Build->Settings->ARM Sourcery Linux GCC C++ Linker->General

Your link process should look like:

Building target: blink.elf
Invoking: ARM Sourcery Linux GCC C++ Linker
arm-none-eabi-g++ -T"workspace/arduinosource/hardware/arduino/sam/variants/arduino_due_x/linker_scripts/gcc/flash.ld" -L"workspace/arduinoDueCore/Release" -L"arduinoDueCore/arduino_due_x" -Wl,-Map,blink.map -lm -lgcc  -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -mcpu=cortex-m3 -mthumb -o  "blink.elf" -Wl,--start-group  ./src/Blink.o  workspace/arduinoDueCore/Release/syscalls_sam3.o -larduinoDueCore -lsam_sam3x8e_gcc_rel -Wl,--end-group
Finished building target: blink.elf
 
make --no-print-directory post-build
workspace/arduinosource/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-objcopy -O binary blink.elf blink.bin
 
Invoking: ARM Sourcery Linux GNU Create Flash Image
arm-none-eabi-objcopy -O ihex blink.elf  "blink.hex"
Finished building: blink.hex
 
Invoking: ARM Sourcery Linux GNU Create Listing
arm-none-eabi-objdump -h -S blink.elf > "blink.lst"
Finished building: blink.lst

Of course your paths will be different, but the only thing I see missing is the -T ...linker_scripts/gcc/flash.ld

If you still don't get a blinking led, do a make clean before you make debug. You have the default debug and release make targets, I use only release which is also changing the paths a bit, shouldn't make any difference though.

Thank you very much! that finally solved the problem :smiley: I don't know why I forgot that, but I finally can focus on coding

Cheers

My program also compiles and downloads "successfully", but it does not run, meaning the LED does not blink. I do not have the undefined reference warnings though.

Here is some information about my development environment:
32 bit eclipse juno cdt
arduino 1.5.1r2 beta
windows 8 64bit

My compile output is too big for this post, I will break it up in the posts below.

Any help would be greatly appreciated.

Program:

#include "Arduino.h"

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;


// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

Download Output:

Status for device COM5:
-----------------------
    Baud:            1200
    Parity:          None
    Data Bits:       8
    Stop Bits:       1
    Timeout:         ON
    XON/XOFF:        OFF
    CTS handshaking: OFF
    DSR handshaking: OFF
    DSR sensitivity: OFF
    DTR circuit:     ON
    RTS circuit:     ON

      1 [main] sleep 7652 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Erase flash
Write 27477 bytes to flash

[                              ] 0% (0/108 pages)
[==                            ] 9% (10/108 pages)
[=====                         ] 18% (20/108 pages)
[========                      ] 27% (30/108 pages)
[===========                   ] 37% (40/108 pages)
[=============                 ] 46% (50/108 pages)
[================              ] 55% (60/108 pages)
[===================           ] 64% (70/108 pages)
[======================        ] 74% (80/108 pages)
[=========================     ] 83% (90/108 pages)
[===========================   ] 92% (100/108 pages)
[==============================] 100% (108/108 pages)
Verify 27477 bytes of flash

[                              ] 0% (0/108 pages)
[==                            ] 9% (10/108 pages)
[=====                         ] 18% (20/108 pages)
[========                      ] 27% (30/108 pages)
[===========                   ] 37% (40/108 pages)
[=============                 ] 46% (50/108 pages)
[================              ] 55% (60/108 pages)
[===================           ] 64% (70/108 pages)
[======================        ] 74% (80/108 pages)
[=========================     ] 83% (90/108 pages)
[===========================   ] 92% (100/108 pages)
[==============================] 100% (108/108 pages)
Verify successful
Set boot flash true
CPU reset.

-Madison

Here is the first part of my compile output:

22:00:54 **** Build of configuration Debug for project ArduinoDueBlinkExample ****
cs-make all 
      1 [main] echo 9464 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Building file: ../blink.cpp
the public mailing list cygwin@cygwin.com
      0 [main] echo 7448 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Invoking: ARM Sourcery Windows GCC C++ Compiler
arm-none-eabi-g++ -Dprintf=iprintf -DF_CPU=84000000L -DARDUINO=151 -D__SAM3X8E__ -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON -I"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\variants\arduino_due_x" -I"D:\EclipsePortable\Data\workspace\ArduinoDueBlinkExample" -I"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\USB" -I"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary" -ID:/arduino-1.5.1r2/hardware/arduino/sam/system/CMSIS/CMSIS/Include/ -ID:/arduino-1.5.1r2/hardware/arduino/sam/system/CMSIS/Device/ATMEL/ -ID:/arduino-1.5.1r2/hardware/arduino/sam/system/libsam/ -Os -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="blink.o.lst" -fno-exceptions -fno-rtti -c -fmessage-length=0 --param max-inline-insns-single=500 -nostdlib -MMD -MP -MF"blink.d" -MT"blink.d" -mcpu=cortex-m3 -mthumb -o "blink.o" "../blink.cpp"
      1 [main] sh 908 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Finished building: ../blink.cpp
 
Building target: ArduinoDueBlinkExample.elf
the public mailing list cygwin@cygwin.com
      1 [main] echo 2316 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Invoking: ARM Sourcery Windows GCC C++ Linker
the public mailing list cygwin@cygwin.com
arm-none-eabi-g++ -T"D:\arduino-1.5.1r2\hardware\arduino\sam\variants\arduino_due_x\linker_scripts\gcc\flash.ld" -L"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\variants\arduino_due_x" -L"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\Release" -Wl,-Map,ArduinoDueBlinkExample.map -lm -lgcc  -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -mcpu=cortex-m3 -mthumb -o  "ArduinoDueBlinkExample.elf" -Wl,--start-group  ./blink.o  D:/EclipsePortable/Data/workspace/ArduinoDueCoreLibrary/Release/syscalls_sam3.o -lArduinoDueCoreLibrary -lsam_sam3x8e_gcc_rel -Wl,--end-group
      0 [main] echo 9024 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Finished building target: ArduinoDueBlinkExample.elf
 
D:/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/cs-make.exe --no-print-directory post-build
D:\arduino-1.5.1r2\hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-objcopy -O binary ArduinoDueBlinkExample.elf ArduinoDueBlinkExample.bin
the public mailing list cygwin@cygwin.com
      0 [main] echo 9576 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      0 [main] echo 1028 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] sh 9768 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
 
the public mailing list cygwin@cygwin.com
      1 [main] echo 1388 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      0 [main] echo 7028 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Invoking: ARM Sourcery Windows GNU Create Flash Image
the public mailing list cygwin@cygwin.com
      0 [main] echo 10060 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
arm-none-eabi-objcopy -O ihex ArduinoDueBlinkExample.elf  "ArduinoDueBlinkExample.hex"
the public mailing list cygwin@cygwin.com
      1 [main] echo 8812 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] sh 5032 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      0 [main] echo 6900 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Finished building: ArduinoDueBlinkExample.hex
      1 [main] echo 5672 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
 
the public mailing list cygwin@cygwin.com
      1 [main] echo 7340 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Invoking: ARM Sourcery Windows GNU Create Listing
the public mailing list cygwin@cygwin.com
arm-none-eabi-objdump -h -S ArduinoDueBlinkExample.elf > "ArduinoDueBlinkExample.lst"
      1 [main] sh 9488 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      0 [main] echo 9256 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Finished building: ArduinoDueBlinkExample.lst
      1 [main] echo 6908 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
 
      1 [main] echo 8004 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Invoking: ARM Sourcery Windows GNU Print Size
arm-none-eabi-size  --format=berkeley -t ArduinoDueBlinkExample.elf
   text	   data	    bss	    dec	    hex	filename
   5364	      0	    504	   5868	   16ec	ArduinoDueBlinkExample.elf
   5364	      0	    504	   5868	   16ec	(TOTALS)
      1 [main] echo 3672 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Finished building: ArduinoDueBlinkExample.siz
      1 [main] echo 36 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
 
the public mailing list cygwin@cygwin.com

22:00:55 Build Finished (took 1s.353ms)

-Madison

2nd part:

22:01:01 **** Incremental Build of configuration Debug for project ArduinoDueBlinkExample ****
cs-make all 
      0 [main] echo 7396 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Invoking: ARM Sourcery Windows GNU Print Size
the public mailing list cygwin@cygwin.com
arm-none-eabi-size  --format=berkeley -t ArduinoDueBlinkExample.elf
   text	   data	    bss	    dec	    hex	filename
   5364	      0	    504	   5868	   16ec	ArduinoDueBlinkExample.elf
   5364	      0	    504	   5868	   16ec	(TOTALS)
      1 [main] echo 10204 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Finished building: ArduinoDueBlinkExample.siz
the public mailing list cygwin@cygwin.com
      1 [main] echo 7604 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
 

22:01:02 Build Finished (took 202ms)

22:01:02 **** Incremental Build of configuration Release for project ArduinoDueCoreLibrary ****
cs-make all 
cs-make: Nothing to be done for `all'.

22:01:03 Build Finished (took 229ms)

22:04:29 **** Incremental Build of configuration Debug for project ArduinoDueBlinkExample ****
cs-make all 
      0 [main] echo 7708 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Building file: ../blink.cpp
the public mailing list cygwin@cygwin.com
      0 [main] echo 8508 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Invoking: ARM Sourcery Windows GCC C++ Compiler
arm-none-eabi-g++ -Dprintf=iprintf -DF_CPU=84000000L -DARDUINO=151 -D__SAM3X8E__ -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON -I"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\variants\arduino_due_x" -I"D:\EclipsePortable\Data\workspace\ArduinoDueBlinkExample" -I"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\USB" -I"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary" -ID:/arduino-1.5.1r2/hardware/arduino/sam/system/CMSIS/CMSIS/Include/ -ID:/arduino-1.5.1r2/hardware/arduino/sam/system/CMSIS/Device/ATMEL/ -ID:/arduino-1.5.1r2/hardware/arduino/sam/system/libsam/ -Os -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="blink.o.lst" -fno-exceptions -fno-rtti -c -fmessage-length=0 --param max-inline-insns-single=500 -nostdlib -MMD -MP -MF"blink.d" -MT"blink.d" -mcpu=cortex-m3 -mthumb -o "blink.o" "../blink.cpp"
      1 [main] sh 5464 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Finished building: ../blink.cpp
 
the public mailing list cygwin@cygwin.com
Building target: ArduinoDueBlinkExample.elf
      1 [main] echo 6260 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Invoking: ARM Sourcery Windows GCC C++ Linker
the public mailing list cygwin@cygwin.com
      1 [main] echo 2844 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] echo 6932 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] echo 5392 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
arm-none-eabi-g++ -T"D:\arduino-1.5.1r2\hardware\arduino\sam\variants\arduino_due_x\linker_scripts\gcc\flash.ld" -L"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\variants\arduino_due_x" -L"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\Release" -Wl,-Map,ArduinoDueBlinkExample.map -lm -lgcc  -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -mcpu=cortex-m3 -mthumb -o  "ArduinoDueBlinkExample.elf" -Wl,--start-group  ./blink.o  D:/EclipsePortable/Data/workspace/ArduinoDueCoreLibrary/Release/syscalls_sam3.o -lArduinoDueCoreLibrary -lsam_sam3x8e_gcc_rel -Wl,--end-group
the public mailing list cygwin@cygwin.com
Finished building target: ArduinoDueBlinkExample.elf
 
D:/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/cs-make.exe --no-print-directory post-build
D:\arduino-1.5.1r2\hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-objcopy -O binary ArduinoDueBlinkExample.elf ArduinoDueBlinkExample.bin
      2 [main] sh 5512 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
 
the public mailing list cygwin@cygwin.com
Invoking: ARM Sourcery Windows GNU Create Flash Image
      1 [main] echo 8016 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
arm-none-eabi-objcopy -O ihex ArduinoDueBlinkExample.elf  "ArduinoDueBlinkExample.hex"
the public mailing list cygwin@cygwin.com
      1 [main] echo 6072 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] echo 6516 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] echo 5100 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] sh 5836 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Finished building: ArduinoDueBlinkExample.hex
the public mailing list cygwin@cygwin.com
      1 [main] echo 9044 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
 
the public mailing list cygwin@cygwin.com
      1 [main] echo 6272 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] echo 4924 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Invoking: ARM Sourcery Windows GNU Create Listing
the public mailing list cygwin@cygwin.com
arm-none-eabi-objdump -h -S ArduinoDueBlinkExample.elf > "ArduinoDueBlinkExample.lst"
      1 [main] sh 8880 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      0 [main] echo 4144 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Finished building: ArduinoDueBlinkExample.lst

-Madison

3rd part:

1 [main] echo 8680 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
 
      1 [main] echo 8760 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Invoking: ARM Sourcery Windows GNU Print Size
arm-none-eabi-size  --format=berkeley -t ArduinoDueBlinkExample.elf
   text	   data	    bss	    dec	    hex	filename
   9748	      0	   1184	  10932	   2ab4	ArduinoDueBlinkExample.elf
   9748	      0	   1184	  10932	   2ab4	(TOTALS)
      1 [main] echo 3788 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Finished building: ArduinoDueBlinkExample.siz
the public mailing list cygwin@cygwin.com
      1 [main] echo 6764 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
 

22:04:30 Build Finished (took 1s.385ms)

22:04:31 **** Incremental Build of configuration Release for project ArduinoDueCoreLibrary ****
cs-make all 
cs-make: Nothing to be done for `all'.

22:04:31 Build Finished (took 231ms)

22:09:18 **** Incremental Build of configuration Debug for project ArduinoDueBlinkExample ****
cs-make all 
      1 [main] echo 7852 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Building file: ../blink.cpp
the public mailing list cygwin@cygwin.com
      1 [main] echo 8140 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Invoking: ARM Sourcery Windows GCC C++ Compiler
the public mailing list cygwin@cygwin.com
arm-none-eabi-g++ -Dprintf=iprintf -DF_CPU=84000000L -DARDUINO=151 -D__SAM3X8E__ -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON -I"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\variants\arduino_due_x" -I"D:\EclipsePortable\Data\workspace\ArduinoDueBlinkExample" -I"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\USB" -I"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary" -ID:/arduino-1.5.1r2/hardware/arduino/sam/system/CMSIS/CMSIS/Include/ -ID:/arduino-1.5.1r2/hardware/arduino/sam/system/CMSIS/Device/ATMEL/ -ID:/arduino-1.5.1r2/hardware/arduino/sam/system/libsam/ -Os -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="blink.o.lst" -fno-exceptions -fno-rtti -c -fmessage-length=0 --param max-inline-insns-single=500 -nostdlib -MMD -MP -MF"blink.d" -MT"blink.d" -mcpu=cortex-m3 -mthumb -o "blink.o" "../blink.cpp"
      0 [main] sh 4408 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Finished building: ../blink.cpp
 
Building target: ArduinoDueBlinkExample.elf
the public mailing list cygwin@cygwin.com
      0 [main] echo 9000 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Invoking: ARM Sourcery Windows GCC C++ Linker
the public mailing list cygwin@cygwin.com
      1 [main] echo 4008 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] echo 156 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
arm-none-eabi-g++ -T"D:\arduino-1.5.1r2\hardware\arduino\sam\variants\arduino_due_x\linker_scripts\gcc\flash.ld" -L"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\variants\arduino_due_x" -L"D:\EclipsePortable\Data\workspace\ArduinoDueCoreLibrary\Release" -Wl,-Map,ArduinoDueBlinkExample.map -lm -lgcc  -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -mcpu=cortex-m3 -mthumb -o  "ArduinoDueBlinkExample.elf" -Wl,--start-group  ./blink.o  D:/EclipsePortable/Data/workspace/ArduinoDueCoreLibrary/Release/syscalls_sam3.o -lArduinoDueCoreLibrary -lsam_sam3x8e_gcc_rel -Wl,--end-group
the public mailing list cygwin@cygwin.com
      1 [main] echo 9500 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Finished building target: ArduinoDueBlinkExample.elf
 
D:/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/cs-make.exe --no-print-directory post-build
D:\arduino-1.5.1r2\hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-objcopy -O binary ArduinoDueBlinkExample.elf ArduinoDueBlinkExample.bin
      1 [main] sh 8568 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
 
the public mailing list cygwin@cygwin.com
      1 [main] echo 4332 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Invoking: ARM Sourcery Windows GNU Create Flash Image
the public mailing list cygwin@cygwin.com
      1 [main] echo 3712 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      0 [main] echo 2124 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
arm-none-eabi-objcopy -O ihex ArduinoDueBlinkExample.elf  "ArduinoDueBlinkExample.hex"
      1 [main] echo 8144 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] sh 4164 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Finished building: ArduinoDueBlinkExample.hex
the public mailing list cygwin@cygwin.com
      1 [main] echo 9512 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] echo 4196 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
 
the public mailing list cygwin@cygwin.com
      0 [main] echo 5796 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
Invoking: ARM Sourcery Windows GNU Create Listing
the public mailing list cygwin@cygwin.com
arm-none-eabi-objdump -h -S ArduinoDueBlinkExample.elf > "ArduinoDueBlinkExample.lst"
      1 [main] sh 7412 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
      1 [main] echo 2116 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Finished building: ArduinoDueBlinkExample.lst
      1 [main] echo 9972 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
 
the public mailing list cygwin@cygwin.com
      0 [main] echo 4368 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Invoking: ARM Sourcery Windows GNU Print Size
arm-none-eabi-size  --format=berkeley -t ArduinoDueBlinkExample.elf
   text	   data	    bss	    dec	    hex	filename
   9748	      0	   1184	  10932	   2ab4	ArduinoDueBlinkExample.elf
   9748	      0	   1184	  10932	   2ab4	(TOTALS)
      0 [main] echo 6704 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
Finished building: ArduinoDueBlinkExample.siz
      1 [main] echo 1936 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
 

22:09:19 Build Finished (took 1s.408ms)

22:09:20 **** Incremental Build of configuration Release for project ArduinoDueCoreLibrary ****
cs-make all 
cs-make: Nothing to be done for `all'.

22:09:20 Build Finished (took 230ms)

-Madison

Hello, I am trying to tailor eclipse for Due on ArchLinux, but I cannot download RXTX because I cannot reach the address site "rxtx.qbang.org/eclipse/", which seems out of work. Can anyone help me?

Another issue: I have Arch64 installed, so I could run only the 64-bit version of eclips, is there a workaround that could make me run eclipse 32 on my 64-bit OS?

Finally, last question: do I have to use eclipse Juno SR1 downloadint it from the url or can I install eclipse 4.3.2 from my repo?

I have followed your guides above, and successfully compiled it. That was, however, using Arduino 1.5.1. I have now set it up with the latest (Arduino 1.5.6-r2) library. It compiles and uploads fine but it doesn't run. The code doesn't execute. After uploading, it is not possible to open a serial connection to the port (Ubuntu Linux).

Has anybody else got this issue? Has anyone even got it working with Arduino 1.5.6-r2?

Any news on using Arduino 1.5.6-r2?

I'm running Linux Mint and am very interested in using Eclipse to create projects. It seems very cumbersome to do it...

Hi,

as i had the same issue regarding 1.5.6-r2 not working within eclipse build environment, i felt like having to dig deeper into it.
I used my Segger JLink + free WinIDEA debugging environment from iSystem to see whats going wrong there.

It was pretty obvious whats going wrong there -> it hung in Default_Handler function after entering main and polling a few times for the next SysTick gettin passed.

By comparing the differences in the baselines 1.5.1 vs. 1.5.6 i found the following relevant commit:

which seems to address already a weak symbol definition problem.

Unfortunately this fixture rendered the build in eclipse useless. IMHO it seems like the eclipse build env. does building + linking in another 'order' as it is done by arduino ide.

There are two times weak symbol declarations ( or in case of i.e. the SysTick_Handler even function definitions ) which appear overwriting each others weak alias depending on the link time usage of the objects. So it happens that all declarations (not only the failing SysTick_Hanlder) from cortex_handler.c gettin overwritten by weak symbol redeclaration inside startup_sam3xa.c.

My dirty solution is to just comment out the part in startup_sam3xa.c with the weak symbol declaration regarding the vectors (lines 53 including 128).

It worked also by removing the unchanged startup_sam3xa.c from static library archive build to the project build.
It may also be ok to just remove the files completely (startup handler code + vector map provided by gcc arm built-in libraries is used instead).