polyspaceAutosar
Run Polyspace Code Prover on code implementation of AUTOSAR software components using MATLAB scripts
Syntax
Description
[
checks the code implementation of AUTOSAR software components for run-time errors and
violation of data constraints in the corresponding AUTOSAR XML specifications. The
analysis parses the AUTOSAR XML specifications (status
, msg
] = polyspaceAutosar('-create-project',projectFolder
,'-arxml-dir',arxmlFolder
,'-sources-dir',codeFolder
,options
).arxml
files) in
arxmlFolder
, modularizes the code implementation
(.c
files) in codeFolder
based on the
specifications, and runs Code Prover on each module for the checks. The Code Prover
results are stored in projectFolder
. After analysis, you can open the
project psar_project.psprj
from projectFolder
in the
Polyspace® user interface or the file psar_project.xhtml
in a web
browser. You can view the results for each software component individually.
You can use additional options for troubleshooting, for instance, to perform only certain parts of the update and track down an issue or to provide extra header files or define macros.
[
updates the Code Prover analysis results based on changes in ARXML files or C source code
since the last analysis. The update uses the XHTML file status
, msg
] = polyspaceAutosar('-update-project',prevProjectFile
,options
)prevProjectFile
from the previous analysis and reanalyzes only the code implementation of software
components that changed since that analysis.
You can use additional options for troubleshooting.
[
updates the Code Prover analysis results based on changes in ARXML files or C source code
since the last analysis. The update reanalyzes only the code implementation of software
components that changed since the previous analysis. A clean update also removes
information about software components that are out of date. For instance, if you use an
additional option to force the update for specific software components and other SWC-s
have also changed, a clean update removes those other SWC-s from the Polyspace project.status
, msg
] = polyspaceAutosar('-update-and-clean-project',prevProjectFile
,options
)
You can use additional options for troubleshooting.
[
runs a Code Prover analysis using the same options as before. The output, instead of
appearing in the MATLAB® Command Window, is redirected to a character vector
status
, msg
, out
] = polyspaceAutosar(___)out
.
Note
Before you run Polyspace from MATLAB, you must link your Polyspace and MATLAB installations. See Integrate Polyspace with MATLAB and Simulink or Integrate Polyspace Server Products with MATLAB.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2018b