I had a project that built fine on KDS 2.0, but now that I have upgraded to KDS 3.1 I get the linker errors below. I followed the migrating procedure (using the KDS Upgrade Assistant) as described here: Kinetis Design Studio: Migrating KDS V2.0.0 Projects to GNU Tools for ARM Embedded (Launchpad, KDS V...
I am building a Segger graphics library first (emWin_V528b), then linking to that library in my application (called A9950V0002). Any help would be appreciated.
-Mike
**************************
'Building target: A9950V0002_dbg.elf'
'Invoking: Cross ARM C++ Linker'
arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -T "C:/Users/Mike/workspace.kds/A9950V0002/Project_Settings/Linker_Files/ProcessorExpert.ld" -Xlinker --gc-sections -L"C:/Users/Mike/workspace.kds/A9950V0002/Project_Settings/Linker_Files" -L"C:\Users\Mike\workspace.kds\emWin_V528b\Debug" -Wl,-Map,"A9950V0002_dbg.map" --specs=nano.specs -o "A9950V0002_dbg.elf" @ObjectList
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `_cleanup_r':
findfp.c:(.text._cleanup_r+0x0): multiple definition of `_cleanup_r'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text._cleanup_r+0x0): first defined here
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sfmoreglue':
findfp.c:(.text.__sfmoreglue+0x0): multiple definition of `__sfmoreglue'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sfmoreglue+0x0): first defined here
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `_cleanup':
findfp.c:(.text._cleanup+0x0): multiple definition of `_cleanup'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text._cleanup+0x0): first defined here
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sinit':
findfp.c:(.text.__sinit+0x0): multiple definition of `__sinit'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sinit+0x0): first defined here
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sfp':
findfp.c:(.text.__sfp+0x0): multiple definition of `__sfp'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sfp+0x0): first defined here
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sfp_lock_acquire':
findfp.c:(.text.__sfp_lock_acquire+0x0): multiple definition of `__sfp_lock_acquire'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sfp_lock_acquire+0x0): first defined here
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sfp_lock_release':
findfp.c:(.text.__sfp_lock_release+0x0): multiple definition of `__sfp_lock_release'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sfp_lock_release+0x0): first defined here
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sinit_lock_acquire':
findfp.c:(.text.__sinit_lock_acquire+0x0): multiple definition of `__sinit_lock_acquire'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sinit_lock_acquire+0x0): first defined here
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sinit_lock_release':
findfp.c:(.text.__sinit_lock_release+0x0): multiple definition of `__sinit_lock_release'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sinit_lock_release+0x0): first defined here
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__fp_lock_all':
findfp.c:(.text.__fp_lock_all+0x0): multiple definition of `__fp_lock_all'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__fp_lock_all+0x0): first defined here
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__fp_unlock_all':
findfp.c:(.text.__fp_unlock_all+0x0): multiple definition of `__fp_unlock_all'
C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__fp_unlock_all+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [A9950V0002_dbg.elf] Error 1
已解决! 转到解答。
Hi,
the errors show us that the same symbol is included in two files.
for example, symbol "_cleanup_r" is detected in both of these two files which are both included in your project:
to solve the problem:
- Please go to your project properties setting, remove all KDS2.0 related path and included files.
- go to IDE menu "project", "clean" to clean the old file associations.
can this help you? if not, please post your project here, we can help you check the problem directly.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
the errors show us that the same symbol is included in two files.
for example, symbol "_cleanup_r" is detected in both of these two files which are both included in your project:
to solve the problem:
- Please go to your project properties setting, remove all KDS2.0 related path and included files.
- go to IDE menu "project", "clean" to clean the old file associations.
can this help you? if not, please post your project here, we can help you check the problem directly.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks Jennie, I found out the references to KDS_2.0.0 were in a file "makefile.defs". This file was used to correct a problem in KDS_2.0.0 described here:
KSDK Linker Error - Command line too long
Does KDS 3.1 still have that problem?
Hi Michael,
you are welcome.
according to KDS3.1 release note, this "Windows Command Line Limit" issue is still a known issue which is not fixed yet.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------