48
1 嵌嵌嵌嵌嵌 Embedded system

嵌入式系統 Embedded system

Embed Size (px)

DESCRIPTION

嵌入式系統 Embedded system. Application of Embedded System. On Potable / PDA Solution. Application of Embedded System. On Potable / PDA & Smartphone Solution. Introduce Embedded OS. Embedded OS Introduction (1). Windows CE Microsoft Support CPU: x86, ARM, MIPS, …etc - PowerPoint PPT Presentation

Citation preview

Page 1: 嵌入式系統 Embedded system

1

嵌入式系統Embedded system

Page 2: 嵌入式系統 Embedded system

2

Application of Embedded System On Potable / PDA Solution

Page 3: 嵌入式系統 Embedded system

3

Application of Embedded System On Potable / PDA & Smartphone Solution

Page 4: 嵌入式系統 Embedded system

4

Introduce Embedded OS

Page 5: 嵌入式系統 Embedded system

5

Embedded OS Introduction(1) Windows CE

MicrosoftSupport CPU: x86, ARM, MIPS, …etcWindows CE Platform BuildereVC, eVBFriendly GUIApplication: PDA, WebPAD, PVR, Thin Client,

…etc

Page 6: 嵌入式系統 Embedded system

6

Embedded OS Introduction(2) DOS

Microsoft16 bits, single user single taskApplication: LED billboard, industry control

Page 7: 嵌入式系統 Embedded system

7

Embedded OS Introduction(3) Palm OS

Palm ComputingSuccinct architectureSmall hardware

requirement low-powerApplication: PDA

Page 8: 嵌入式系統 Embedded system

8

Embedded OS Introduction(4) VxWorks

WindRiver Support CPU: x86, i960, MIPS, PowerPC Popularly use in embedded systems GNU compiler and debugger Hard real time It’s famous to apply to robot on Mars and Sony robot

MicroC/OS Hard real time

Page 9: 嵌入式系統 Embedded system

9

Embedded OS Introduction(5) Symbian

The mobile operating system

Friendly GUI Development with Microsoft

Virtual C++ 6.0 and S60 (SDK)

The main competitor is Windows

Page 10: 嵌入式系統 Embedded system

10

Embedded OS Introduction(6) Linux

Support CPU: x86, ARM, MIPS, SH, i960, PowerPC, …etc

Open SourcePowerful Network FunctionsEasy Software Porting GNU Complier and Debugger

Page 11: 嵌入式系統 Embedded system

11

Embedded Systems

Development

Page 12: 嵌入式系統 Embedded system

12

Cross-Development Environment

Target has limited resource (memory, storage, low speed processor) .

Host and Target are different architecture

Cross-platformDevelopmentEnvironment

Host•Bootloader•Kernel•Root Filesystem

Target

Page 13: 嵌入式系統 Embedded system

13

Hardware Connection

Page 14: 嵌入式系統 Embedded system

14

Linux Architecture

Applications

Bash Shell

LinuxKernel

hardware

Page 15: 嵌入式系統 Embedded system

15

Linux Architecture

Hardware

Bootloader DriversKernel

File System Protocol Stacks

Kernel System Call Interface

GLIBC Other Libraries

JavaGUI

Applications

Page 16: 嵌入式系統 Embedded system

16

All the things we need

Cross-Platform development toolchain Bootloader

Provide by vendor

Linux kernel Linux kernel + some patches if needed

Filesystem Busybox Device node Configuration

Page 17: 嵌入式系統 Embedded system

17

The Bootloader's Job

One main mission: load the operating system(s). Tasks: Initialize the machine properly (the kernel can do part of

this later too). Access the kernel and initrd files in their storage mediu

m (need to support the corresponding filesystem too) Because of the above 2 tasks, bootloaders are often pla

tform specific! Load the kernel and initrd files Execute the kernel file with the right command line

Page 18: 嵌入式系統 Embedded system

18

bootloader

Page 19: 嵌入式系統 Embedded system

19

Some Bootloaders

