嵌入式作業系統實作 implementation of embedded operating systems

29
國國國國國國 國國國國國國 國國國國國國國國國 Implementation of Embedded Operating Systems 薛薛薛 [email protected] http://rswiki.csie.org/dokuwiki/ courses:101_1:ieos http://www.facebook.com/groups/ 190254204331656/

Upload: illiana-spencer

Post on 02-Jan-2016

82 views

Category:

Documents


0 download

DESCRIPTION

嵌入式作業系統實作 Implementation of Embedded Operating Systems. 薛智文 [email protected] http://rswiki.csie.org/dokuwiki/courses:101_1:ieos http://www.facebook.com/groups/190254204331656/. Rules in Class. Be on time for class, deliverable, … No food but water. No nap but rest. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

國立台灣大學資訊工程學系

嵌入式作業系統實作 Implementation of

Embedded Operating Systems

薛智文[email protected]

http://rswiki.csie.org/dokuwiki/courses:101_1:ieos

http://www.facebook.com/groups/190254204331656/

Page 2: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /282

Page 3: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /283

Rules in Class

Be on time for class, deliverable, …No food but water.

No nap but rest.

Ask questions in>between>after classes.

Do participate.

Page 4: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /284

Outline

Introduction to Embedded System

Introduction to Embedded OS

uC/OS-II

Xen

OpenStack

uC/OS-III

Page 5: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /285

Introduction to Embedded System

Page 6: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /286

Preface

Window 2000, 30M lines.

Netscape Communicator 5, 17M lines.

A 圍棋 program, 0.01M lines.

A SOHO router, 0.6M lines.

What is Embedded (Linux/system)?

Linux image files directories lines bytes

2.6.4 1150K 13400 960 5.6M 167M

2.4.25 1177K 11000 670 5M 149M

2.2.26 507K 5100 280 2.5M 75M

ThreadX 129K 158 1 29K 1.5M

uC/OS-II 55K 13 1 5.5K 0.4M

Tinix’ 0.5K 1 1 20 0.5K

Page 7: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

org 07c00h ; tell the assembler to load onto 7c00, 0100h for DOS

mov ax, cs

mov ds, ax

mov es, ax

call DispStr ; call string display procedure

jmp $ ; infinite loop

DispStr:

mov ax, BootMessage

mov bp, ax ; ES:BP = string address

mov cx, 16 ; CX = string length

mov ax, 01301h ; AH = 13, AL = 01h

mov bx, 000ch ; page number is 0 (BH = 0) black background red character

; (BL = 0Ch, highlight)

mov dl, 0

int 10h ; the 10h software interrupt

ret

BootMessage: db "Hello, OS world!"

times 510-($-$$) db 0 ; fill the rest of sector (512 bytes) with 0

dw 0xaa55 ; end of sector

Tinix’ -“ 自己動手寫作業系統 ,” 于淵

05:37 /287

Page 8: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /288

電子書包發展硬體

電子書包作業系統 (OS / UI / CM)

教學 / 同儕群體應用軟體開發工具

系統軟體開發工具 (SDK)相容性測試軟體工具 (TCK)

ICE DDK

開發工具電子書包平台結構

教師教學應用軟體

電子書包教學應用平台

電子書包教學數位內容 電子書包數位內容開發工具

同儕群體應用軟體數

位學習輔具

數位學習平台

閱讀程式SCOR

MHTMLXML

數位學習輔具

數位學習平台

Physical•Serial•USB•1394•IrDA•Bluetooth•802.11

Protocol

•SyncML

電子書包與數位學習輔具分工架構圖

Page 9: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /289

Example

RS485

RS485

Ethernet

Ethernet

Page 10: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2810

在嵌入式軟體開發中採用的作業環境 EE Times-Asia, 2006 Dec

Page 11: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2811

在設計專案中採用即時作業系統 EE Times-Asia, 2006 Dec

Page 12: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2812

在韌體開發中採用的語言 EE Times-Asia, 2006 Dec

Page 13: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2813

在嵌入式應用開發中採用的語言 EE Times-Asia, 2006 Dec

Page 14: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2814

不同工具的重要性及工程師滿意程度

Page 15: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2815

嵌入式設計中前 10 名軟硬體開發工具 Hardware/software Development Tools

GNU compilers

Logic analyzers

Compilers

IDE

Oscilloscopes

JTAG emulators

GNU debuggers

Debuggers

ICE

Networking protocols

Page 16: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2816

Page 17: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

Embedded System from Wikipedia

An embedded system is a computer system designed for specific control functions within a larger system, often with real-time computing constraints.[1][2]

05:37 /2817

Page 18: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 18

Where to Embedded?IP (Intellectual Property)

SOC (System on Chip)small size, low power

ChipMCU (Micro Controller Unit), 70% marketDSP (Digital Signal Processor)

ModuleGeneral CPU

ARM7TDMIThumb, Debugger, Multiplier, ICEw/o MMU

Pipeline, Cache, Bus, …

/28

Page 19: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2819

What is an Embedded System?

A system designed to perform a specific function, e.g. eBook, PDA, eWatch, …

A combination of computer hardware and software, and perhaps additional mechanical or other parts.Embedded vs. General-Purpose

What is a specific function?Is there a limitation?

Cost, Robust, Low-power, Small, …Using C + Assembly, Java ?

Page 20: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2820

Real-Time Systems vs. Embedded Systems

RTS ESRTES

.Radar .Calculator.ABS

Page 21: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2821

Real-Time Systems

Time

Value

Hard RTS

Soft RTS

FirmRTS

Deadline

-Value

Page 22: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2822

Real-Time Systems (RTS)

Firm RTS

Soft RTSHard RTS

Proprietary

Open

Centralized

Distributed

Embedded

Page 23: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2823

Application vs. Response Time

Page 24: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2824

Embedded System Examples

Computer peripheralsKeyboard, Mouse, …

Information AppliancesSet-Up Boxes, WebTV, …

Monitors and SensorsFire Alarm, Heartbeat Detector, …

Controllers in ElectronicsRefrigerator, Air Conditioner, …

Communication DevicesHub, Router, …

Page 25: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2825

Business Issues of ES

Time-to-market for new devicesDesign to delivery: in weeks

Sustained pressure to reduce costsMany proprietary choices yield low-margins

Life cycle managementNew products overlapping each otherPositioning nightmares

Open platform choices considered risky?Resources expended on “recreating the wheel…” not on product differentiation.

Page 26: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2826

Page 27: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2827

Page 28: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2828

Page 29: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

05:37 /2829

ES Technology IssuesNeed more complex technology integrated for new services

broadband, wireless, real-time, low-power, IOT…

Multiple emerging standards need to be deployed simultaneously.Product released globally on the same day!Tools, Tools, Tools, …Third party software

No one company can do it all anymoreSupport nightmares

Lack of sources from proprietary choicesOpen sources sound seductive … but risky.