AUTOSAR : Why are types not included on an external interface missing during compilation? Can I control placement of local enums/data types?

7 views (last 30 days)
Why are types not included on an external interface missing during compilation? Can I control placement of local enums/data types for AUTOSAR?
I am generating code and I have some enums with data scope set to 'Exported' however they are not generated in Rte_type.h?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 13 Nov 2023
In releases prior to R2020b, it is not possible to place an internal autosar datatype in a file "Rte_Type.h" due to lack of availability of feature 'IncludedDataTypeSets'.
The feature 'IncludedDataTypeSets' is available as of MATLAB R2020b
. It allows users to export their AUTOSAR internal data types into generated ARXML, this will guarantee that the type is included in <INCLUDED-DATA-TYPE-SETS> node of generated ARXML and gets exported to Rte_Type.h.
For more information, see below documentation links:
In releases prior to R2020b, For the local datatype to be a part of the ARXML, and eventually have the RTE generator place these datatypes either in RTE_type or rte_SWC_type, we need to have a capability which can handle "IncludedDataTypeSets". In this release, the only way to get the RTE to manage the 'enum' type is to use it on some sort of AUTOSAR interface like a port or mapped signal or a mapped parameter.
Workaround for releases prior to R2020b:
1) Manually add the IncludedDataTypeSets node to the ARXML after it is generated (and before the RTE/Bsw is generated), or
2) Make sure an AUTOSAR interface(root I/O or other mapped elements) uses the enumeration/datatype in question.  This will guarantee that the required type is generated in the Rte_Type.h file.

More Answers (0)

Categories

Find more on AUTOSAR Blockset in Help Center and File Exchange

Products


Release

R2015b

Community Treasure Hunt

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

Start Hunting!