- Set up the workspace path as same as your Simulink path.
- Make sure you are using the right Model Configurations for building the model. Refer and navigate through this documentation for more details: https://www.mathworks.com/help/rtw/ug/code-generation-configuration.html
- Try shortening your path. Sometimes the path is too long for the model to execute correctly.
- Try building different models and see if the problem is specific to your model. In that case the problem seems specific to the model and needs to be approached differently.
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.
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
### Starting build procedure for: stm32f4discovery_gettingstarted_Test1 ### Generating code and artifacts to 'Model specific' folder structure ### Generating code into build folder: E:\Testttttttttt\stm32f4discovery_gettingstarted_Test1_ert_rtw ### Invoking Target Language Compiler on stm32f4discovery_gettingstarted_Test1.rtw ### Using System Target File: C:\Program Files\MATLAB\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_Test1_types.h . ### Writing header file stm32f4discovery_gettingstarted_Test1.h ### Writing header file rtwtypes.h ### Writing source file stm32f4discovery_gettingstarted_Test1.c ### Writing header file stm32f4discovery_gettingstarted_Test1_private.h ### Writing source file stm32f4discovery_gettingstarted_Test1_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 ### 'E:\Testttttttttt\stm32f4discovery_gettingstarted_Test1_ert_rtw\stm32f4discovery_gettingstarted_Test1.mk' is up to date ### Building 'stm32f4discovery_gettingstarted_Test1': "C:\PROGRA~1\MATLAB\bin\win64\gmake" -f stm32f4discovery_gettingstarted_Test1.mk all MW_GNU_ARM_TOOLS_PATH = C:/PROGRA~3/MATLAB/SUPPOR~1/R2021a/3P778C~1.INS/GNUARM~1.INS/win/bin E:\Testttttttttt\stm32f4discovery_gettingstarted_Test1_ert_rtw>cd . E:\Testttttttttt\stm32f4discovery_gettingstarted_Test1_ert_rtw>if "" == "" ("C:\PROGRA~1\MATLAB\bin\win64\gmake" -f stm32f4discovery_gettingstarted_Test1.mk all ) else ("C:\PROGRA~1\MATLAB\bin\win64\gmake" -f stm32f4discovery_gettingstarted_Test1.mk ) "C:/PROGRA~3/MATLAB/SUPPOR~1/R2021a/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-gcc" -ffunction-sections -fdata-sections -Wall -MMD -MP -MF"stm32f4discovery_gettingstarted_Test1.dep" -MT"stm32f4discovery_gettingstarted_Test1.o" -c -O0 -mcpu=cortex-m4 -mthumb -mlittle-endian -mthumb-interwork -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fdata-sections -ffunction-sections -fmessage-length=0 -fno-short-wchar -fshort-enums -fno-delete-null-pointer-checks -fomit-frame-pointer -funsigned-char -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wvla -include stm32f4discovery_wrapper.h -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -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_Test1 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 @stm32f4discovery_gettingstarted_Test1_comp.rsp -o "stm32f4discovery_gettingstarted_Test1.o" "E:/Testttttttttt/stm32f4discovery_gettingstarted_Test1_ert_rtw/stm32f4discovery_gettingstarted_Test1.c" arm-none-eabi-gcc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory compilation terminated. gmake: *** [stm32f4discovery_gettingstarted_Test1.o] Error 1 E:\Testttttttttt\stm32f4discovery_gettingstarted_Test1_ert_rtw>echo The make command returned an error of 2 The make command returned an error of 2 E:\Testttttttttt\stm32f4discovery_gettingstarted_Test1_ert_rtw>exit /B 1 ### Creating HTML report file stm32f4discovery_gettingstarted_Test1_codegen_rpt.html### Build procedure for stm32f4discovery_gettingstarted_Test1 aborted due to an error.
Build Summary
1
Elapsed: 0.287 sec
Top model targets built: Model Action Rebuild Reason ================================================================================================= stm32f4discovery_gettingstarted_Test1 Failed Code generation information file does not exist. 0 of 1 models built (0 models alr
0 comentarios
Respuestas (1)
Harsh Saxena
el 19 de Jun. de 2023
Hi,
There can be a number of reasons for this error to occur. See if any of these solutions help:
Hope this helps!
2 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!