Clear Filters
Clear Filters

Cannot create 'instrumen​tationInfo​.mat' because 'sil\hostobj' does not exist.

5 views (last 30 days)
hi All, I've got a problem that comes out of nowhere, between two different build session from matlab script. Basically I run my
rtwbuild(systemName);
and I obtain this error:
Error using save Cannot create 'instrumentationInfo.mat' because 'sil\hostobj' does not exist.
Error in coder.internal.CodeInstrChecksums/saveInfoFile
Error in coder.internal.CodeInstrBuildArgs/ciUpdateBuildInfo
Error in coder.internal.prepareCodeForInstrumentation
Error in coder.internal.ModelBuilder/make_rtw (line 836) coder.internal.prepareCodeForInstrumentation(...
Error in coder.internal.ModelCodegenMgr/make_rtw (line 8) buildResult = obj.make_rtw(varargin);
Error in make_rtw (line 18) buildResult = h.make_rtw(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 slbuild (line 61) sl('slbuild_private', mdl, varargin{:});
Error in rtwbuild (line 189) slbuild(sys, 'StandaloneRTWTarget', ...
Error in AutomaticCodeGeneration (line 53) rtwbuild(systemName);
that came after this good log:
  • _### Starting build procedure for model: test_01_myPID
  • ### Generating code into build folder: C:\Users\GiunchiD\Desktop\ToolChain\Mathworks\scripts\Results-Tests\test_01_myPID\2016_03_31-18_00_44_627\test_01_myPID_ert_rtw
  • ### Invoking Target Language Compiler on test_01_myPID.rtw
  • ### Using System Target File: C:\Program Files\MATLAB\R2015b\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 test_01_myPID.h
  • ### Writing header file test_01_myPID_types.h
  • .
  • ### Writing header file rtwtypes.h
  • ### Writing source file test_01_myPID.c
  • ### Writing header file test_01_myPID_private.h
  • ### Writing source file ert_main.c
  • ### TLC code generation complete.
  • ### Creating HTML report file test_01_myPID_codegen_rpt.html
  • ### Creating project marker file: rtw_proj.tmw
  • ### Build procedure for model: 'test_01_myPID' aborted due to an error._
  3 Comments
Vish Chandrasekaran
Vish Chandrasekaran on 6 May 2016
I get the exact same error like Maurizio. It popped up out of nowhere between two different builds. I am using Model Reference and have it set up in SIL mode.
Building vph_target_SIL_PIL 1 6 Elapsed: 6 sec
[6 similar] Parameter precision loss occurred for 'Gain'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'. Component: Simulink | Category: Block warning
### Successfully updated the model reference SIM target for model: vph_target_SIL_PIL
Building vph_target_SIL_PIL 4 6 Clear Save
Elapsed: 5 sec
### Starting build procedure for model: vph_target_SIL_PIL
Code Generation 2 6 Clear Save
Elapsed: 5 sec
### Generating code into build folder: C:\Users\lco-powerelec\Documents\MATLAB\TraneFreescaleEval\EdVira\Models\02_SIL\slprj\ert\vph_target_SIL_PIL
[6 similar] Parameter precision loss occurred for 'Gain'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'. Component: Simulink | Category: Block warning
### Invoking Target Language Compiler on vph_target_SIL_PIL.rtw
### Using System Target File: C:\Program Files\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 source file vph_target_SIL_PIL.c
### Writing header file vph_target_SIL_PIL_private.h
### Writing header file vph_target_SIL_PIL.h
### Writing header file vph_target_SIL_PIL_types.h
### TLC code generation complete.
### Evaluating PostCodeGenCommand specified in the model
### Build procedure for model: 'vph_target_SIL_PIL' aborted due to an error.
Cannot create 'instrumentationInfo.mat' because 'sil\hostobj' does not exist.
Error while bringing model references of model vph_test_SIL up to date: see errors reported above for details.
Component: Simulink | Category: N.A.
Any inputs would be greatly appreciated.
Joakim Bergius
Joakim Bergius on 19 May 2016
Edited: Joakim Bergius on 19 May 2016
Hi, I also got the same error seemingly from nowhere between two builds. The reason was that I accidentally generated code into a library folder that was used in matlab path. Then for each build, Matlab used parts from that build while building.
So keep your path clean, since matlab will sniff out every bat file and makefile there is!

Sign in to comment.

Answers (1)

jrocket567
jrocket567 on 11 Nov 2016
I had this problem and realized that my Simulink codegen and Simulink cache folders were different, left over from some other codegen. The missing sil\hostobj folder was in the codegen folder.
I set the two folders to be the same, and cleared out both of the slprj folders, and was then able to build.

Categories

Find more on Test Model Components in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!