LILO: LInux LOad. Original Linux bootloader. Still in use! http://freshmeat.net/projects/lilo/ Supports: x86

GRUB: GRand Unified Bootloader from GNU. More powerful. http://www.gnu.org/software/grub/ Supports: x86

LinuxBIOS: Linux based BIOS replacement http://www.linuxbios.org/ Supports: x86

Page 20: 嵌入式系統 Embedded system

20

Some Bootloaders (cont.)

UBoot: Universal Bootloader. The most used on arm. http://uboot.sourceforge.net/ Supports: arm, ppc, mips, x86

RedBoot: eCos based bootloader from RedHat http://sources.redhat.com/redboot/ Supports: x86, arm, ppc, mips, sh, m68k...

Page 21: 嵌入式系統 Embedded system

21

Why Use Linux

Open Source Reliability Salability Secure Supports Virtually All Network Communication P

rotocols

Page 22: 嵌入式系統 Embedded system

22

GNU Introduction 一九八四年,在美國麻省理工學院任教的理查 · 史托曼 (Richard M. Stallman) 創辦「自由軟體基金會 (Free Software Foundation) 」,並提出 GNU(Gnu is Not Unix) 計畫

提出 GNU 計畫中所發展的一整套自由軟體,內容包括了編譯器、組譯器、文書處理軟體等各式各樣的應用軟體 ftp://ftp.gnu.org/gnu http://www.gnu.org

Page 23: 嵌入式系統 Embedded system

23

GCC

Cross Compiler 就是在一個平台上 ( 如 x86) 產生出另外一個平台上 ( 如 arm) 的可執行檔案 ELF (Executable and Linking Format)

如果要在 ARM 上面建立 Linux Kernel 必需使用到 Cross Compiler而一般編譯 Linux Kernel 的一定是 GCC

http://www.kernel.org

Page 24: 嵌入式系統 Embedded system

24

GCC = GNU Compiler Collection

Features Portable Cross-compiling Support different language

C, C++, Objective-C, Fortran, Java, and Ada Free Software http://gcc.gnu.org

程式編譯器 arm-linux-gcc用來將原始碼編譯成 arm 平台上執行的程式$ arm-linux-gcc hello.c –o hello/usr/local/arm/include/asm,linuxhttp://0rz.net/2508Ahttp://people.debian.org/~debacle/cross.html

Page 25: 嵌入式系統 Embedded system

25

System Boot Flow

Page 26: 嵌入式系統 Embedded system

26

System Storage The storage devices used in embedded systems are often quite diffe

rent from those used in workstations and servers. Embedded systems tend to use solid-state storage devices such as f

lash chips and flash disks.

Need the MTD subsystem to support

bootloader

boot parameters

kernel root filesystem

Page 27: 嵌入式系統 Embedded system

27

Kernel Considerations

Page 28: 嵌入式系統 Embedded system

28

Kernel Configuration

make config 這種模式需要逐行輸入所需要設定的項目,無法往前修改設定,

所以目前很少使用這種方式來設定 Kernel 的項目了; make xconfig

這種模式則是使用 X-Window 為主要環境的設定模式!除非你有 X-Window 在執行,否則沒有辦法使用這種模式;

make menuconfig 這種模式有點像是文字界面的選單模式,較為簡便,而且可以在

純文字界面下面執行編輯動作!是目前最常使用的模式。

Page 29: 嵌入式系統 Embedded system

29

Kernel Configuration

Page 30: 嵌入式系統 Embedded system

30

Kernel Compiling

make dep 建立相依的屬性關係!

make clean 將舊的資料去除掉

make bzImage 開始編譯核心!這個核心是經過壓縮的,此外,這個步驟也很長!

make modules 開始編譯模組!這個動作視您剛剛編譯的模組數量!

make modules_install 將 modules 資料安裝在 /lib/modules/`uname -r` 裡面!

make install 安裝 bzImage 建立完成的核心

Page 31: 嵌入式系統 Embedded system

31

Root Filesystem Content

Page 32: 嵌入式系統 Embedded system

32

Filesystem

//bin/boot

