Model Based Development of Embedded Control Software

Similar documents
Model Based Development of Embedded Control Software

ID 025C: An Introduction to the OSEK Operating System

REAL TIME OPERATING SYSTEM PROGRAMMING-I: VxWorks

Real-Time Operating Systems: Some Examples

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory

Operating System Provides

An application-based EDF scheduler for OSEK/VDX

Motivation. Threads. Multithreaded Server Architecture. Thread of execution. Chapter 4

Real-Time Systems Hermann Härtig Real-Time Operating Systems Brief Overview

Research for OSEK/VDX-based Architecture of Vehicular Application Specific Operating System

Driving the standard for optimized embedded systems

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann

REAL-TIME OPERATING SYSTEMS SHORT OVERVIEW

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS

Embedded Systems. 5. Operating Systems. Lothar Thiele. Computer Engineering and Networks Laboratory

Real-Time Systems. Real-Time Operating Systems

Zilog Real-Time Kernel

L4-Linux Based System As A Platform For EPICS ioccore

CSE 4/521 Introduction to Operating Systems. Lecture 29 Windows 7 (History, Design Principles, System Components, Programmer Interface) Summer 2018

SMD149 - Operating Systems

OSEK/VDX. Time-Triggered Operating System. Version 1.0. July 24 th 2001

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

TDDD07 Real-time Systems Lecture 10: Wrapping up & Real-time operating systems

Programming Languages for Real-Time Systems. LS 12, TU Dortmund

Lesson 5: Software for embedding in System- Part 2

6/17/2011. Real-time Operating Systems

Questions answered in this lecture: CS 537 Lecture 19 Threads and Cooperation. What s in a process? Organizing a Process

Operating-System Structures

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

Exam TI2720-C/TI2725-C Embedded Software

Operating System Architecture. CS3026 Operating Systems Lecture 03

ERIKA Enterprise LWIP Tutorial

Chapter 2 Operating-System Structures

ZiLOG Real-Time Kernel Version 1.2.0

Real-Time Operating Systems Design and Implementation. LS 12, TU Dortmund

ERIKA Enterprise Minimal API Manual....multithreading on a thumb!

Process Description and Control

Windows 7 Overview. Windows 7. Objectives. The History of Windows. CS140M Fall Lake 1

Real-Time & Embedded Operating Systems

6/20/2018. Lecture 2: Platforms & RTOS. Outline. Lab Setup (20 min) Labs work. Lecture: Platform + RTOS

Last Class: CPU Scheduling. Pre-emptive versus non-preemptive schedulers Goals for Scheduling: CS377: Operating Systems.

Case Study. Windows XP. Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze

CHAPTER 2: PROCESS MANAGEMENT

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke

Kernel Types Simple OS Examples System Calls. Operating Systems. Autumn CS4023

* There are more than 100 hundred commercial RTOS with memory footprints from few hundred kilobytes to large multiprocessor systems

Operating Systems Overview

Agenda. Threads. Single and Multi-threaded Processes. What is Thread. CSCI 444/544 Operating Systems Fall 2008

2008 Chapter-8 L1: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill, Inc.

Chapter 5: Threads. Overview Multithreading Models Threading Issues Pthreads Windows XP Threads Linux Threads Java Threads

Real-Time Operating Systems (Working Draft) What is an Operating System (OS)?

What s in a process?

Operating Systems (2INC0) 2018/19. Introduction (01) Dr. Tanir Ozcelebi. Courtesy of Prof. Dr. Johan Lukkien. System Architecture and Networking Group

Software Development & Education Center

Operating System: Chap2 OS Structure. National Tsing-Hua University 2016, Fall Semester

Part I. Aknoledgement. Mauro Marinoni Objectives. Why an embedded O.S.?

Lecture 17: Threads and Scheduling. Thursday, 05 Nov 2009

Distributed Systems Operation System Support

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

Product Information Embedded Operating Systems

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering)

Chapter 3 Process Description and Control

The OS Wars. Success

Sistemi in Tempo Reale

Roadmap. Tevfik Ko!ar. CSC Operating Systems Fall Lecture - VII CPU Scheduling - II. Louisiana State University

Roadmap. Multilevel Queue Scheduling. Multilevel Queue. Example of Multilevel Feedback Queue. Multilevel Feedback Queue. Tevfik Ko!

The modularity requirement

Green Hills Software, Inc.

Introduction to Real-Time Operating Systems

Chapter 4 Threads, SMP, and

REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux. Lesson-13: RT Linux

What s in a traditional process? Concurrency/Parallelism. What s needed? CSE 451: Operating Systems Autumn 2012

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Notes. CS 537 Lecture 5 Threads and Cooperation. Questions answered in this lecture: What s in a process?

10/10/ Gribble, Lazowska, Levy, Zahorjan 2. 10/10/ Gribble, Lazowska, Levy, Zahorjan 4

Chapter 4: Multi-Threaded Programming

