How to fix "Failed to generate all binary outputs."

When I run the SIL by matlab, I get a error, I can generate C code, but when make my code, the matlab report a error following words:
I hope I can receive your help!
Thank you very much!
### Invoking Target Language Compiler on WindowControlCoordination_SimulationAlgorithmModel.rtw
### Using System Target File: C:\Program Files\MATLAB\R2018b\toolbox\rtw\targets\AUTOSAR\AUTOSAR\autosar.tlc
### Loading TLC function libraries
...........
### Generating TLC interface API for custom data
...................
### Initial pass through model to cache user defined code
...............
### Caching model source code
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...........
### Writing header file Integrator_GJC5HoPD.c
### Writing header file TurnOnDelay_BAK_dK39YyVe.c
### Writing header file TurnOffDelay_BAK_XjY1nEOI.c
### Writing header file TurnOnDelay_BAK_uIKXd2us.c
### Writing header file WindowControlCoordination_SimulationAlgorithmModel_types.h
.
### Writing source file WindowControlCoordination_SimulationAlgorithmModel.c
### Writing header file WindowControlCoordination_SimulationAlgorithmModel_private.h
### Writing header file WindowControlCoordination_SimulationAlgorithmModel.h
### Writing header file rtwtypes.h
### Writing header file zero_crossing_types.h
.
### Writing header file Integrator_GJC5HoPD.h
### Writing header file TurnOnDelay_BAK_dK39YyVe.h
### Writing header file TurnOffDelay_BAK_XjY1nEOI.h
### Writing header file TurnOnDelay_BAK_uIKXd2us.h
### Writing header file FourWindowPercentageCtrl_private.h
.
### Writing header file Getter_WindowCloseOnLockMode_private.h
### Writing header file Setter_WindowCloseOnLockMode_private.h
### Writing source file WindowControlCoordination_SimulationAlgorithmModel_data.c
### TLC code generation complete.
...............### Using toolchain: MinGW64 | gmake (64-bit Windows)
### Creating 'C:\other\WindowControlCoordination\mdl_test\tmp_sil\WindowControlCoordination_SimulationAlgorithmModel_autosar_rtw\WindowControlCoordination_SimulationAlgorithmModel.mk' ...
### Building 'WindowControlCoordination_SimulationAlgorithmModel': "C:\PROGRA~1\MATLAB\R2018b\bin\win64\gmake" -f WindowControlCoordination_SimulationAlgorithmModel.mk buildobj
C:\other\WindowControlCoordination\mdl_test\tmp_sil\WindowControlCoordination_SimulationAlgorithmModel_autosar_rtw>cd .
C:\other\WindowControlCoordination\mdl_test\tmp_sil\WindowControlCoordination_SimulationAlgorithmModel_autosar_rtw>if "buildobj" == "" ("C:\PROGRA~1\MATLAB\R2018b\bin\win64\gmake" -f WindowControlCoordination_SimulationAlgorithmModel.mk all ) else ("C:\PROGRA~1\MATLAB\R2018b\bin\win64\gmake" -f WindowControlCoordination_SimulationAlgorithmModel.mk buildobj )
"C:\PROGRA~3\MATLAB\SUPPOR~1\R2018b\3P778C~1.INS\MINGW_~1.INS\bin/gcc" -c -std=c99 -pedantic -fwrapv -m64 -O0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=1 -DTID01EQ=0 -DMODEL=WindowControlCoordination_SimulationAlgorithmModel -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -IC:/other/WindowControlCoordination/mdl_test/tmp_sil -IC:/other/WindowControlCoordination/mdl_test/tmp_sil/WindowControlCoordination_SimulationAlgorithmModel_autosar_rtw -IC:/other/WINDOW~1/mdl_test -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2018b/toolbox/coder/autosar/rte -IC:/other/WindowControlCoordination/mdl_test/tmp_sil/WindowControlCoordination_SimulationAlgorithmModel_autosar_rtw/stub -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:/other/WindowControlCoordination/mdl_test/tmp_sil/slprj/autosar/_sharedutils @WindowControlCoordination_SimulationAlgorithmModel_comp.rsp -o "WindowControlCoordination_SimulationAlgorithmModel.obj" "WindowControlCoordination_SimulationAlgorithmModel.c"
In file included from WindowControlCoordination_SimulationAlgorithmModel.c:16:0:
WindowControlCoordination_SimulationAlgorithmModel.h:200:46: fatal error: WindowControlCoordination_MemMap.h: No such file or directory
#include "WindowControlCoordination_MemMap.h"
^
compilation terminated.
gmake: *** [WindowControlCoordination_SimulationAlgorithmModel.obj] Error 1
C:\other\WindowControlCoordination\mdl_test\tmp_sil\WindowControlCoordination_SimulationAlgorithmModel_autosar_rtw>echo The make command returned an error of 2
The make command returned an error of 2
C:\other\WindowControlCoordination\mdl_test\tmp_sil\WindowControlCoordination_SimulationAlgorithmModel_autosar_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.
### Creating HTML report file WindowControlCoordination_SimulationAlgorithmModel_codegen_rpt.html
### Build procedure for model: 'WindowControlCoordination_SimulationAlgorithmModel' aborted due to an error.
ans =
'Error using coder.make.Builder/coder_diagnose
Error(s) encountered while building "WindowControlCoordination_SimulationAlgorithmModel":
### Failed to generate all binary outputs.
Error in coder.make.Builder/coder_build
Error in coder.make.Builder/run
Error in coder.make.invokeBuilder
Error in RTW/genMakefileAndBuild
Error in RTW/genMakefileAndBuildWrapper
Error in coder.internal.compileStage
Error in coder.internal.ModelBuilder/buildProcedure (line 1301)
compileResult = coder.internal.compileStage...
Error in coder.internal.ModelBuilder/make_rtw (line 212)
buildResult = buildProcedure...
Error in coder.internal.ModelCodegenMgr/make_rtw (line 8)
buildResult = obj.make_rtw(varargin);
Error in make_rtw (line 20)
buildResult = h.make_rtw(buildArgs, varargin{:});
Error in build_target
Error in build_target
Error in build_standalone_rtw_target
Error in slbuild_private
Error in slbuild_private
Error in sl (line 15)
[varargout{1:nargout}]=feval(varargin{:});
Error in rtw.pil.ModelBlockPIL.XILBuildStandaloneTargets (line 261)
sl('slbuild_private', xilComponent,...
Error in MBDTool.Simulation.TestExecutionDirector/EmbeddedCoderTestExecutionDirector/simulateSingleTestCase
Error in MBDTool.Simulation.TestExecutionDirector/SimulinkBaseTestExecutionDirector/onExecuteTestCase
Error in MBDTool.Simulation.TestExecutionDirector/TestExecutionDirectorBase/phaseTask_testCaseExecution
Error in MBDTool.Simulation.TestExecutionDirector/TestExecutionDirectorBase>@(varargin)obj.phaseTask_testCaseExecution(varargin{:})
Error in MBDTool.Utilities.WorkFlow.Phase/enterPhase
Error in MBDTool.Utilities.WorkFlow.WorkFlow/changeToPhase
Error in MBDTool.Utilities.WorkFlow.WorkFlow/transitionToPhase
Error in MBDTool.Utilities.WorkFlow.AutomatedWorkFlow/start
Error in MBDTool.Simulation.TestExecutionDirector/TestExecutionDirectorBase/onExecuteTestCases
Error in MBDTool.Simulation.TestExecutionDirector/executeTestCases
Error in MBDTool.Simulation.TestExecutionDirectorOrchestrator/execute
Error in MBDTool.UI.MainView/simulateTestCase
Error in MBDTool.UI.MainView/simulateTestCases
Error in MBDTool.UI.MainViewToolBar/cb_runButton
Error in MBDTool.UI.MainViewToolBar>@(varargin)toolBar.cb_runButton'

 採用された回答

dpb
dpb 2023 年 8 月 30 日

0 投票

...WindowControlCoordination_SimulationAlgorithmModel.obj" "WindowControlCoordination_SimulationAlgorithmModel.c"
In file included from WindowControlCoordination_SimulationAlgorithmModel.c:16:0:
WindowControlCoordination_SimulationAlgorithmModel.h:200:46:
fatal error: WindowControlCoordination_MemMap.h: No such file or directory
#include "WindowControlCoordination_MemMap.h"
^
I don't know a thing about what you're actually doing, but the build failed because the compilation of "WindowControlCoordination_SimulationAlgorithmModel.c" failed owing to the above include file not being found.
Either a needed directory isn't specified or the install of whatever component that the above C file is from failed to include the necessary header file.
The solution (first step at least, may find other things when get past this point) is to find and put the "WindowControlCoordination_MemMap.h" header file where it can be found; same place as its caller is probably the place it belongs.

2 件のコメント

Li Xinxin
Li Xinxin 2023 年 8 月 31 日
Under your reminder, I checked my file again, I find when export ARXML form PV, I don't set address method. Now I solved this problem. Thank you very much!
dpb
dpb 2023 年 8 月 31 日
編集済み: dpb 2023 年 8 月 31 日
Glad to help, the key item is to read the details of the compile step carefully to find the actual failure, not just the end summary message.
Since the problem has been solved, it would be appropriate to go ahead and Accept the Answer to indicate such if nothing else.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeC Shared Library Integration についてさらに検索

製品

リリース

R2018b

タグ

質問済み:

2023 年 8 月 30 日

編集済み:

dpb
2023 年 8 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by