Clear Filters
Clear Filters

slrealtime build issue with rte header files

9 views (last 30 days)
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.

Answers (1)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU on 27 Oct 2023
Hi Joseph,
As per my understanding you are facing the build issue with the “slrealtime.tlc” template file in MATLAB. This issue specifically occurs with embedded MATLAB blocks in the top-level model that have the “treat as atomic subsystem” option checked.
To address this issue, you can consider the following suggestions:
  1. Check the File Path: Ensure that the header file is in the correct directory. If the model being built is a model reference, the header file it seeks should exist in a directory specific to that model reference, which should be a sibling to the “_sharedutils” directory. For the top-level model, make sure that the header file exists.
  2. Regenerate Code: Sometimes, issues like this can be resolved by regenerating all the code. Start by cleaning up the generated code files and then rebuild the model. This can help ensure that the code generation process is executed correctly, and the necessary files are generated.
  3. Verify the Model Configuration: Double-check the configuration of the model and ensure that all necessary files and dependencies are included. Make sure that the model references and their associated header files are correctly configured.
You can refer to the following MathWorks documents to know more details about the “slrealtime.tlc” template:
I hope this resolves your issue!
  1 Comment
Joseph Whitman
Joseph Whitman on 30 Oct 2023
In order:
  1. The header files for model references do exist, but I had to manually add all of the siblings to _sharedutils to the include path for the compiler to find them. The relevant top-level header file was not being generated at all.
  2. This issue persisted through blowing away the cache and starting the build fresh and even through total Matlab restarts
  3. I don't fully understand your suggestion here, could you elaborate please?

Sign in to comment.

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!