AnsweredAssumed Answered

building kds 2.0.0, sdk 1.0.0 project in kds 3.0

Question asked by bashir ESLAM on Apr 13, 2017
Latest reply on Apr 16, 2017 by Alice_Yang

I have imported a project that was built in KDS v2.0.0, into KDS v3.2. The KSDK used for this imported project was KSDK 1.0.0. 

I have installed the KSDK 1.0.0 in the default location (which is c:\Freescale, and the new ksdk 1.3.0 also resides there)I corrected the KSDK_PATH variable to point to  KSDK 1.0.0 (i.e. c:\Freescale\sdk_1.0.0). 

Then built the platform library, using the KSDK 1.0.0.

Updated the properties for the imported project in c/c++ build/settings/linker/misc by adding reference to the location of the platform library  (for the platform library following instructions at: http://www.nxp.com/assets/documents/data/en/user-guides/KSDK13GSUG.pdf )

When I try to build the project, I get errors at the linker stage (the  building of all targets before linking works correctly):

 

 

Finished building: ../Project_Settings/Startup_Code/system_MK64F12.c

 

Building target: Ku50W_MC.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 "Debug/K64FX512xxx12_flash.ld" -Xlinker --gc-sections -L"C:/Users/bashir/workspace.kds/Ku50W_MC/Project_Settings/Linker_Files" -Wl,-Map,"Ku50W_MC.map" -v -o "Ku50W_MC.elf" ./Sources/Adc.o ./Sources/Adc_MCP3428.o ./Sources/Atten_PE43701.o ./Sources/CircBuffer.o ./Sources/Command.o ./Sources/Control.o ./Sources/Crc.o ./Sources/Dac_Mcp4728.o ./Sources/FTM.o ./Sources/Flash_IS25LD020.o ./Sources/I2C.o ./Sources/I2C0.o ./Sources/I2C1.o ./Sources/Init.o ./Sources/Log.o ./Sources/Luts.o ./Sources/Parser.o ./Sources/RAM_23A1024.o ./Sources/Spi.o ./Sources/Spi1.o ./Sources/Spi2.o ./Sources/Uart0.o ./Sources/Uart1.o ./Sources/Uart2.o ./Sources/Uart3.o ./Sources/Update.o ./Sources/Utils.o ./Sources/main.o ./Project_Settings/Startup_Code/startup.o ./Project_Settings/Startup_Code/startup_MK64F12.o ./Project_Settings/Startup_Code/system_MK64F12.o C:/Freescale/KSDK_1.0.0/lib/ksdk_platform_lib/kds/K64F12/Debug/ksdk_platform_lib.a

Using built-in specs.

COLLECT_GCC=arm-none-eabi-g++

COLLECT_LTO_WRAPPER=c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/lto-wrapper.exe

Target: arm-none-eabi

Configured with: /home/build/work/GCC-4-8-build/src/gcc/configure --build=i686-linux-gnu --host=i686-w64-mingw32 --target=arm-none-eabi --prefix=/home/build/work/GCC-4-8-build/install-mingw --libexecdir=/home/build/work/GCC-4-8-build/install-mingw/lib --infodir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/info --mandir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build/work/GCC-4-8-build/install-mingw/arm-none-eabi --with-libiconv-prefix=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr --with-gmp=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr --with-mpfr=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr --with-mpc=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr --with-isl=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr --with-cloog=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr --with-libelf=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r

Thread model: single

gcc version 4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147] (GNU Tools for ARM Embedded Processors)

COMPILER_PATH=c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/;c:/freescale/kds_v3/toolchain/bin/../lib/gcc/;c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/

LIBRARY_PATH=c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/armv7e-m/fpu/;c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu/;c:/freescale/kds_v3/toolchain/bin/../arm-none-eabi/lib/armv7e-m/fpu/;c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/;c:/freescale/kds_v3/toolchain/bin/../lib/gcc/;c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/;c:/freescale/kds_v3/toolchain/bin/../arm-none-eabi/lib/

