7. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
AUTOSAR OS
ï” AUTOSAR OS is the specification of an OS kernel
for AUTOSAR architecture.
ï” It is based on OSEK/VDX OS :
ï” It adds new concepts: OS-Application, Schedule
Table, Global Time, Software Counter.
ï” the main improvement is the addition of configurable
mechanisms for error detection in the kernel (called
âprotection facilitiesâ) This rectify the OSEK/VDX
OS inability to support critical systems
7
8. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
AUTOSAR OS
ï” AUTOSAR OS is the specification of an OS kernel for
AUTOSAR architecture.
ï” It is based on OSEK/VDX OS :
ï” Software counters
ï” Schedule Tables
ï” Global time synchronization
ï” Stack monitoring
ï” OS Applications
ï” Protection mechanisms
ï” the main improvement is the addition of configurable
mechanisms for error detection in the kernel (called
âprotection facilitiesâ) This rectify the OSEK/VDX OS
inability to support critical systems
8
10. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
OSEK/VDX Overview
ï” OSEK : "Open System sand the Corresponding
Interfaces for Automotive Electronics"
ï” VDX : Vehicle Distributed executive
ï” The OSEK API was designed by automotive suppliers.
ï” System specification (architecture, interfaces et
behavior) for automotive electronic embedded systems
(http://www.osek-vdx.org )
ï” OSEK/VDX (OSEK Vehicle Distributed eXecutive)
ï” Operating System(OS)
ï” Communications(COM)
ï” Network Management(NM)
10
12. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Goals & Motivations
ï” High expenses coming from the development
and/or port of operating system
ï” No interoperability of systems built by
different providers
ï” Standardized interfacing features
ï” Utilization of the existing resources in the
vehicle, enhance the performance of the overall
system without requiring additional hardware.
ï” Basic software reusability, Application
portability.
12Reusability
Distributed functions
16. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
OSEK OS + OIL Application
ï” Objects of an OSEK application are all defined when the
application is designed
ï” Objects are static.
ï” i.e: there are no creation/deletion of tasks, resources, ...dynamically
during the execution of the application.
ï” Data structures are used to store the properties of the objects
and are defined
statically when the application is built.
ï” A language has been defined (and standardized) to define the
attributes of the objects in a simple way:
ï” OIL: OSEK Implementation Language
ï” The OIL syntax is a simple one: based on objects (tasks,
resources, âŠ) with a value for each attribute. Some attributes
have sub-attributes.
16
19. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
What is Trampoline?
ï” Trampoline is an open platform for small embedded systems with
real-time constraints
ï” It is based on the OSEK/VDX OS and AUTOSAR OS standards
ï” So it is compatible with OSEK/VDX OS and AUTOSAR OS API.
ï” OSEK/VDX and Autosar os are static operating systems.
ï” That means the objects of the application, tasks, events, resources, . . . ,
cannot be created or deleted during the execution of the application. All
objects are statically designed
ï” and instead of forcing the user to describe the application in C, a work
that can be error prone, a specfic language is used, OIL or XML2.
ï” A compiler, goil, is used to translate the description in the equivalent C
structures. goil performs verifications too.
19
22. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Basic task states
22
Basic tasks only release
the processor, if
âą they terminate,
âą the OSEK operating system
switches to a higher-priority
task, or
âą an interrupt occurs which
causes the processor to
switch to an interrupt service
routine (ISR).
The state model of basic tasks is nearly identical to the extended
tasks state model. The only exception is that basic tasks do not
have a waiting state.
26. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
OSEK scheduling policy
ï” Scheduling is done dynamically during the execution of the application.
ï” Tasks have a fixed priority
ï” The priority of a task is given at design stage;
ï” The priority does not change (almost, taking and releasing resources may change
the priority);
ï” No round-robin.
ï” If more than one task have the same priority, tasks are run one after the other.
ie a task may not preempt a task having the same priority
ï” Tasks may be preemptable or not (almost)
ï” This property is defined at design stage.
26
33. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
ActivateTask service:
StatusType ActivateTask(TaskType <TaskId>);
ï” The argument is the id of the task to activate.
ï” StatusType is an error code:
ï” E_OK: no error
ï” E_OS_ID: invalid TaskId (no task with such an id)
ï” E_OS_LIMIT: too many activations of the task
ï” This service puts the task <TaskId> in ready state
If the activated task has a higher priority (preemptive), the calling task is
put in the ready state. The new one goes in the running state.
33
TASK(myTask)
{
//Taskâs instructions
âŠ
ActivateTask(T2);
âŠ..
}
37. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
ChainTask service
StatusType ChainTask(TaskType <TaskId>);
ï” The argument is the id of the task to activate;
ï” StatusType is an error code:
ï” E_OK: No error
ï” E_OS_ID: invalid TaskId (no task with such an id)
ï” E_OS_LIMIT: too many activations of the task
ï” This service puts task <TaskId> in ready state, and the calling task
in the suspended state.
ï” This service replaces TerminateTask for the calling task
37
56. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
References
ï” Embedded Microcomputer Systems Real Time Interfacing Third
Edition Jonathan W. Valvano University of Texas at Austin.
ï” MicroC/OS-II the real-time kernel second edition jean j.labrosse.
ï” RTOS Concepts http://www.embeddedcraft.org.
ï” OSEK/VDX Operating System Specification 2.2.3
ï” AUTOSAR Layered Software Architecture
ï” The Trampoline Handbook release 2.0
ï” Trampoline (OSEK/VDX OS) Test Implementation -Version 1.0,
Florent PAVIN ; Jean-Luc BECHENNEC
56