教科書:系統程式 - 第 11 章、嵌入式系統sp1.wdfiles.com/local--files/slide/ch11.pdf為何探討嵌入式系統? 在嵌入式系統當中, 通常沒有作業系統可以使用
嵌入式系統 Embedded system
-
Upload
grant-mcfarland -
Category
Documents
-
view
143 -
download
1
description
Transcript of 嵌入式系統 Embedded system
1
嵌入式系統Embedded system
2
Application of Embedded System On Potable / PDA Solution
3
Application of Embedded System On Potable / PDA & Smartphone Solution
4
Introduce Embedded OS
5
Embedded OS Introduction(1) Windows CE
MicrosoftSupport CPU: x86, ARM, MIPS, …etcWindows CE Platform BuildereVC, eVBFriendly GUIApplication: PDA, WebPAD, PVR, Thin Client,
…etc
6
Embedded OS Introduction(2) DOS
Microsoft16 bits, single user single taskApplication: LED billboard, industry control
7
Embedded OS Introduction(3) Palm OS
Palm ComputingSuccinct architectureSmall hardware
requirement low-powerApplication: PDA
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
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
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
11
Embedded Systems
Development
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
13
Hardware Connection
14
Linux Architecture
Applications
Bash Shell
LinuxKernel
hardware
15
Linux Architecture
Hardware
Bootloader DriversKernel
File System Protocol Stacks
Kernel System Call Interface
GLIBC Other Libraries
JavaGUI
Applications
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
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
18
bootloader
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
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...
21
Why Use Linux
Open Source Reliability Salability Secure Supports Virtually All Network Communication P
rotocols
22
GNU Introduction 一九八四年,在美國麻省理工學院任教的理查 · 史托曼 (Richard M. Stallman) 創辦「自由軟體基金會 (Free Software Foundation) 」,並提出 GNU(Gnu is Not Unix) 計畫
提出 GNU 計畫中所發展的一整套自由軟體,內容包括了編譯器、組譯器、文書處理軟體等各式各樣的應用軟體 ftp://ftp.gnu.org/gnu http://www.gnu.org
23
GCC
Cross Compiler 就是在一個平台上 ( 如 x86) 產生出另外一個平台上 ( 如 arm) 的可執行檔案 ELF (Executable and Linking Format)
如果要在 ARM 上面建立 Linux Kernel 必需使用到 Cross Compiler而一般編譯 Linux Kernel 的一定是 GCC
http://www.kernel.org
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
25
System Boot Flow
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
27
Kernel Considerations
28
Kernel Configuration
make config 這種模式需要逐行輸入所需要設定的項目,無法往前修改設定,
所以目前很少使用這種方式來設定 Kernel 的項目了; make xconfig
這種模式則是使用 X-Window 為主要環境的設定模式!除非你有 X-Window 在執行,否則沒有辦法使用這種模式;
make menuconfig 這種模式有點像是文字界面的選單模式,較為簡便,而且可以在
純文字界面下面執行編輯動作!是目前最常使用的模式。
29
Kernel Configuration
30
Kernel Compiling
make dep 建立相依的屬性關係!
make clean 將舊的資料去除掉
make bzImage 開始編譯核心!這個核心是經過壓縮的,此外,這個步驟也很長!
make modules 開始編譯模組!這個動作視您剛剛編譯的模組數量!
make modules_install 將 modules 資料安裝在 /lib/modules/`uname -r` 裡面!
make install 安裝 bzImage 建立完成的核心
31
Root Filesystem Content
32
Filesystem
//bin/boot
/grub/dev/etc/home/lib/mnt/proc/sbin/tmp/usr
/src/bin/sbin
/var/log/spool
根目錄一般常用指令Kernel image 的位置
grub 設定硬體裝置系統設定一般使用者的家目錄函式庫儲存裝置系統裝置訊息管理使用指令暫存檔其他軟體放的目錄
原始程式碼一般可執行程式碼管理使用程式碼
系統記錄檔案登入檔以及錯誤訊息檔案郵件檔案
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/
34
APC Source
Assembler
C Libraries ASM Source
.aof
Object Libraries
.aif debug
ARMsd
Developmentboard
ARMulator
System model
C Compiler
Linker
35
Application andGraphic User
Interface
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/
37
Qtopia
38
Ap.
OperaOperaACCESSACCESSNetFrontNetFront MIDPMIDP
39
GPE
40
Opie screenshots
41
Microwindows
MP3 Player Games
42
MiniGUI
Browser
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
44
Development Tools
45
開發工具 ARM SDT ( ARM Software Development Kit )是 ARM 公司
為方便使用者在 ARM 晶片上進行應用程式的開發而推出的一整套整合開發工具
目前的最高版本為 SDT2.5.2 從 SDT2.5.1 開始, ARM 公司宣佈推出一套新的整合開發
工具 ARM ADS1.0 ,取代 ARM SDT SDT 與 ADS 保持了良好的相容性
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 作業系統的執行。
47
開發工具
48
THE END
Thanks you.