Model based design with NXP Kinetis

5 visualizaciones (últimos 30 días)
Bruno Tremblay
Bruno Tremblay el 13 de Mayo de 2019
Respondida: Bruno Tremblay el 14 de Mayo de 2019
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

Respuestas (1)

Bruno Tremblay
Bruno Tremblay el 14 de Mayo de 2019
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

Community Treasure Hunt

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

Start Hunting!

Translated by