How to fix "Failed to generate all binary outputs"

9 views (last 30 days)
### Generating code into build folder: H:\11th Grade\Robotics 1\TestRobotDriving_ert_rtw
### Invoking Target Language Compiler on TestRobotDriving.rtw
### Using System Target File: C:\Program Files\MATLAB\R2017a\rtw\c\ert\ert.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing source file TestRobotDriving.c
### Writing header file TestRobotDriving_private.h
### Writing header file TestRobotDriving.h
### Writing header file TestRobotDriving_types.h
.
### Writing header file rtwtypes.h
### Writing source file TestRobotDriving_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 VEX ARM Cortex v5.2 | gmake (64-bit Windows)
### Creating 'H:\11th Grade\Robotics 1\TestRobotDriving_ert_rtw\TestRobotDriving.mk' ...
### Building 'TestRobotDriving': "C:\PROGRA~1\MATLAB\R2017a\bin\win64\gmake" -f TestRobotDriving.mk all
H:\11th Grade\Robotics 1\TestRobotDriving_ert_rtw>cd .
H:\11th Grade\Robotics 1\TestRobotDriving_ert_rtw>if "" == "" ("C:\PROGRA~1\MATLAB\R2017a\bin\win64\gmake" -f TestRobotDriving.mk all ) else ("C:\PROGRA~1\MATLAB\R2017a\bin\win64\gmake" -f TestRobotDriving.mk )
C:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/gnuarm-armcortex.instrset/bin/arm-none-eabi-gcc -std=gnu99 -mthumb -mcpu=cortex-m3 -mlittle-endian -c -Wall -ffunction-sections -fsigned-char -fomit-frame-pointer -fsingle-precision-constant -MMD -MP -MF"TestRobotDriving.dep" -MT"TestRobotDriving.o" -O0 -DMODEL=TestRobotDriving -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DUSE_STDPERIPH_DRIVER -DNULL=0 -D__NO_SYSTEM_INIT -DARM_MATH_CM3=1 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DPROS_THREAD_STACK_SIZE=1088 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DUSE_STDPERIPH_DRIVER -DNULL=0 -D__NO_SYSTEM_INIT -DARM_MATH_CM3=1 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=TestRobotDriving -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IH:/11th Grade/Robotics 1 -IC:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/supportpackages/vexarmcortex/include -IH:/11th Grade/Robotics 1/TestRobotDriving_ert_rtw -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/ert -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/pros-lib.instrset/include -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/pros-lib.instrset/firmware -IC:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/supportpackages/vexarmcortex/pros_rtos/include -o TestRobotDriving.o TestRobotDriving.c
arm-none-eabi-gcc: error: Grade/Robotics: No such file or directory
arm-none-eabi-gcc: error: 1: No such file or directory
arm-none-eabi-gcc: error: Grade/Robotics: No such file or directory
arm-none-eabi-gcc: error: 1/TestRobotDriving_ert_rtw: No such file or directory
gmake: *** [TestRobotDriving.o] Error 1
H:\11th Grade\Robotics 1\TestRobotDriving_ert_rtw>echo The make command returned an error of 2
The make command returned an error of 2
H:\11th Grade\Robotics 1\TestRobotDriving_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: 'TestRobotDriving' aborted due to an error.
Error(s) encountered while building "TestRobotDriving":
### Failed to generate all binary outputs.

Answers (1)

Abhi Sundararaman
Abhi Sundararaman on 18 Sep 2017
It looks like the spaces in your file path are causing the issue. MATLAB and Simulink typically have issues with spaces in the folder path name. For example, the folder names "11th Grade" and "Robotics 1" seem to be causing the issue. In general with these types of errors, try to build in directories without spaces in the path name.
Specifically, if you look at the "no such directory" error messages, you will see the following:
arm-none-eabi-gcc: error: Grade/Robotics: No such file or directory
arm-none-eabi-gcc: error: 1: No such file or directory
arm-none-eabi-gcc: error: Grade/Robotics: No such file or directory
arm-none-eabi-gcc: error: 1/TestRobotDriving_ert_rtw: No such file or directory
For example, the first one just says "Grade/Robotics: no such file or directory", instead of "11th Grade/Robotics", meaning it truncated the parts before the space. This is also observed in the 3 errors after that (it says "1: no such file" instead of "Robotics 1", it says "Grade" again without "11th Grade", etc).
If you get rid of the spaces in the folder names, or build in a folder whose path contains no spaces, it should work.
  2 Comments
JUAN JOSE MUÑOZ
JUAN JOSE MUÑOZ on 20 Jan 2018
change the path of my file because the previous one had folders with space, my new route was: c: / desktop / test / archivosimulink, and it worked, thank you, I think that if you want to leave your route you should remove all the spaces to the folders the route

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!