Hello
I'm changing my eclipse plugin to build the arduino sketches in
eclipse. IDE 1.5.1.
Until now I build upon the winavr plugin that took care of the
toolchain. As Arduino now also supports non AVR chips I'm
implementing my own toolchain to be able to switch between AVR and
ARM.
I'm currently trying to make it work with ARM only with the idea to
extend it to AVR later.
I'm currently able to launch the build that executes the correct
compiler but I get a "ld error".
The console output looks like this.
23:00:22 **** Build of configuration Release for project
testAI ****
make all
Building file: ../testAI.cpp
Starting C++ compile
"/home/jan/programs/arduino-1.5.1/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-g++"
-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param
max-inline-insns-single=500 -fno-rtti -fno-exceptions
-Dprintf=iprintf -mcpu=cortex-m3 -DF_CPU=84000000L -DARDUINO=1.5.1
-D__SAM3X8E__ -mthumb -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON
"-I/home/jan/programs/arduino-1.5.1/hardware/arduino/sam/system/libsam"
"-I/home/jan/programs/arduino-1.5.1/hardware/arduino/sam/system/CMSIS/CMSIS/Include/"
"-I/home/jan/programs/arduino-1.5.1/hardware/arduino/sam/system/CMSIS/Device/ATMEL/"
-I"/home/jan/programs/arduino-1.5.1/hardware/arduino/sam/cores/arduino"
-I"/home/jan/programs/arduino-1.5.1/hardware/arduino/sam/variants/arduino_due_x"
-o "testAI.o" "../testAI.cpp"
collect2: cannot find 'ld'
Finished building: ../testAI.cpp
make: *** [testAI] Error 1
cc testAI.o -o testAI
23:00:23 Build Finished (took 826ms)
I used to get other errors related to ld but I renamed ld during my
investigation.
Where does this "cc testAI.o -o testAI" output come from?
What I do not understand is that if I run the command dumped in the
console on the command line at the Release folder I do not get the
error
bash-4.1$
"/home/jan/programs/arduino-1.5.1/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-g++"
-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param
max-inline-insns-single=500 -fno-rtti -fno-exceptions
-Dprintf=iprintf -mcpu=cortex-m3 -DF_CPU=84000000L -DARDUINO=1.5.1
-D__SAM3X8E__ -mthumb -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON
"-I/home/jan/programs/arduino-1.5.1/hardware/arduino/sam/system/libsam"
"-I/home/jan/programs/arduino-1.5.1/hardware/arduino/sam/system/CMSIS/CMSIS/Include/"
"-I/home/jan/programs/arduino-1.5.1/hardware/arduino/sam/system/CMSIS/Device/ATMEL/"
-I"/home/jan/programs/arduino-1.5.1/hardware/arduino/sam/cores/arduino"
-I"/home/jan/programs/arduino-1.5.1/hardware/arduino/sam/variants/arduino_due_x"
-o "testAI.o" "../testAI.cpp"
bash-4.1$
I have been reading up on this subject but I fail to find a
solution. The -c (exclude linker) seems not to work in eclipse.
On the collect2 web page
(http://gcc.gnu.org/onlinedocs/gccint/Collect2.html) I found
real-ld in the compiler's search directories.
target-real-ld in PATH.
The file specified in the REAL_LD_FILE_NAME configuration
macro, if specified.
ld in the compiler's search directories.
target-ld in PATH.
So I declared an environment variable with the name
REAL_LD_FILE_NAME and value
"/home/jan/programs/arduino-1.5.1/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-ld"
but that didn't help.
I really don't know what to do now. Any help is appreciated.
Best regards
Jantje
|