Model based design with NXP Kinetis

조회 수: 4 (최근 30일)
Bruno Tremblay
Bruno Tremblay 2019년 5월 13일
답변: Bruno Tremblay 2019년 5월 14일
I'm trying to use the Model based design toolbox for the KV31F Kinetis. While compiling a simple example, I get this error message
"C:\Freescale\CW MCU v11.1\Cross_Tools\arm-none-eabi-gcc-4_7_3/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\CW MCU v11.1\Cross_Tools\arm-none-eabi-gcc-4_7_3/lib/gcc/arm-none-eabi/4.8.0/m4/fp/v4-sp-d16" -L"C:\Freescale\CW MCU v11.1\Cross_Tools\arm-none-eabi-gcc-4_7_3/arm-none-eabi/lib/m4/fp/v4-sp-d16" -( -lm -lc -lgcc -Map kv3xf_adc.map -o kv3xf_adc.elf C:\Freescale\CW MCU v11.1\Cross_Tools\arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-ld: cannot find -lm C:\Freescale\CW MCU v11.1\Cross_Tools\arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-ld: cannot find -lc C:\Freescale\CW MCU v11.1\Cross_Tools\arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-ld: cannot find -lgcc gmake: *** [kv3xf_adc.elf] Error 1
### Build procedure for model: 'kv3xf_adc' aborted due to an error. Error make_rtw: exception id RTW:buildProcess:fatalBuildError message Error(s) encountered while building "kv3xf_adc"
The error seem to come from the mex -setup in Matlab. How can I fix it?
Regards
Bruno

답변 (1개)

Bruno Tremblay
Bruno Tremblay 2019년 5월 14일
After some researches, the problem is from the mex -setup command in MATLAB R2018b that don't permit to select the right compiler.
>> mex -setup
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required
to update your code to utilize the new API.
You can find more information about this at:
https://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
Is there a patch for this bug?
Bruno

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by