AnsweredAssumed Answered

Error when Building STM32-MAT blocks in Simulink

Question asked by ddub on Oct 29, 2015
Latest reply on Nov 4, 2015 by ddub
I' have tried to build this model in both Matlab 2014b and 2015a and both fail.

Whenever I try to build a model containing the STM32-MAT blocks in Simulink I get an error "### Failed to generate all binary outputs."

This error does not occur when building a model containing blocks from the Embedded Coder Support Package for the STM32F4 Discovery Board.  This only occurs with the STM32-MAT blocks from http://www.st.com/web/en/catalog/tools/PF258513#

The error is as follows:


### Generating code into build folder: E:\Projects\VehNAV\work\stm32f4discovery_led4_ert_rtw ### Invoking Target Language Compiler on stm32f4discovery_led4.rtw ### Using System Target File: E:\MATLAB\R2014b\rtw\c\ert\ert.tlc ### Loading TLC function libraries ### Initial pass through model to cache user defined code ### Caching model source code ### Writing header file stm32f4discovery_led4.h ### Writing source file stm32f4discovery_led4.c ### Writing header file stm32f4discovery_led4_I2C.h ### Writing source file stm32f4discovery_led4_I2C.c ### Writing header file stm32f4discovery_led4_types.h ### Writing header file rtwtypes.h ### Writing header file stm32f4discovery_led4_private.h ### Writing source file stm32f4discovery_led4_data.c ### Writing header file rtmodel.h ### Writing source file ert_main.c ### TLC code generation complete.

Adding source and include directories to make process. ### WARNING: Unable to run 'rtwmakecfg' file in directory: 'C:\MATLAB\STM32-MAT\STM32\blks\mex' due to error: 'group STM32 does not exist' ### Evaluating PostCodeGenCommand specified in the model ### Writing source file arm_cortex_m_multitasking.c ### Using toolchain: GNU Tools for ARM Embedded Processors v4.7 | gmake (64-bit Windows) ### Creating 'E:\Projects\VehNAV\work\stm32f4discovery_led4_ert_rtw\stm32f4discovery_led4.mk' ... ### Using toolchain: GNU Tools for ARM Embedded Processors v4.7 | gmake (64-bit Windows) ### Creating 'E:\Projects\VehNAV\work\stm32f4discovery_led4_ert_rtw\stm32f4discovery_led4.mk' ... ### Building 'stm32f4discovery_led4': E:\MATLAB\R2014b\bin\win64\gmake -f stm32f4discovery_led4.mk all E:\Projects\VehNAV\work\stm32f4discovery_led4_ert_rtw>cd . E:\Projects\VehNAV\work\stm32f4discovery_led4_ert_rtw>if "" == "" (E:\MATLAB\R2014b\bin\win64\gmake -f stm32f4discovery_led4.mk all )  else (E:\MATLAB\R2014b\bin\win64\gmake -f stm32f4discovery_led4.mk  ) arm-none-eabi-gcc -std=c99 -MD -ffunction-sections -fdata-sections -Wall -c -O0 -mcpu=cortex-m4 -mthumb -mlittle-endian -mthumb-interwork -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -include stm32f4xx.h -DMODEL=stm32f4discovery_led4 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DUSE_STDPERIPH_DRIVER -DUSE_STM32F4_DISCOVERY -DSTM32F4XX -DARM_MATH_CM4=1 -D__FPU_PRESENT=1 -D__FPU_USED=1 -DHSE_VALUE=8000000 -DNULL=0 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DRT -DSTACK_SIZE=64 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DUSE_STDPERIPH_DRIVER -DUSE_STM32F4_DISCOVERY -DSTM32F4XX -DARM_MATH_CM4=1 -D__FPU_PRESENT=1 -D__FPU_USED=1 -DHSE_VALUE=8000000 -DNULL=0 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DRT -DSTACK_SIZE=64 -DMODEL=stm32f4discovery_led4 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IE:/Projects/VehNAV/work/stm32f4discovery_led4_ert_rtw -IE:/Projects/VehNAV/work -IC:/MATLAB/SupportPackages/R2014b/stmicroelectronicsstm32f4discovery/toolbox/target/supportpackages/stm32f4discovery/stm32f4discoveryexamples -IE:/MATLAB/R2014b/extern/include -IE:/MATLAB/R2014b/simulink/include -IE:/MATLAB/R2014b/rtw/c/src -IE:/MATLAB/R2014b/rtw/c/src/ext_mode/common -IE:/MATLAB/R2014b/rtw/c/ert -IE:/MATLAB/R2014b/rtw/c/src/ext_mode/serial -IC:/MATLAB/SupportPackages/R2014b/armcortexm/toolbox/target/supportpackages/arm_cortex_m/scheduler/include -IC:/MATLAB/SupportPackages/R2014b/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Include -IC:/CMSIS/CMSIS/Include -IC:/MATLAB/SupportPackages/R2014b/STM32F4-Discovery_FW_V1.1.0/Project/Peripheral_Examples/SysTick -IC:/MATLAB/SupportPackages/R2014b/STM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/inc -IC:/MATLAB/SupportPackages/R2014b/stmicroelectronicsstm32f4discovery/toolbox/target/supportpackages/stm32f4discovery/@slCustomizer/../include -o "stm32f4discovery_led4.o" "E:/Projects/VehNAV/work/stm32f4discovery_led4_ert_rtw/stm32f4discovery_led4.c" In file included from E:/Projects/VehNAV/work/stm32f4discovery_led4_ert_rtw/stm32f4discovery_led4.h:20:0, from E:/Projects/VehNAV/work/stm32f4discovery_led4_ert_rtw/stm32f4discovery_led4.c:16: E:/Projects/VehNAV/work/stm32f4discovery_led4_ert_rtw/stm32f4discovery_led4_I2C.h:18:41: fatal error: stm32f4discovery_led4_STM32.h: No such file or directory compilation terminated. gmake: *** [stm32f4discovery_led4.o] Error 1 E:\Projects\VehNAV\work\stm32f4discovery_led4_ert_rtw>echo The make command returned an error of 2 The make command returned an error of 2 E:\Projects\VehNAV\work\stm32f4discovery_led4_ert_rtw>An_error_occurred_during_the_call_to_make 'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command, operable program or batch file.

[Warning: The following error was caught while executing 'onCleanup' class destructor: Invalid or deleted object.] ### Build procedure for model: 'stm32f4discovery_led4' aborted due to an error.

Error(s) encountered while building model "stm32f4discovery_led4": ### Failed to generate all binary outputs.


Outcomes