- Application Layer (top): contains software components (SWCs). These SWCs are the generated code from the Simulink model (the algorithm).
- Runtime Environment (RTE, middle): Communication between components of the Application Layer and from components to the BSW (bottom). The RTE represents the full interface for applications.
- Basic Software (BSW, bottom): Services and hardware abstraction.
What are AUTOSAR RTE files? What is the purpose of the "stub" directory in an AUTOSAR build for SIL/PIL testing?
26 views (last 30 days)
Show older comments
MathWorks Support Team
on 7 Nov 2024
Answered: MathWorks Support Team
on 7 Nov 2024
What is the purpose of the "stub" directory in an AUTOSAR build? How do these files relate to SIL/PIL testing and why are they needed? Can I use these files in my production AUTOSAR work?
Accepted Answer
MathWorks Support Team
on 7 Nov 2024
The "stub" directory has some ARXML files, some C files and some H files. The content of this directory is normally the output of industry RTE generators. It is the infrastructure necessary to build the generated AUTOSAR code. Building the code allows for SIL and PIL simulations.
To understand why these files are necessary to build the AUTOSAR code, we must understand the 3 layers of the AUTOSAR stack:
When you generate code for an AUTOSAR model, C code and ARXML file(s) are produced. The generated C code for an AUTOSAR model contains function calls to the RTE layer such as Rte_Read (inport) and Rte_Write (outport). The RTE is generated by an outside generator using the ARXML that describes the interface of the SWC. We generate "stub" or spoof implementations of the necessary RTE functions to build the model because the RTE may not yet exist or could be costly to constantly regenerate and reimport.
0 Comments
More Answers (0)
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!