Error while building .elf from example

cancel
Showing results for 
Search instead for 
Did you mean: 

Error while building .elf from example

562 Views
Contributor IV

Hi,

this is the final message from diagnostic viewer using embedded coder:

==== Creating kv3xf_adc.elf from obj files ====
"C:\Freescale\KDS_v3\Toolchain/bin/arm-none-eabi-ld" -TMKV3xF.ld startup_MK22F51212.o freemaster_Kxx.o freemaster_appcmd.o freemaster_interface_init.o freemaster_protocol.o freemaster_rec.o freemaster_scope.o freemaster_serial.o freemaster_sfio.o freemaster_tsa.o fsl_adc_driver.o fsl_adc_hal.o fsl_adc_irq.o fsl_clock_manager.o fsl_debug_uart.o fsl_interrupt_manager.o fsl_mcg_hal.o fsl_os_abstraction_bm.o fsl_pit_driver.o fsl_pit_hal.o fsl_pit_irq.o fsl_sim_clock_module_names_K22F51212.o fsl_sim_hal.o fsl_uart_driver.o fsl_uart_hal_common_configurations.o fsl_uart_hal_fifo_configurations.o fsl_uart_hal_interrupts_and_dma.o fsl_uart_hal_status_flags.o fsl_uart_hal_transfer_functions.o kv3xf_adc.o mcd_main.o startup.o sw_timer.o system_MK22F51212.o -L"C:\Freescale\KDS_v3\Toolchain/lib/gcc/arm-none-eabi/4.8.0/m4/fp/v4-sp-d16" -L"C:\Freescale\KDS_v3\Toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16" -( -lm -lc -lgcc -Map kv3xf_adc.map -o kv3xf_adc.elf
C:\Freescale\KDS_v3\Toolchain/bin/arm-none-eabi-ld: cannot find -lm
C:\Freescale\KDS_v3\Toolchain/bin/arm-none-eabi-ld: cannot find -lc
C:\Freescale\KDS_v3\Toolchain/bin/arm-none-eabi-ld: cannot find -lgcc
gmake: *** [kv3xf_adc.elf] Error 1

I'm using Matlab 2016b (newest) and trying to build executable for kv3xf_adc example. We don't have IAR tools at company. We are using CW 10.5 Proffesional version. So, I've installed KDS 3.2.0 (newest version), set the GCC environment variable to '...KDS_v3\Toolchain' and changed the 'Compiler Selection' in 'Target Compiler Opts' to "GCC". What to do next - to fix this Error ?

Has anyone tested the motor control toolbox with newer toolsets (like KDS, Matlab after 2015b etc.) ?

I've also seen that there is no system target file for KV5 parts in Config Parameters. But it was suggested (by Eduardo) that TWR-KV58F220M is supported by MCToolbox. Am I missing something (maybe different TWR system is a better choice) ?

Thanks for help...

Maciek

0 Kudos
2 Replies

67 Views
NXP Employee
NXP Employee

Hi Maciek,
   For KV3x, KV4x and KV5x the IAR for ARM v7.10 is the only compiler supported in current release. Regarding the KV5x we discovered some issues with install package but should be corrected now. Please re-download and re-install the MCToolbox and should contain all KV families.
Regards,
Radu

0 Kudos

67 Views
Contributor IV

my environment variable is GCC_ARM_TOOL = D:\Freescale\KDS_3.0.0\toolchain\bin\arm-none-eabi-gcc-4.8.4.when I build the mdl,the error is "cann't find startup_MK22F51212.o".

under is the error

### Processing Template Makefile: E:\MCToolbox\mctbx_Kinetis\mctbx_kv3xf\mctbx_kv3xf\mcd_kv3xf.tmf
### Creating kv3xf_gpio.mk from E:\MCToolbox\mctbx_Kinetis\mctbx_kv3xf\mctbx_kv3xf\mcd_kv3xf.tmf
### Building kv3xf_gpio: .\kv3xf_gpio.bat

C:\Users\Administrator\Desktop\light_control\kv3xf_gpio_mcd_rtw>set MATLAB=F:\Program Files\MATLAB\R2015b 

C:\Users\Administrator\Desktop\light_control\kv3xf_gpio_mcd_rtw>"F:\Program Files\MATLAB\R2015b\bin\win64\gmake" -f kv3xf_gpio.mk COPY_MDLREF_INCLUDES=0 CMSIS_NEED=0 CMSIS_LIB= GENERATE_ERT_S_FUNCTION=0 INCLUDE_MDL_TERMINATE_FCN=1 COMBINE_OUTPUT_UPDATE_FCNS=1 MULTI_INSTANCE_CODE=0 INTEGER_CODE=0 TARGET_SYSTEM_CLOCK="80" MCU_CRYSTAL_FREQ="External 8" GCC_TARGET_DEFAULT_LCF=1 GCC_TARGET_USER_LCF="MKV31F512xxx12_flash.ld" IAR_TARGET_DEFAULT_LCF=1 IAR_TARGET_USER_LCF="MKV31F512xxx12_flash.icf" PIL_DOWNLOAD=0 RBL_DOWNLOAD=0 ISPROTECTINGMODEL=NOTPROTECTING 
Cleaning...
RELATIVE_PATH_TO_ANCHOR is ..
==== Removing object files from build directory ====
Copying necessary files to build directory...
Compiler details : "D:\Freescale\KDS_3.0.0\toolchain\bin\arm-none-eabi-gcc-4.8.4/bin/arm-none-eabi-gcc" -c -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -g -gstrict-dwarf -DARM_MATH_CM4 -o SetupFiles -DCPU_MK22FN512VDC12 -DDEBUG -I. -I.. -IC:\Users\Administrator\Desktop\light_control\kv3xf_gpio_mcd_rtw -IC:\Users\Administrator\Desktop\light_control -IE:\MCToolbox\mctbx_Kinetis\mctbx_kv3xf\Examples  -I"F:\Program Files\MATLAB\R2015b\simulink\include" -I"F:\Program Files\MATLAB\R2015b\extern\include" -I"F:\Program Files\MATLAB\R2015b\rtw\c\src" -I"F:\Program Files\MATLAB\R2015b\rtw\c\libsrc" -I"F:\Program Files\MATLAB\R2015b\rtw\c\src\ext_mode\common" -I"F:\Program Files\MATLAB\R2015b\rtw\c\src\ext_mode\tcpip" -I"F:\Program Files\MATLAB\R2015b\rtw\c\src\ext_mode\serial" -I"F:\Program Files\MATLAB\R2015b\rtw\c\src\ext_mode\custom" -I"D:\Freescale\KDS_3.0.0\toolchain\bin\arm-none-eabi-gcc-4.8.4/arm-none-eabi/include"    -I".\device" -I".\device\MK22F51212" -I"..\device" -I"..\device\MK22F51212"
Assembler details :
Building file startup_MK22F51212.o...
"D:\Freescale\KDS_3.0.0\toolchain\bin\arm-none-eabi-gcc-4.8.4/bin/arm-none-eabi-as" -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -o startup_MK22F51212.o startup_MK22F51212.s
系统找不到指定的路径。
gmake: *** [startup_MK22F51212.o] Error 1

0 Kudos