Skip to content
Jean-Luc Béchennec edited this page Oct 27, 2015 · 9 revisions

A quick introduction to the OIL language

The application you are going to build must be described using the OIL language. An OIL file have 2 parts , the IMPLEMENTATION part and the CPU part. In the IMPLEMENTATION you can set default values for the objects of your application. In the CPU part you describe the application. The first item in an OIL file is the OIL_VERSION attributes. It defines the kind of objects you may use in the CPU part. Three values are allowed:

  • OIL_VERSION = "2.5"; is used for an OSEK/VDX application;
  • OIL_VERSION = "3.1"; is used for an AUTOSAR 3.1 application;
  • OIL_VERSION = "4.0"; is used for an AUTOSAR 4 application.

The IMPLEMENTATION

The IMPLEMENTATION part is mainly used to set default values for attributes of application objects. For instance the following declaration sets a default stack size to 50 bytes and set the default counter to SystemCounter for all alarms.

IMPLEMENTATION myAppDefaults {
  TASK {
    UINT32 STACKSIZE = 50;
  };
};

The CPU

The CPU part is used to describe the application. In this part, each object is declared with its attributes. Available objects are OS, TASK, ISR, RESOURCE, ALARM, COUNTER,

... to be continued

Clone this wiki locally