[SOLVED] PIL simulation error for a new target

24 views (last 30 days)
Hi there,
I created a new STF+Connectivity Config for new target processor. Unfortunately I cannot get it to run. During the build process an error throws up, which I cannot interpret.
The build log looks like this:
### Model reference SIM target (subtest_mb_msf.mexa64) for model subtest_mb may be out of date because the model information cache has been updated. The model or library files may have been resaved or a referenced configuration set may have been modified.
### Updating model reference SIM target for model: subtest_mb
### Successfully updated the model reference SIM target for model: subtest_mb
### Model reference RTW target (subtest_mb.c) for model subtest_mb is out of date because subtest_mb.c does not exist.
### Updating model reference RTW target for model: subtest_mb
### Generating code into build folder: /path/to/slprj/myprocessor/subtest_mb
### Invoking Target Language Compiler on subtest_mb.rtw
### Using System Target File: /path/to/my.tlc
### Loading TLC function libraries
.....
### Initial pass through model to cache user defined code
.
### Caching model source code
....................
### Writing header file subtest_mb.h
### Writing header file subtest_mb_types.h
### Writing header file rtwtypes.h
.
### Writing source file subtest_mb.c
### Writing header file subtest_mb_private.h
.
### TLC code generation complete.
### Creating project marker file: rtw_proj.tmw
.
### Processing Template Makefile: /path/to/matlab/r2011b/rtw/c/ert/ert_unix.tmf
### Creating subtest_mb.mk from /path/to/matlab/r2011b/rtw/c/ert/ert_unix.tmf
### Building subtest_mb: /path/to/matlab/r2011b/bin/glnxa64/gmake -f subtest_mb.mk GENERATE_REPORT=0 GENERATE_ASAP2=0 MB_MAC_ADDR="00-0a-35-01-f6-80" MB_IP_ADDR="129.187.151.73" MB_IP_MASK="255.255.255.0" MB_IP_GWADDR="129.187.151.1" MB_PIL_PORT=14646
gcc -c -ansi -pedantic -fwrapv -O0 -fPIC -DMODEL=subtest_mb -DNUMST=1 -DNCSTATES=0 -DUNIX -DMAT_FILE=0 -DINTEGER_CODE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DHAVESTDIO -DMULTI_INSTANCE_CODE=0 -DMT=0 -I. -I../../.. -I/path/to/matlab/r2011b/extern/include -I/path/to/matlab/r2011b/simulink/include -I/path/to/matlab/r2011b/rtw/c/src -I/path/to/matlab/r2011b/rtw/c/src/ext_mode/common -I/path/to/slprj/microblaze/subtest_mb -I/path/to/model -I../../../slprj/microblaze/_sharedutils "subtest_mb.c"
ar ruvs subtest_mb_rtwlib.a subtest_mb.o
ar: creating subtest_mb_rtwlib.a
a - subtest_mb.o
### Created subtest_mb_rtwlib.a
### Created library: subtest_mb_rtwlib.a
### Successfully updated the model reference RTW target for model: subtest_mb
### Connectivity configuration for referenced model "subtest_mb": My PIL Target ###
### PilFramework...
### Builder...
### Launcher...
### LAUNCHER CTOR
### Host communicator...
EXECUTING METHOD SETARGSTRING
SETARGSTRING called from line 103 of ConnectivityConfig.m
###Connectivity.Super() CTOR
*** Connectivity setup complete
### Preparing to start PIL simulation ...
Warning: You are using gcc version "4.4.3-4ubuntu5)". The version
currently supported with MEX is "4.3.4".
For a list of currently supported compilers see:
http://www.mathworks.com/support/compilers/current_release/
Some of the output is from my ConnectivityConfig and TargetApplicationFramework respectively.
At this point I get the error messages "An error occurred while calling into the SIL or PIL target connectivity implementation", "Invalid function name ''" and "Error while bringing model references of model test_mb up to date: see errors reported above for details".
My system is glnxa64 by the way.
What is that supposed to mean? Which function name is empty there? Unfortunately there is a lack of documentation what Embedded Coder is doing at this point...
Thanks, martin

Accepted Answer

Kaustubha Govind
Kaustubha Govind on 9 May 2012
You might need to contact MathWorks Tech Support for this because it seems like it might need some involved debugging. One tip that I can give is to try running "dbstop if all error" and then run the model again to see if MATLAB stops at the point that the error occurs. If the error is coming from a .p file, it may not be much help though. Sorry for not being able to help more!
  2 Comments
Martin
Martin on 10 May 2012
Don't be sorry, you made my day! Thank you very much for the continuative tip! Indeed the breakpoint hit something, see:
Caught-error breakpoint was hit in StorageMapper.StorageMapper>StorageMapper.getStorageForModel at line 141. The error was:
Error using StorageMapper.getStorageForModel (line 141)
Model needs to be saved before you can add externally stored RMI data.
K>>
### Checking for structural changes in rtwdemo_sil_counter_mb because the model reference rebuild option is set to 'If any changes detected'. Structural changes will cause the model reference SIM target to be rebuilt.
### Checking for structural changes in model reference SIM target for model: rtwdemo_sil_counter_mb
Caught-error breakpoint was hit in tlc at line 85. The error was:
Error using tlc_new
Error: File: execstring Line: 21 Column: 10
Unable to open %include file codegenentry.tlc
85 tlc_new(varargin{:});
85 tlc_new(varargin{:});
K>>
### The code for the model reference SIM target for model rtwdemo_sil_counter_mb is up to date because no functional changes exist in the referenced model.
Caught-error breakpoint was hit in tlc at line 85. The error was:
Error using tlc_new
Error: File: execstring Line: 31 Column: 10
Unable to open %include file commontargetlib.tlc
K>>
[[ that repeats several times, then I finally come to the point ]]
85 tlc_new(varargin{:});
85 tlc_new(varargin{:});
### Connectivity configuration for referenced model "rtwdemo_sil_counter_mb": My PIL ###
added PIL framework files...
### LAUNCHER CTOR
EXECUTING METHOD SETARGSTRING
SETARGSTRING called from line 82 of ConnectivityConfig.m
### Preparing to start PIL simulation ...
Caught-error breakpoint was hit in MakefileBuilder.MakefileBuilder>MakefileBuilder.build at line 368. The error was:
Invalid function name ''
368 feval(makeRTWHookFile, hookArgs{:});
K>>
From that I figured that R2011b was looking for my pil_make_rtw_hook.m file, which I did not create, since I don't need it.
The solution is to create this function file anyway and - in my case - just leave the function empty.
It should be noted that in R2012a it works without such a file.
Again, thank you very much!
Best Regards,
martin
Kaustubha Govind
Kaustubha Govind on 10 May 2012
Martin: Glad I could be of help. Thanks for posting you solution. :)

Sign in to comment.

More Answers (0)

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!