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