Hi all,
I'm trying to build a fairly large model using the slrealtime.tlc template file following a recent upgrade from 2019b to 2021b. This model successfully built and ran using the older slrt.tlc file. Unfortunately I'm now unable to build and seeing a very cryptic error message:
<big_path>/slprj/slrealtime/_sharedutils/Chart_OdJ29YSD.cpp:13:10: fatal error: rte_<MODELNAME>_parameters.h: No such file or directory #include "rte_<MODELNAME>_parameters.h"
The C++ code is all automatically generated; that line is being introduced somewhere in the build chain. While I'm not sure where the line is getting introduced, I have noticed the following characteristics:
- That line only appears in code in the _sharedutils directory
- If the model being built is a model reference, the header file it seeks will exist in a directory for that model reference that is a sibling to _sharedutils
- If the model in question is the top level model, the header file does not exist at all
- Embedded matlab blocks with the 'treat as atomic subsystem' option checked seem to generate this error.
Has anyone else seen this? Can anyone help me work out the root cause?
EDIT: I can now confirm that I'm only seeing this with embedded matlab blocks in the top level model that have the 'treat as atomic subsystem' option checked. No other block seems to generate this error.