Rte_type.h data types generation problem

28 views (last 30 days)
Hello,
I am using MATLAB R2020b to generate code from .slx model, the problem is that the generated Rte_type.h file have data types as (UInt8, UInt16...) but i am expecting them to be as (uint8, uint16...).
This matter is related to AUTOSAR Platform Type version according to this link :
For AUTOSAR 3.x Platform Type we have (UInt8, UInt16...) and for AUTOSAR 4.x Platform Type we have (uint8, uint16...)
So i tried to solve the problem by checking this option :
XML options > AUTOSAR Platform Types > Platform Type Names
But it turn out that it's not even exist in my model.
In the other hand the AUTOSAR schema version is equal to 4.2, which must make the code generates data types to (uint8, uint16...) according to this link :
Which one of this parameters has impact on data types in Rte_type.h file ?
Why i don't have AUTOSAR Platform Type option ?
And how can i change the Rte_type.h uint to AUTOSAR 4.2 form (uint8, uint16...) ?

Accepted Answer

Philipp Diersing
Philipp Diersing on 21 Apr 2023
Hey oussama,
unfortunately, the option to specify Platform Type Names in the XmlOptions menu was introduced in R2023a, see the release notes here: AUTOSAR Blockset Release Notes.
You could upgrade to this latest version to make use of this setting.
I'd also like to point out that the Rte_Type.h file we generate is meant to be used for testing workflows like SIL within the MathWorks tools only and not for deployment. To deploy the generated code, the generated ARXML files should be used to have Rte_Type.h (and other headers like those found in the stub directory) generated by an RTE Generator, a third party tool.
I hope this answer helps.
Philipp

More Answers (0)

Categories

Find more on AUTOSAR Blockset 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!