Resolve polyspace-autosar Error: Data Type Not Recognized
Issue
When creating a Polyspace® project from an AUTOSAR description, the software parses your AUTOSAR XML specifications and imports the data types that are required by the Software Components in the scope of verification. If your code uses a data type that is not in the Software Component specification, the analysis does not recognize this data type.
You see an error such as:
Identifier "LaneDetectionVar" is undefinedPossible Solutions
You can force import of data types that are not defined for Software Components that
you are verifying. Use the option -autosar-datatype. See polyspace-autosar.
You can find the already imported data types using the file
autosar_model_key_elements.html in the AUTOSAR
subfolder of your project folder. In the DataTypes section of the
HTML, the file shows:
Automatically imported data types using this format:
indirect pkg.types.app.Array_2_n320to320indirect pkg.types.app.BooleanThe text
indirectin the first column indicates that the data types are automatically imported.Explicitly imported data types using this format:
name tst003.typ.app.BooleanThe text
namein the first column indicates that the data typetst003.typ.app.Booleanis explicitly imported for the analysis.
In some cases, the analysis proposes a resolution hint using additional data types
imported from the ARXML as a possible match for the unrecognized data type. To see the
resolution hints, in the file psar_project.xhtml, click the
button on the upper left, then click
Behaviors. On the Behaviors tab, below the
errors in the code extraction phase, click the link to see a summary of code-extraction
diagnostics with possible resolution hints.

You can see resolution hints, that is, possible data types to add, that would resolve some of the issues related to unrecognized data types.
Instead of fixing individual code extraction errors using the resolution hints, you can also download a file with all options that implement the hints. On the summary page, click the link Download polyspace-autosar options.

You can use the downloaded text file with the polyspace-autosar
option -options-file to implement the resolution hints in one
shot.