I am trying to set up my Arduino Due project under the eclipse with the newest plugin from This is not the way to install the plugin but when I am building it, I got this linking error:
Starting combiner
"D:/Development/Arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-g++" -Os -Wl,--gc-sections -mcpu=cortex-m3 "-TD:/Development/Arduino/arduino-1.5.1r2/hardware/arduino/sam/variants/arduino_due_x/linker_scripts/gcc/flash.ld" "-Wl,-Map,D:/Temp/eclipse/Workspace/Firmware/Release/Firmware.map" -o "D:/Temp/eclipse/Workspace/Firmware/Release/Firmware.elf" "-LD:/Temp/eclipse/Workspace/Firmware/Release" -lm -lgcc -mthumb -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 -Wl,--start-group ./libs/ClickDelayedOffSwitcher.cpp.o ./libs/ClickDelayedSwitcher.cpp.o ./libs/ClickMultiSwitchers.cpp.o ./libs/ClickNextSwitcher.cpp.o ./libs/ClickPressReleaseSwitcher.cpp.o ./libs/ClickSwitcher.cpp.o ./libs/OffSwitcher.cpp.o ./libs/OnOffSwitcher.cpp.o ./libs/PressReleaseSwitcher.cpp.o ./libs/SmartyHomeCore.cpp.o ./libs/TemperatureSensor.cpp.o ./Firmware.cpp.o D:/Temp/eclipse/Workspace/Firmware/Release/arduino.ar "D:/Development/Arduino/arduino-1.5.1r2/hardware/arduino/sam/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a" "D:/Temp/eclipse/Workspace/Firmware/Release/arduino.ar" -Wl,--end-group
d:/development/arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-abort.o): In function abort': abort.c:(.text+0xa): warning: undefined reference to _exit'
d:/development/arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-sbrkr.o): In function _sbrk_r': sbrkr.c:(.text+0x12): warning: undefined reference to _sbrk'
d:/development/arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-signalr.o): In function _kill_r': signalr.c:(.text+0x18): warning: undefined reference to _kill'
d:/development/arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-signalr.o): In function _getpid_r': signalr.c:(.text+0x0): warning: undefined reference to _getpid'
d:/development/arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-writer.o): In function _write_r': writer.c:(.text+0x16): warning: undefined reference to _write'
d:/development/arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-closer.o): In function _close_r': closer.c:(.text+0x12): warning: undefined reference to _close'
d:/development/arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-fstatr.o): In function _fstat_r': fstatr.c:(.text+0x14): warning: undefined reference to _fstat'
d:/development/arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-isattyr.o): In function _isatty_r': isattyr.c:(.text+0x12): warning: undefined reference to _isatty'
d:/development/arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-lseekr.o): In function _lseek_r': lseekr.c:(.text+0x16): warning: undefined reference to _lseek'
d:/development/arduino/arduino-1.5.1r2/hardware/tools/g++_arm_none_eabi/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-readr.o): In function _read_r': readr.c:(.text+0x16): warning: undefined reference to _read'
Finished building: Firmware.elf
I don't know what to do in order to avoid thesse warnings and to create successfully the .elf file.
Can you help me please?
SirNickity:
Sorry OP -- I have no experience with Eclipse (nor the Due) so I can't offer any advice, but I do feel that someone here probably can.
It's a bit like asking your butcher for advice when your car goes wrong. He may know a little bit about cars, but really you're asking in the wrong place.
Haha -- maybe if you're driving a meat wagon. (badump-tish)
Being gcc errors, it might just be a missing lib file that should be included. It kinda looks like this post at AVR Freaks:
My guess is that either a reference to -lgcc has been missing, or the required sequence -lc -lgcc -lc was incomplete. The latter is really needed, libc.a needs to be searched twice because libgcc.a could cause additional unresolved symbols that need to be resolved there.
I am using V2 1.0.4 but i notice there is no linker in the arduino Toolchain similar to ARM linux GCC(Sourcery G++ Lite) which it does have ARM Sourcery Linux GCC C++ linker and ARM Sourcery Linux GCC C linker. I wonder if there is any alternative way to perform the linking as I am in process of using relic-toolkit with arduino Due in which i need to link librelic.a file to my project
malbahri
My first advice: do not use archives at the project level.
My second advice: If your archive solution doesn't work; don't come to me.
My third advice: If you really need a additional library: consider creating a different board.
Again for many reasons I think it is a really dangerous idea to add a library at the project level. With the changes I see happening in Arduino it becomes more and more dangerous.
But if you really want to do so:
The linker is called "combiner" in arduino speak.
You can change the combiner command in the plugin at the project properties ->C/C++build->settings->Arduino combiner
There you can add any archive you want to the command. I would add it after ${A.RECIPE.C.COMBINE.PATTERN.2}
I received the very same question from the very same guy but with embedXcode this time.
I've spent a lot of time figuring out what was wrong with embedXcode. embedXcode is ok as his project doesn't fit with the Arduino framework —embedXcode throws the same errors as the standard Arduino IDE.
So I strongly recommend him to
use another framework and IDE
develop or adapt the specific library yourself to the Arduino framework
I should have invoiced him 4 hours @ 125 USD for consulting.
Rather strange to accuse a tool when clearly it isn't designed for.
Jantje:
malbahri
My first advice: do not use archives at the project level.
My second advice: If your archive solution doesn't work; don't come to me.
My third advice: If you really need a additional library: consider creating a different board.
Again for many reasons I think it is a really dangerous idea to add a library at the project level. With the changes I see happening in Arduino it becomes more and more dangerous.
But if you really want to do so:
The linker is called "combiner" in arduino speak.
You can change the combiner command in the plugin at the project properties ->C/C++build->settings->Arduino combiner
There you can add any archive you want to the command. I would add it after ${A.RECIPE.C.COMBINE.PATTERN.2}
avenue33:
I received the very same question from the very same guy but with embedXcode this time.
I've spent a lot of time figuring out what was wrong with embedXcode. embedXcode is ok as his project doesn't fit with the Arduino framework —embedXcode throws the same errors as the standard Arduino IDE.
So I strongly recommend him to
use another framework and IDE
develop or adapt the specific library yourself to the Arduino framework
I should have invoiced him 4 hours @ 125 USD for consulting.
Rather strange to accuse a tool when clearly it isn't designed for.
Thank you very much for your help and support by the way if you want I am ready to bay this a mount, but I hope next time when you provide your support and you want to charge the person just telling him in advance. We are here to seek the knowledge and do the knoweldge transfer as much as we can. Finally, please make sure that personally I am not trying to ask for help until I feel I have done my best level and it is the time for calling a help
Again thanks a lot for your valuble time
Jantje:
malbahri
My first advice: do not use archives at the project level.
My second advice: If your archive solution doesn't work; don't come to me.
My third advice: If you really need a additional library: consider creating a different board.
Again for many reasons I think it is a really dangerous idea to add a library at the project level. With the changes I see happening in Arduino it becomes more and more dangerous.
But if you really want to do so:
The linker is called "combiner" in arduino speak.
You can change the combiner command in the plugin at the project properties ->C/C++build->settings->Arduino combiner
There you can add any archive you want to the command. I would add it after ${A.RECIPE.C.COMBINE.PATTERN.2}
money talks bullshit walks.
Have you seen money 8)
Don't worry. It probably is a cultural/language difference.
But it is frustrating by times that many people believe that 3th party tool providers get paid by Arduino.
It is true that the Arduino core team has provided me some boards I use for testing. I'm grateful for that.
But that would not be enough to pay the 4 hours of avenue33.