Main Content

ARXML files selection (-autosar-multitasking)

Set up multitasking configuration from ARXML file definitions

Description

To detect data races in large AUTOSAR applications, use this option with Polyspace® Bug Finder™.

This option is not available for code generated from MATLAB® code or Simulink® models.

Specify the ARXML files that Polyspace parses to set up the multitasking configuration of your AUTOSAR project.

Set Option

User interface (desktop products only): In your project configuration, the option is available on the Multitasking node. See Dependencies for other options you must also enable.

User interface (Polyspace Platform, desktop products only): In your project configuration, the option is on the Static Analysis tab on the Multitasking node. See Dependencies for other options you must also enable.

Command line and options file Use the option -autosar-multitasking. See Command-Line Information.

Why Use This Option

If your project includes ARXML files with <ECUC-CONTAINER-VALUE> elements, Polyspace can parse these files to set up tasks, interrupts, cyclical tasks, and critical sections. You do not have to set them up manually.

Settings

Off (default)

Polyspace does not set up a multitasking configuration for your AUTOSAR project.

On

Polyspace looks for and parses ARXML files to set up your multitasking configuration.

When you select this option, the software assumes that you use the OSEK multitasking API in your source code to declare and define tasks and interrupts. Polyspace supports these OSEK multitasking keywords:

  • TASK

  • DeclareTask

  • ActivateTask

  • DeclareResource

  • GetResource

  • ReleaseResource

  • ISR

  • DeclareEvent

  • DeclareAlarm

Polyspace parses the ARXML files that you provide for OsTask, OsIsr, OsResource, OsAlarm, and OsEvent definitions. The analysis uses these definitions and the supported multitasking keywords to configure tasks, interrupts, cyclical tasks, and critical sections.

To see how Polyspace models the OsTask and OsIsr definitions from your ARXML files, open the Concurrency modeling window from the Dashboard pane. In that window, under the Entry points column, the names of the elements are extracted from their <SHORT-NAME> values in the ARXML files.

Polyspace uses this decision tree to determine whether a task is an entry point or a cyclic task:

Task is entry point or cyclical decision tree

Additional Considerations

  • The analysis ignores TerminateTask() declarations in your source code and considers that subsequent code is executed.

  • Check that you use the AUTOSAR API to declare tasks (TASK(taskName)), interrupts (ISR(isrNAME)), and resources (DeclareResource(resourceName)) in your source code. For example, if your ARXML file contains an interrupt function named MYFUNCTION_ISR, the function should be declared in your source code as ISR(MYFUNCTION_ISR). Otherwise, Polyspace does not identify MYFUNCTION_ISR as an interrupt.

  • Polyspace supports multitasking configuration only from ARXML files for AUTOSAR specification version 4.0 and later.

  • This option is supported only for projects that use C code.

Dependencies

To enable this option in the user interface of the desktop products:

Command-Line Information

Parameter: -autosar-multitasking
Value: file1 [,file2, dir1,...]
Default: Off
Example (Bug Finder): polyspace-bug-finder -sources source_path -I include_path -autosar-multitasking C:\Polyspace_Workspace\AUTOSAR\myFile.arxml
Example (Bug Finder Server): polyspace-bug-finder-server -sources source_path -I include_path -autosar-multitasking C:\Polyspace_Workspace\AUTOSAR\myFile.arxml

Version History

Introduced in R2018a