Add the customized libray into KDS project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add the customized libray into KDS project

Jump to solution
1,583 Views
a8Chcx
Contributor V

Hi,

 

I am using KDS 3.0.0, KSDK 1.2.0 and PE to build my project and works fine.

Now, I have the customised library(*.a), *.h files.

 

Could anybody tell me how to add them into my project and call the functions in library in detail?

 

Thanks,

 

Christie

Labels (1)
0 Kudos
1 Solution
1,108 Views
BlackNight
NXP Employee
NXP Employee

Hi Christie,

the library file size has no impact on your final project performance/execution speed. Because the linker will remove/strip off all functions not needed/used. The debug information makes up the most part of your file size, and the debug information does not get loaded on your board anyway: it 'remains' on the PC. Only the pure code gets downloaded to the board. Embedded binaries are different from Windows PC or Embedded Linux binaries :-).

As for stripping off information: see https://sourceware.org/binutils/docs/binutils/strip.html

I hope this helps,

Erich

View solution in original post

0 Kudos
10 Replies
1,108 Views
BlackNight
NXP Employee
NXP Employee

Hi Christie,

you need to list the library in the linker settings, have a look here:

Creating and using Libraries with ARM gcc and Eclipse | MCU on Eclipse

Creating a Library with Kinetis Design Studio | MCU on Eclipse

Erich

0 Kudos
1,108 Views
a8Chcx
Contributor V

Hi Erich,

Thank you for your information.

I copied my library "iNemoEngine_MK64FN1M0VLL12.a" under source directory.

Then I set link path-->/{source}, and add library into Library section.

When I link it, it give me the following error "

./arm-none-eabi/bin/ld.exe: cannot find -liNemoEngine_MK64FN1M0VLL12.a"

Does it mean wrong path or wrong file name? How to disable (-l) option?

Thanks,

Christie

0 Kudos
1,108 Views
BlackNight
NXP Employee
NXP Employee

Hi Christie,

have a read in Creating and using Libraries with ARM gcc and Eclipse | MCU on Eclipse

The library has to have 'lib' as beginning of the name and .a as extension.

So your library file name needs to be

libNemoEngine_MK64FN1M0VLL12.a

In the -l Linker option (list of libraries) you only specify

NemoEngine_MK64FN1M0VLL12

I hope this helps,

Erich

0 Kudos
1,108 Views
a8Chcx
Contributor V

Hi Erich,

When modified name by adding lib, then I tried to link, but got the following error. Could you tell me if it is related to library itself or KDS settings?

Can I change the library name like, or have to change in building environment?

Thanks,

Christie

'Invoking: Cross ARM C++ Linker'

