MATLAB Answers

STM32F4 build error for simulink model 'stm32f4di​scovery_ge​ttingstart​ed.slx'

9 views (last 30 days)
Lavanya SB
Lavanya SB on 27 Dec 2018
Commented: Lavanya SB on 27 Dec 2018
I am currently trying to build example simulink model, but I am end up with this error. If anyone can suggest a way around, I will be greatful.
### Starting build procedure for model: stm32f4discovery_gettingstarted
### Generating code and artifacts to 'Model specific' folder structure
Code Generation 1
Elapsed: 7 sec
### Generating code into build folder: C:\Users\Lavanya\Documents\MATLAB\stm32f4discovery_gettingstarted_ert_rtw
### Invoking Target Language Compiler on stm32f4discovery_gettingstarted.rtw
### Using System Target File: C:\Program Files\MATLAB\R2018b\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_gettingstarted_types.h
### Writing header file stm32f4discovery_gettingstarted.h
### Writing header file rtwtypes.h
.
### Writing source file stm32f4discovery_gettingstarted.c
### Writing header file stm32f4discovery_gettingstarted_private.h
### Writing source file stm32f4discovery_gettingstarted_data.c
### Writing header file rtmodel.h
### Writing source file ert_main.c
.
### TLC code generation complete.
### Evaluating PostCodeGenCommand specified in the model
### Using toolchain: GNU Tools for ARM Embedded Processors v7.2.1 | gmake (64-bit Windows)
### 'C:\Users\Lavanya\Documents\MATLAB\stm32f4discovery_gettingstarted_ert_rtw\stm32f4discovery_gettingstarted.mk' is up to date
### Building 'stm32f4discovery_gettingstarted': "C:\PROGRA~1\MATLAB\R2018b\bin\win64\gmake" -f stm32f4discovery_gettingstarted.mk all
MW_GNU_ARM_TOOLS_PATH = C:/PROGRA~3/MATLAB/SUPPOR~1/R2018b/3P778C~1.INS/GNUARM~1.INS/win/bin
C:\Users\Lavanya\Documents\MATLAB\stm32f4discovery_gettingstarted_ert_rtw>cd .
C:\Users\Lavanya\Documents\MATLAB\stm32f4discovery_gettingstarted_ert_rtw>if "" == "" ("C:\PROGRA~1\MATLAB\R2018b\bin\win64\gmake" -f stm32f4discovery_gettingstarted.mk all ) else ("C:\PROGRA~1\MATLAB\R2018b\bin\win64\gmake" -f stm32f4discovery_gettingstarted.mk )
C:/PROGRA~3/MATLAB/SUPPOR~1/R2018b/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-gcc -ffunction-sections -fdata-sections -Wall -MMD -MP -MF"stm32f4discovery_gettingstarted.dep" -MT"stm32f4discovery_gettingstarted.o" -c -O0 -mcpu=cortex-m4 -mthumb -mlittle-endian -mthumb-interwork -mfpu=fpv4-sp-d16 -mfloat-abi=hard -include stm32f4discovery_wrapper.h -DMODEL=stm32f4discovery_gettingstarted -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DUSE_STDPERIPH_DRIVER -DUSE_STM32F4_DISCOVERY -DSTM32F4XX -DARM_MATH_CM4=1 -D__FPU_PRESENT=1 -D__FPU_USED=1U -DHSE_VALUE=8000000 -DNULL=0 -D__START=_start -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DUSE_STDPERIPH_DRIVER -DUSE_STM32F4_DISCOVERY -DSTM32F4XX -DARM_MATH_CM4=1 -D__FPU_PRESENT=1 -D__FPU_USED=1U -DHSE_VALUE=8000000 -DNULL=0 -D__START=_start -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=stm32f4discovery_gettingstarted -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -IC:/Users/Lavanya/Documents/MATLAB -IC:/Users/Lavanya/Documents/MATLAB/stm32f4discovery_gettingstarted_ert_rtw -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2018b/toolbox/target/SUPPOR~1/STM32F~1/STM32F~1 -IC:/PROGRA~1/MATLAB/R2018b/extern/include -IC:/PROGRA~1/MATLAB/R2018b/simulink/include -IC:/PROGRA~1/MATLAB/R2018b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2018b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2018b/rtw/c/ert -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2018b/toolbox/target/SUPPOR~1/ARMCOR~1/SCHEDU~1/include -IC:/PROGRA~1/MATLAB/R2018b/rtw/c/src/ext_mode/serial -IE:/Research/CSD_course_TA/Download files/en.stsw-stm32068_firmware/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Include -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2018b/3P778C~1.INS/CMSIS~1.INS/CMSIS/Include -IE:/Research/CSD_course_TA/Download files/en.stsw-stm32068_firmware/STM32F4-Discovery_FW_V1.1.0/Project/Peripheral_Examples/SysTick -IE:/Research/CSD_course_TA/Download files/en.stsw-stm32068_firmware/STM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/inc -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2018b/toolbox/target/SUPPOR~1/STM32F~1/include -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2018b/toolbox/target/SUPPOR~1/ARMCOR~1/CMSIS_~1/include @stm32f4discovery_gettingstarted_comp.rsp -o stm32f4discovery_gettingstarted.o stm32f4discovery_gettingstarted.c
arm-none-eabi-gcc: error: files/en.stsw-stm32068_firmware/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Include: No such file or directory
arm-none-eabi-gcc: error: files/en.stsw-stm32068_firmware/STM32F4-Discovery_FW_V1.1.0/Project/Peripheral_Examples/SysTick: No such file or directory
arm-none-eabi-gcc: error: files/en.stsw-stm32068_firmware/STM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/inc: No such file or directory
gmake: *** [stm32f4discovery_gettingstarted.o] Error 1
C:\Users\Lavanya\Documents\MATLAB\stm32f4discovery_gettingstarted_ert_rtw>echo The make command returned an error of 2
The make command returned an error of 2
C:\Users\Lavanya\Documents\MATLAB\stm32f4discovery_gettingstarted_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.
### Build procedure for model: 'stm32f4discovery_gettingstarted' aborted due to an error.
Error(s) encountered while building "stm32f4discovery_gettingstarted":
### Failed to generate all binary outputs.
Component:Simulink | Category:Block diagram error

Accepted Answer

Walter Roberson
Walter Roberson on 27 Dec 2018
You have configured some include directories on E: drive. Those directories have spaces in their name. You need to reconfigure the directory names to use the old style ~ names at least for the components that have spaces , just like the way the C:\Program Files directory has been represented as C:\Program~3

More Answers (0)

Community Treasure Hunt

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

Start Hunting!