MATLAB: Do I get an error when importing a ARXML file in Simulink 7.9 (R2012a)

simulink

When I import an ARXML file using ARXML.IMPORTER I recieve the following error:
Error using arxml.importer.p_add_data_type (line 259)
Implementation data type "UInt8" does not reference a base type.
Error in arxml.importer.p_add_data_type (line 71)
[ dataTypeId, allInfo] = arxml.importer.p_add_data_type(this, allInfo,
implDataTypeNode, compMethodRefList, applDataTypeName);

Best Answer

The reason you are seeing this error is that the type UInt8 is missing the following sub-tag in its SW-DATA-DEF-PROPS:
<BASE-TYPE-REF>
The type needs to reference a base type. For an example; load the autosar counter example by executing the following command in the MATLAB command window:
rtwdemo_autosar_counter
Then generate code for the model by pressing Ctrl + B. In the resulting ARXML code the rtwdemo_autosar_counter_datatype.arxml file contains type definitions with reference to base data types.