Search code examples
embeddedstandardsrtoslanguage-implementation

Osek Implementation language


In the OIL files, there's always a file called "Implementation.oil" that is included. I can't find anything that explain what this file do! Her is an example: `

#include "implementation.oil"
CPU ATMEL_AT91SAM7S256
{
  OS LEJOS_OSEK
  {
    STATUS = EXTENDED;
    STARTUPHOOK = FALSE;
    ERRORHOOK = FALSE;
    SHUTDOWNHOOK = FALSE;
    PRETASKHOOK = FALSE;
    POSTTASKHOOK = FALSE;
    USEGETSERVICEID = FALSE;
    USEPARAMETERACCESS = FALSE;
    USERESSCHEDULER = FALSE;
  };

  /* Definition of application mode */
  APPMODE appmode1{};

  /* Definition of Task1 */
  TASK Task1
  {
    AUTOSTART = FALSE;
    PRIORITY = 1; /* Smaller value means lower priority */ 
    ACTIVATION = 1;
    SCHEDULE = FULL;
    STACKSIZE = 512; /* Stack size */ 
  };
`

Solution

  • The "IMPLEMENTATION" section is used to define the range of values that can be assigned to the corresponding attribute in the "CPU" section (i.e. limit the max number of task activations, task priorities, etc in order to speed up the code execution or to reduce the code size or some other reason). This is useful when porting an software application from one OSEK/VDX OS implementation to another (e.g. Trampoline to Erika, Lejos to Trampoline, etc).