polyspace-autosar
(DOS/UNIX) Run Polyspace Code Prover on code implementation of AUTOSAR software components
Syntax
Description
Note
This Polyspace® command is available in
.
Here, polyspaceroot
\polyspace\bin
is the
Polyspace installation folder, for instance, polyspaceroot
C:\Program
Files\Polyspace\R2024b
(see also Installation Folder for desktop products or Installation Folder for server products). To avoid typing the full path to this command,
add this location to the PATH
environment variable in
your operating system.
polyspace-autosar -create-project
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
(projectFolder
-arxml-dir arxmlFolder
-sources-dir codeFolder
[-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. You can view the results for each software
component individually or upload them to Polyspace Access for an overview.
You can use additional options for troubleshooting, for instance, to only perform certain parts of the update and track down an issue or to provide extra header files or define macros.
polyspace-autosar -create-project
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
(projectFolder
-arxml-dir arxmlFolder
-sources-dir codeFolder
-output-platform-project.arxml
files) in arxmlFolder
and
modularizes the code implementation (.c
files) in
codeFolder
based on the specifications. A project is
created for each software component and the all projects are stored in a
workspace. The analysis runs Code Prover on each project for the checks. The
Code Prover results are stored in projectFolder
. After
analysis, you can open the workspace psar_workspace.pswks
from projectFolder
in the Polyspace Platform user interface.
You can view the results for each software component individually or get an
overview by uploading the results to Polyspace.
polyspace-autosar -create-project
creates a Polyspace project from AUTOSAR specifications as in the preceding syntax but
allows you to exclude specific files or folders from analysis using shell
patterns or regular expressions.projectFolder
-select-arxml-files arxmlFiles
[-select-arxml-files arxmlFiles
] -select-source-files codeFiles
[-select-source-files codeFiles
] [OPTIONS]
polyspace-autosar -update-project
updates the Code Prover analysis results based on changes in ARXML files or C
source code since the last analysis. The update uses the html file
prevProjectFile
[OPTIONS]
prevProjectFile
from the previous analysis and only
reanalyzes the code implementation of software components that changed since
that analysis.
You can use additional options for troubleshooting.
polyspace-autosar -update-and-clean-project
updates the Code Prover analysis results based on changes in ARXML files or C
source code since the last analysis. The update only reanalyzes 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.prevProjectFile
[OPTIONS]
You can use additional options for troubleshooting.
polyspace-autosar -help
shows all options available for
polyspace-autosar
.
Examples
Input Arguments
Version History
Introduced in R2018a