Operating Systems : Overview

Chapter 2: Operating-System Structures. Operating System Concepts 8 th Edition

Process Characteristics

Chapter 4: Threads. Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads

Lecture 2 - Fundamental Concepts

Chapter 3: Operating-System Structures

Lecture 5: Process Description and Control Multithreading Basics in Interprocess communication Introduction to multiprocessors

RT extensions/applications of general-purpose OSs

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

Concurrent Programming. Implementation Alternatives. Content. Real-Time Systems, Lecture 2. Historical Implementation Alternatives.

Concurrent Programming

Operating Systems: Internals and Design Principles. Chapter 2 Operating System Overview Seventh Edition By William Stallings

OPERATING SYSTEMS UNIT - 1

İzmir Institute of Technology Embedded Systems Lab. Real-Time Systems. Asst. Prof. Dr. Tolga Ayav Department of Computer Engineering

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

SVENSK STANDARD SS-ISO :2005

CSE 237A Middleware and Operating Systems. Tajana Simunic Rosing Department of Computer Science and Engineering University of California, San Diego.

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

Chapter 5: CPU Scheduling

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

The Real-time Specification for Java

Threads. Raju Pandey Department of Computer Sciences University of California, Davis Spring 2011

TDDI04, K. Arvidsson, IDA, Linköpings universitet Operating System Structures. Operating System Structures Overview. Operating System Services

Transcription:

Model Based Development of Embedded Control Software Part 4: Supported Target Platforms Claudiu Farcas Credits: MoDECS Project Team, Giotto Department of Computer Science cs.uni-salzburg.at

Current execution platforms for TDL Java OSEK/VDX InTime POSIX Native* (microkernel*) 2

Java - Advantages General purpose OOP language Rapid prototyping Cross platform development virtual machines Same development platform from GUI to embedded device Automatic memory management - No pointers Reasonable performance on modern hardware Easy integration with data storage solution 3

Java - Disadvantages Resource management (garbage collector) Not hard real-time Requires high run-time resources (memory, CPU) for embedded devices Performance adequate for simulation level/proof of concept Hard to interact with hardware for controlling applications 4

JAVA - TDL Runtime - Details Dynamic module loading = Java Reflection TDL Tasks = Java Threads Timing -> Thread.sleep Scheduling multiple modules -> CPU partitioning Dispatch table of each mode computed at load-time Preemption -> thread.suspend, thread.resume 5

Java - TDL Runtime Usage Scenario: application consisting of module: MyModule Implementing functionality code: - MyModule.java contains the MyModule class Writing & compilation of the TDL application: - TDL timing code compiles into MyModule.ecode - Generated wrapper code for functionality: MyModule$.java Java sources compilation: MyModule, MyModule$.class Execution of MyModule under Java E-Machine 6

OSEK/VDX What is it? German: Offene Systeme und deren Schnittstellen für die Elektronik im Kraftfahrzeug (Open systems and the corresponding interfaces for automotive electronics) + French Vehicle Distributed Executive Standard in Automotive Domain - 1993 Registered trademark of Siemens AG 7

OSEK/VDX Why? Portability and reusability of software: - Interfaces - abstract and application-independent as possible - User interface independent of hardware/network - Verification of functionality and implementation of prototypes Standardization Scalability - Efficient design of architecture - Configurable and scalable functionalities to enable optimal adjustment of the architecture to the target application 8

OSEK/VDX Covered areas Communication - Data exchange within and between ECUs Network Management - Configuration determination and monitoring Operating System - Real-time environment for ECU software - Time Triggered Environment* (OSEKtime) System Configuration Overview - OIL 9

OSEK/VDX Development Figure credits: OSEK 10

OSEK/VDX - Advantages Savings in costs and development time Software quality best product/company wins Standardized interfacing features for control units with different architectural designs. Reuse of resources (functionality code) C language Absolute independence with regards to individual implementation (it s just a specification) 11

OSEK/VDX The big NO(s) No malloc(), free() No heaps No memory regions / partitions No dynamic memory allocation facilities whatsoever No specific device I/O support No file system support No on-the-fly - creation of operating system objects (tasks, events, resources, alarms,...) - deletion of operating system objects - programmed changes of task priority or preemptibility No round-robin time-slicing of tasks No application mode switch at run-time 12

OSEK/VDX standard Functional entities - Interrupts two categories (with/without API calls) - Tasks groups of tasks, support for application modes 13

OSEK Runtime concepts Task conformance classes - Basic terminate, preempt via task priority or interrupt Sync points only at start/end - Extended wait permitted higher run-time resources requirement Recurring events - Counters ticks - Alarms trigger task or alarm callback routine 14

