OIL files selection (-osek-multitasking
)
Set up multitasking configuration from OIL file definition
Description
This option is not available for code generated from MATLAB® code or Simulink® models.
Specify the OIL files that Polyspace® parses to set up the multitasking configuration of your OSEK 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 -osek-multitasking
. See Command-Line Information.
Why Use This Option
If your project includes OIL files, 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 OSEK project.
- On
Polyspace looks for and parses OIL files to set up your multitasking configuration.
auto
Look for OIL files in your project source and include folders, but not in their subfolders.
custom
Look for OIL files on the specified path and the path subfolders. You can specify a path to the OIL files or to the folder containing the files.
When you select this option, in your source code, Polyspace supports these OSEK multitasking keywords:
TASK
DeclareTask
ActivateTask
DeclareResource
GetResource
ReleaseResource
ISR
DeclareEvent
DeclareAlarm
Polyspace parses the OIL files that you provide for TASK
,
ISR
, RESOURCE
, and ALARM
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 TASK
, ISR
, and
RESOURCE
definitions from your OIL files, open the
Concurrency window from the Dashboard
pane.
Polyspace uses this decision tree to determine whether a task is an entry point or a cyclic task:
Example: Analyze Your OSEK Multitasking Project
Additional Considerations
Make sure that you declare all tasks by using the
DeclareTask
orTASK
keywords before you pass those tasks as parameters to functions or macros that expect a task. For example , if you pass taskfoo
toActivateTask
without usingDeclareTask(foo);
first, Polyspace considers taskfoo
undefined which results in a compilation error.The analysis ignores
TerminateTask()
declarations in your source code and considers that subsequent code is executed.Polyspace ignores syntax elements of your OIL files that do not follow the syntax defined here.
This option is supported only for projects that use C code.
Dependencies
To enable this option in the user interface of the desktop products:
Set the value of the option
Source code language (-lang)
toC
.Select the option
External multitasking configuration
.
Command-Line Information
Parameter:
-osek-multitasking |
Value:
auto | custom=' |
Default: Off |
Example (Bug Finder):
polyspace-bug-finder -sources |
Example (Code Prover):
polyspace-code-prover -sources |
Example (Bug Finder Server):
polyspace-bug-finder-server -sources |
Example (Code Prover
Server):
polyspace-code-prover-server -sources
|
Version History
Introduced in R2017b
See Also
Show global
variable sharing and usage only (-shared-variables-mode)
(Polyspace Code Prover)