COLLECT_GCC_OPTIONS='-mcpu=cortex-m4' '-mthumb' '-mfloat-abi=hard' '-mfpu=fpv4-sp-d16' '-O0' '-fmessage-length=0' '-fsigned-char' '-ffunction-sections' '-fdata-sections' '-g3' '-T' 'Debug/K64FX512xxx12_flash.ld' '-LC:/Users/bashir/workspace.kds/Ku50W_MC/Project_Settings/Linker_Files' '-v' '-o' 'Ku50W_MC.elf'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/collect2.exe --sysroot=c:\freescale\kds_v3\toolchain\bin\../arm-none-eabi -X -o Ku50W_MC.elf c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/armv7e-m/fpu/crti.o c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/armv7e-m/fpu/crtbegin.o c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu/crt0.o -LC:/Users/bashir/workspace.kds/Ku50W_MC/Project_Settings/Linker_Files -Lc:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/armv7e-m/fpu -Lc:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu -Lc:/freescale/kds_v3/toolchain/bin/../arm-none-eabi/lib/armv7e-m/fpu -Lc:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4 -Lc:/freescale/kds_v3/toolchain/bin/../lib/gcc -Lc:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib -Lc:/freescale/kds_v3/toolchain/bin/../arm-none-eabi/lib --gc-sections -Map Ku50W_MC.map ./Sources/Adc.o ./Sources/Adc_MCP3428.o ./Sources/Atten_PE43701.o ./Sources/CircBuffer.o ./Sources/Command.o ./Sources/Control.o ./Sources/Crc.o ./Sources/Dac_Mcp4728.o ./Sources/FTM.o ./Sources/Flash_IS25LD020.o ./Sources/I2C.o ./Sources/I2C0.o ./Sources/I2C1.o ./Sources/Init.o ./Sources/Log.o ./Sources/Luts.o ./Sources/Parser.o ./Sources/RAM_23A1024.o ./Sources/Spi.o ./Sources/Spi1.o ./Sources/Spi2.o ./Sources/Uart0.o ./Sources/Uart1.o ./Sources/Uart2.o ./Sources/Uart3.o ./Sources/Update.o ./Sources/Utils.o ./Sources/main.o ./Project_Settings/Startup_Code/startup.o ./Project_Settings/Startup_Code/startup_MK64F12.o ./Project_Settings/Startup_Code/system_MK64F12.o C:/Freescale/KSDK_1.0.0/lib/ksdk_platform_lib/kds/K64F12/Debug/ksdk_platform_lib.a -lstdc++ -lm --start-group -lgcc -lg -lc --end-group c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/armv7e-m/fpu/crtend.o c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/armv7e-m/fpu/crtn.o -T Debug/K64FX512xxx12_flash.ld

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-exit.o): In function `exit':

exit.c:(.text.exit+0x16): undefined reference to `_exit'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-abort.o): In function `abort':

abort.c:(.text.abort+0xa): undefined reference to `_exit'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-sbrkr.o): In function `_sbrk_r':

sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-signalr.o): In function `_kill_r':

signalr.c:(.text._kill_r+0xe): undefined reference to `_kill'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-signalr.o): In function `_getpid_r':

signalr.c:(.text._getpid_r+0x0): undefined reference to `_getpid'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-writer.o): In function `_write_r':

writer.c:(.text._write_r+0x10): undefined reference to `_write'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-closer.o): In function `_close_r':

closer.c:(.text._close_r+0xc): undefined reference to `_close'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-fstatr.o): In function `_fstat_r':

fstatr.c:(.text._fstat_r+0xe): undefined reference to `_fstat'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-isattyr.o): In function `_isatty_r':

isattyr.c:(.text._isatty_r+0xc): undefined reference to `_isatty'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-lseekr.o): In function `_lseek_r':

lseekr.c:(.text._lseek_r+0x10): undefined reference to `_lseek'

c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-readr.o): In function `_read_r':

readr.c:(.text._read_r+0x10): undefined reference to `_read'

collect2.exe: error: ld returned 1 exit status

makefile:52: recipe for target 'Ku50W_MC.elf' failed

make: *** [Ku50W_MC.elf] Error 1

 

10:41:21 Build Finished (took 11s.985ms)

Outcomes