OSEK OIL Configuration File Sample CPU MyCPU {... TASK TaskA { PRIORITY = 2; SCHEDULE = NON; ACTIVATION = 1; AUTOSTART = TRUE; RESOURCE = resource1; EVENT = event1; }; COUNTER MyTimer { MINCYCLE = 16; MAXALLOWEDVALUE = 127; TICKSPERBASE = 90; }; ALARM WakeTaskA { COUNTER = MyTimer; ACTION = ACTIVATETASK { TASK = TaskA; };... }; Automatically generated by TDL compiler plugin for OSEK 15

OSEK - TDL Runtime - Details Dynamic module loading = not supported TDL Tasks = OSEK Basic Tasks Timing -> Counter + Alarm + TDL Scheduler Scheduling multiple modules -> RM offline or EDF offline + runtime Preemption ActivateTask, ChainTask + OSEK scheduler Mode changes supported in TDL sense, not original OSEK* Resource management TDL internal Interrupts ONLY when required via OSEK ISR 16

OSEK - TDL Runtime - Usage Scenario: application consisting of module: MyModule Implementing functionality code: - MyModule.c contains the MyModule functionality Writing & compilation of the TDL application: - Generated timing (E-code)+ wrapper code for functionality: MyModule_TDL.c - Generated OIL files: NodeName.oil, MyModule.oil OIL files + C sources compilation: MyModule, MyModule_TDL.c + TDL Runtime libraries + *.oil => MyApplication.elf Transfer/flash MyApplication.elf onto embedded platform 17

InTime What is it? RTOS developed by TenAsys (irmx succesor) 18

InTime - Advantages Enhancement of Windows 2000/XP with RT capabilities Seamless integration with MS Visual Studio (C/C++) Same development platform from GUI to embedded device C/C++ Rapid prototyping Cheap and fast hardware Memory protection for real-time processes from Windows apps Debugging facilities for real-time processes from Windows space Real-time TCP/IP networking* (limited HW devices) RT object browsing + performance analysis 19

InTime - Disadvantages Only Intel Pentium/Pii/P3/P4/Xeon supported Constricted design because of PC architecture High cpu/memory/power requirements industrial design only Proprietary OS, API vendor lock-in Slow time related primitives (mostly because of PC RTC) Single CPU support only* (multi-cpu in progress) Only 256 priority levels, some reserved for OS or HW (RM becomes complicated on complex designs) 20

InTime TDL Runtime - Details Dynamic module loading = possible but not supported yet in TDL tool-chain TDL Tasks = Pre-allocated InTime real-time threads Timing -> kernel level Alarm + TDL Scheduler Scheduling multiple modules -> Offline RM or Hybrid EDF (offline+runtime) Preemption -> thread priorities manipulation/thread suspend/resume Debugging console Fast, up to 10KHz task freq (50KHz with APIC tweak) 21

InTime - TDL Runtime - Usage Scenario: application consisting of module: MyModule Implementing functionality code: - MyModule.c contains the MyModule functionality Writing & compilation of the TDL application: - Generated timing (E-code)+ wrapper code for functionality: MyModule_TDL.c C sources compilation: MyModule, MyModule_TDL.c + TDL Runtime libraries => MyApplication.rta Execution of MyApplication.rta under InTime RTOS 22

POSIX - Advantages Big standard covering multiple areas Wide range of implementations available UNIX* derivatives available on most embedded platforms (Linux, QNX, RTLinux, RTAI, RTEMS, ) C/C++ based Free tool-chains available for most platforms Flexible 23

POSIX - Disadvantages Ancient design Not all features actually used/required for embedded platforms C usage may result in hard to maintain code No automatic memory management/garbage collection 24

POSIX TDL Runtime - Details Dynamic module loading = possible TDL Tasks = Pre-allocated POSIX real-time threads, or plain user-level threads for simulations Timing -> nanosleep + TDL Scheduler Scheduling multiple modules -> Offline RM or Hybrid EDF (offline+runtime) Preemption -> thread priorities manipulation Debugging console Fast and lightweight 25

POSIX TDL Runtime - Usage Scenario: application consisting of module: MyModule Implementing functionality code: - MyModule.c contains the MyModule functionality Writing & compilation of the TDL application: - Generated timing (E-code)+ wrapper code for functionality: MyModule_TDL.c C sources compilation: MyModule, MyModule_TDL.c + TDL Runtime libraries => MyApplication (ELF simulation), alternate MyApplication kernel module Execution of MyApplication under POSIX compatible RTOS 26

OSEKtime Brief overview Adjacent standard to OSEK Target: Distributed Embedded Control Units Design philosophy: - Predictability - Modularity - Dependability - OSEK compatible - Minimal resource requirements 27

OSEKtime - Architecture Figure OSEKtime 28

OSEKtime - Advantages Static scheduling All basic RT services - Clock synchronization - Task management - Interrupt handling - Error detection - Fault Tolerance via FTCom Preemptive multitasking + Time-triggered tasks may preempt OSEK non-preemptive tasks Support for mode switches 29

OSEKtime - Disadvantages Compared with OSEK, Tasks cannot wait for resources! Static dispatch table Difficult multi-application multi-mode support (because of static dispatch table) 30