arm-none-eabi-g++ -u _printf_float -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "../Project_Settings/Linker_Files/ProcessorExpert.ld" -Xlinker --gc-sections -L"../Project_Settings/Linker_Files" -L"C:\N9DS_V3.5.1\iVT\Sources" -Wl,-Map,"iVT.map" -specs=nano.specs -specs=nosys.specs -o "iVT.elf"  ./Sources/Events.o ./Sources/bno055.o ./Sources/bno055_support.o ./Sources/exit.o ./Sources/main.o  ./SDK/platform/utilities/src/fsl_debug_console.o ./SDK/platform/utilities/src/print_scan.o  ./SDK/platform/system/src/interrupt/fsl_interrupt_manager.o  ./SDK/platform/system/src/clock/MK64F12/fsl_clock_MK64F12.o  ./SDK/platform/system/src/clock/fsl_clock_manager.o ./SDK/platform/system/src/clock/fsl_clock_manager_common.o  ./SDK/platform/osa/src/fsl_os_abstraction_bm.o  ./SDK/platform/hal/src/uart/fsl_uart_hal.o  ./SDK/platform/hal/src/sim/MK64F12/fsl_sim_hal_MK64F12.o  ./SDK/platform/hal/src/rtc/fsl_rtc_hal.o  ./SDK/platform/hal/src/port/fsl_port_hal.o  ./SDK/platform/hal/src/pit/fsl_pit_hal.o  ./SDK/platform/hal/src/osc/fsl_osc_hal.o  ./SDK/platform/hal/src/mcg/fsl_mcg_hal.o ./SDK/platform/hal/src/mcg/fsl_mcg_hal_modes.o  ./SDK/platform/hal/src/lptmr/fsl_lptmr_hal.o  ./SDK/platform/hal/src/i2c/fsl_i2c_hal.o  ./SDK/platform/hal/src/gpio/fsl_gpio_hal.o  ./SDK/platform/hal/src/flexcan/fsl_flexcan_hal.o  ./SDK/platform/drivers/src/uart/fsl_uart_common.o ./SDK/platform/drivers/src/uart/fsl_uart_driver.o  ./SDK/platform/drivers/src/rtc/fsl_rtc_common.o  ./SDK/platform/drivers/src/pit/fsl_pit_common.o ./SDK/platform/drivers/src/pit/fsl_pit_driver.o  ./SDK/platform/drivers/src/i2c/fsl_i2c_common.o ./SDK/platform/drivers/src/i2c/fsl_i2c_master_driver.o ./SDK/platform/drivers/src/i2c/fsl_i2c_shared_function.o ./SDK/platform/drivers/src/i2c/fsl_i2c_slave_driver.o  ./SDK/platform/drivers/src/gpio/fsl_gpio_common.o ./SDK/platform/drivers/src/gpio/fsl_gpio_driver.o  ./SDK/platform/drivers/src/flexcan/fsl_flexcan_common.o ./SDK/platform/drivers/src/flexcan/fsl_flexcan_driver.o  ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/CopyToRam.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/DEFlashPartition.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/DFlashGetProtection.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/DFlashSetProtection.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/EEEWrite.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/EERAMGetProtection.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/EERAMSetProtection.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashCheckSum.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashCommandSequence.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashEraseAllBlock.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashEraseBlock.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashEraseResume.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashEraseSector.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashEraseSuspend.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashGetSecurityState.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashInit.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashProgram.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashProgramCheck.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashProgramOnce.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashProgramSection.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashReadOnce.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashReadResource.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashSecurityBypass.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashVerifyAllBlock.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashVerifyBlock.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/FlashVerifySection.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/PFlashGetProtection.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/PFlashSetProtection.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/PFlashSwap.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/PFlashSwapCtl.o ./SDK/platform/drivers/src/flash/C90TFS/drvsrc/source/SetEEEEnable.o  ./SDK/platform/devices/MK64F12/startup/gcc/startup_MK64F12.o  ./SDK/platform/devices/MK64F12/startup/system_MK64F12.o  ./SDK/platform/devices/startup.o  ./SC/System/PE_low_level_init.o ./SC/System/Peripherals_Init.o  ./SC/Peripherals/FTM0_Init.o  ./GC/Cpu.o ./GC/canVT.o ./GC/clockMan1.o ./GC/dbVT.o ./GC/fmVT.o ./GC/gpsVT.o ./GC/hardware_init.o ./GC/i2cVT.o ./GC/ioVT.o ./GC/osa1.o ./GC/pin_init.o ./GC/ptVT.o   -liNemoEngine_MK64FN1M0VLL12

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(iNemoEngineAPI.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(iNemo_Engine.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(iNemo_Engine_6X.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(iNemoEngine_9p6.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(output_update.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(q2dcm_eml.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(q2ypr2_eml.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(qinv.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(rt_nonfinite.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(rtGetInf.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(rtGetNaN.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(SpacePointAccumulate.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(SpacePointAlgorithm.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(SpacePointCorrection.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(SpacePointGyroProp.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(SpacePointGyroPropRedist.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(SpacePointQuatDivider.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(AsyncHeadway_initialize.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(kalman_3gyro.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(mean.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(median.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(mldivide.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(norm_eml.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(qmult_eml.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(qnorm_eml.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(repmat.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(spMult_1.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(std.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(sum.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(cross3_eml.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(dcm2q_eml.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(interp1q_constrain.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(iNemo_Engine.o): In function `iNemo_update':

C:\Users\federico rizzardini\Desktop\Library_Builder\IAR_Lib_Maker\Libraries\iNemoEngineAll\iNemo_Engine.c:(.text+0x732): undefined reference to `__aeabi_memcpy4'

../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(iNemo_Engine_6X.o): In function `iNemo_update_6X':

C:\Users\federico rizzardini\Desktop\Library_Builder\IAR_Lib_Maker\Libraries\iNemoEngineAll\iNemo_Engine_6X.c:(.text+0x692): undefined reference to `__aeabi_memcpy4'

../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(kalman_3gyro.o): In function `m_kalman_3gyro':

(.text+0x4b4): undefined reference to `__aeabi_memset4'

../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(median.o): In function `m_median':

(.text+0x12c): undefined reference to `__aeabi_memcpy'

../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(median.o): In function `m_median':

(.text+0x164): undefined reference to `__aeabi_memcpy'

../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(spMult_1.o): In function `m_c_spMult_1':

C:\Users\federico rizzardini\Desktop\Library_Builder\IAR_Lib_Maker\Libraries\iNemoEngineAll\spMult_1.c:(.text+0x86): undefined reference to `__aeabi_memclr'

../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(spMult_1.o): In function `m_d_spMult_1':

C:\Users\federico rizzardini\Desktop\Library_Builder\IAR_Lib_Maker\Libraries\iNemoEngineAll\spMult_1.c:(.text+0x144): undefined reference to `__aeabi_memclr'

collect2.exe: error: ld returned 1 exit status

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

15:02:24 Build Finished (took 16s.845ms)

0 Kudos
1,108 Views
BlackNight
NXP Employee
NXP Employee

Hi Christie,

have you built that library with your compiler?

c:/fsl3/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: ../Project_Settings/Linker_Files\libiNemoEngine_MK64FN1M0VLL12.a(iNemo_Engine.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

Tells me that you have not used the same wide character size/settings?

Erich

0 Kudos
1,108 Views
a8Chcx
Contributor V

Hi Erich,

The library is not built by myself. So, I will ask them which KDS version is used and what is the character settings?

For now, can I change the settings on my existing project to make it work with existing library? Or have to change on library side?

Thanks,

Christie

0 Kudos
1,108 Views
a8Chcx
Contributor V

Hi Erich,

The original lib built on IAR is about 775KB.

When it is built on KDS 3.0.0 and KSDK 1.2.0, it is about 3.1MB. Is it reasonable?

Thanks,

Christie

0 Kudos
1,108 Views
BlackNight
NXP Employee
NXP Employee

Hi Christie,

yes. The file size of a library does not tell you anyting about the code size, as the debug information is included. The size of the debug information depends on the object file format, plus the debug information level. If file size is a concern, you can strip of the debug information of the library. This will reduce the file size on disk (useful for Embedded Linux, does not matter for normal embedded systems).

But if you strip of debug information, you cannot do source level debugging any more.

I hope this helps,

Erich

0 Kudos
1,108 Views
a8Chcx
Contributor V

Hi Erich,

Based on my understanding, the library file size will not affect my project size that is using KDS 3.0.0? Will not affect my project performance, like execution speed, and etc...?

Can I strip the debug information in my final project? If so, and how?

If not, could you tell me how to strip debug information in library project?

Thanks,

Christie

0 Kudos
1,109 Views
BlackNight
NXP Employee
NXP Employee

Hi Christie,

the library file size has no impact on your final project performance/execution speed. Because the linker will remove/strip off all functions not needed/used. The debug information makes up the most part of your file size, and the debug information does not get loaded on your board anyway: it 'remains' on the PC. Only the pure code gets downloaded to the board. Embedded binaries are different from Windows PC or Embedded Linux binaries :-).

As for stripping off information: see https://sourceware.org/binutils/docs/binutils/strip.html

I hope this helps,

Erich

0 Kudos