/grub/dev/etc/home/lib/mnt/proc/sbin/tmp/usr

/src/bin/sbin

/var/log/spool

根目錄一般常用指令Kernel image 的位置

grub 設定硬體裝置系統設定一般使用者的家目錄函式庫儲存裝置系統裝置訊息管理使用指令暫存檔其他軟體放的目錄

原始程式碼一般可執行程式碼管理使用程式碼

系統記錄檔案登入檔以及錯誤訊息檔案郵件檔案

Page 33: 嵌入式系統 Embedded system

33

Building Root Filesystem

Download the BusyBox source code from http://www.busybox.net/

Building BusyBox make clean make all make install

After make complete, the busybox will be at ./path/to/busybox_src/_install/

Page 34: 嵌入式系統 Embedded system

34

APC Source

Assembler

C Libraries ASM Source

.aof

Object Libraries

.aif debug

ARMsd

Developmentboard

ARMulator

System model

C Compiler

Linker

Page 35: 嵌入式系統 Embedded system

35

Application andGraphic User

Interface

Page 36: 嵌入式系統 Embedded system

36

Graphic User Interface

Window System X Window (TinyX)

http://www.xfree86.org/ QPE (Qt Plamtop Environment) / Qtopia

http://www.trolltech.com/products/qtopia/index.html GPE (GPE Palmtop Environment)

http://gpe.handhelds.org/ Microwindows

http://microwindows.org/ MiniGUI

http://www.minigui.org/

Page 37: 嵌入式系統 Embedded system

37

Qtopia

Page 38: 嵌入式系統 Embedded system

38

Ap.

OperaOperaACCESSACCESSNetFrontNetFront MIDPMIDP

Page 39: 嵌入式系統 Embedded system

39

GPE

                      

Page 40: 嵌入式系統 Embedded system

40

Opie screenshots

Page 41: 嵌入式系統 Embedded system

41

Microwindows

MP3 Player Games

Page 42: 嵌入式系統 Embedded system

42

MiniGUI

Mail

                                    

Browser            

Page 43: 嵌入式系統 Embedded system

43

web reference http://www.delphiresearch.com Local Service Provider http://www.embeddedlinuxjournal.com Embedded Magazine http://www.embedded-linux.org Embedded Trade Association http://www.ibm.com Tool Developer http://www.lineo.com Distribution http://www.linux.org Linux Association http://www.linuxdevices.com Embedded Magazine http://www.lynuxworks.com Distribution http://www.microcross.com Tool Developer http://www.mvista.com Distribution http://www.oncoresystems.com RTOS http://www.redhat.com Service Provider http://www.sleepycat.com Embedded Database http://www.trolltech.com Tool Developer http://www.nsa.gov/selinux Secure Linux from NSA

Page 44: 嵌入式系統 Embedded system

44

Development Tools

Page 45: 嵌入式系統 Embedded system

45

開發工具 ARM SDT ( ARM Software Development Kit )是 ARM 公司

為方便使用者在 ARM 晶片上進行應用程式的開發而推出的一整套整合開發工具

目前的最高版本為 SDT2.5.2 從 SDT2.5.1 開始, ARM 公司宣佈推出一套新的整合開發

工具 ARM ADS1.0 ,取代 ARM SDT SDT 與 ADS 保持了良好的相容性

Page 46: 嵌入式系統 Embedded system

46

開發工具 ARM ADS ( ARM Developer Suite )是 ARM 公司推出的新

一代 ARM 整合開發工具,用以取代 ARM 公司以前推出的開發工具 ARM SDT 。

目前 ARM ADS 的最新版本為 ADS1.2 。 ARM ADS 是 ARM SDT 的升級版本,對 ARM SDT 的模組進行

了增強,並替換了部分 SDT 的部件, ARM ADS 支援所有的ARM 系列處理器,包括最新的 ARM9E 和 ARM10

除了 Windows 作業系統外,還支援在 Linux 作業系統的執行。

Page 47: 嵌入式系統 Embedded system

47

開發工具

Page 48: 嵌入式系統 Embedded system

48

THE END

Thanks you.