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

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

Upload: kyle-frye

Post on 01-Jan-2016

81 views

Category:

Documents


7 download

DESCRIPTION

嵌入式作業系統實作 Implementation of Embedded Operating Systems. 薛智文 [email protected] http://rswiki.csie.org/dokuwiki/courses:102_2: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:102_2:ieos

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

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

資工系網媒所 NEWS實驗室

01:20 /352

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

資工系網媒所 NEWS實驗室

01:20 /353

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實驗室

市值 2013/06/30

/354

System Software

系微 1x (20.7 億台幣 )

HardwareApplication Software

宏達電 華碩 廣達 99x 99x 119x

台積電 1307x

鴻海 417x

訊連 5x

聯發科 213x

趨勢 61x

TI 560x

Google 4233x

IBM 3071x

Microsoft 4181x ARM 244x

Intel 1746x

Apple 5395x

Vmware 416x

Citrix 164x Adobe 332x

Semantec 227x

01:20

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

資工系網媒所 NEWS實驗室

市值 2013/10/08

/355

System Software

系微 1x (20.1 億台幣 )

HardwareApplication Software

宏達電 華碩 廣達 57x 88x 124x

台積電 1342x

鴻海 492x

訊連 4x

聯發科 255x

趨勢 77x

TI 644x

Google 4227x

IBM 2923x

Microsoft 4067x ARM 322x

Intel 1668x

Apple 6497x

Vmware 508x

Citrix 194x Adobe 372x

Semantec 254x

01:20

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

資工系網媒所 NEWS實驗室

01:20 /356

Outline

Introduction to Embedded System

Introduction to Embedded OS

uC/OS-II

Xen

OpenStack

uC/OS-III

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

資工系網媒所 NEWS實驗室

01:20 /357

Introduction to Embedded System

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

資工系網媒所 NEWS實驗室

01:20 /358

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 9: 嵌入式作業系統實作 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’ -“ 自己動手寫作業系統 ,” 于淵

01:20 /359

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

資工系網媒所 NEWS實驗室

01:20 /3510

電子書包發展硬體

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

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

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

ICE DDK

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

教師教學應用軟體

電子書包教學應用平台

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

同儕群體應用軟體數

位學習輔具

數位學習平台

閱讀程式SCOR

MHTMLXML

數位學習輔具

數位學習平台

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

Protocol

•SyncML

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

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

資工系網媒所 NEWS實驗室

01:20 /3511

Example

RS485

RS485

Ethernet

Ethernet

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

資工系網媒所 NEWS實驗室

01:20 /3512

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

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

資工系網媒所 NEWS實驗室

01:20 /3513

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

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

資工系網媒所 NEWS實驗室

01:20 /3514

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

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

資工系網媒所 NEWS實驗室

01:20 /3515

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

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

資工系網媒所 NEWS實驗室

01:20 /3516

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

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

資工系網媒所 NEWS實驗室

01:20 /3517

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

GNU compilers

Logic analyzers

Compilers

IDE

Oscilloscopes

JTAG emulators

GNU debuggers

Debuggers

ICE

Networking protocols

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

資工系網媒所 NEWS實驗室

01:20 /3518

Page 19: 嵌入式作業系統實作 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]

01:20 /3519

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

資工系網媒所 NEWS實驗室

01:20 20

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, …

/35

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

資工系網媒所 NEWS實驗室

ARM CPU

01:20 /3521

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

資工系網媒所 NEWS實驗室

01:20 /3522

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 23: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

01:20 /3523

Real-Time Systems vs. Embedded Systems

RTS ESRTES

.Radar .Calculator.ABS

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

資工系網媒所 NEWS實驗室

01:20 /3524

Real-Time Systems

Time

Value

Hard RTS

Soft RTS

FirmRTS

Deadline

-Value

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

資工系網媒所 NEWS實驗室

01:20 /3525

Real-Time Systems (RTS)

Firm RTS

Soft RTSHard RTS

Proprietary

Open

Centralized

Distributed

Embedded

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

資工系網媒所 NEWS實驗室

01:20 /3526

Application vs. Response Time

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

資工系網媒所 NEWS實驗室

01:20 /3527

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 28: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

01:20 /3528

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 29: 嵌入式作業系統實作 Implementation of  Embedded Operating Systems

資工系網媒所 NEWS實驗室

01:20 /3529

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

資工系網媒所 NEWS實驗室

01:20 /3530

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

資工系網媒所 NEWS實驗室

01:20 /3531

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

資工系網媒所 NEWS實驗室

01:20 /3532

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

資工系網媒所 NEWS實驗室

01:20 /3533

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

資工系網媒所 NEWS實驗室

01:20 /3534

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

資工系網媒所 NEWS實驗室

01:20 /3535

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

資工系網媒所 NEWS實驗室

01:20 /3536

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.

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

資工系網媒所 NEWS實驗室

01:20 /3537