slrealtime build issue with rte header files
Show older comments
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
on 27 Oct 2023
0 votes
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:
- 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.
- 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.
- 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:
- https://www.mathworks.com/help/rtw/ug/compare-system-target-file-support.html?searchHighlight=slrealtime.tlc&s_tid=srchtitle_support_results_10_slrealtime.tlc
- https://www.mathworks.com/support/bugreports/2388663?s_tid=srchtitle_support_results_1_slrealtime.tlc
- https://www.mathworks.com/help/slrealtime/gs/run-a-real-time-application.html.[CV1]
I hope this resolves your issue!
1 Comment
Joseph Whitman
on 30 Oct 2023
Categories
Find more on Deployment, Integration, and Supported Hardware 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!