1 / 43

嵌入式 Linux 系統介紹

嵌入式 Linux 系統介紹. 實習規範. 目的 規格 關聯 背景需求 設備需求. 目的. 瞭解嵌入式 Linux 系統架構和一個完整的開發環境包含了拿些應用工具,並針對除錯、編譯等 … 開發環境一一說明。. 技術背景 - 設備需求. 技術背景需求 具 C 語言程式設計基礎 設備需求 H/W requirements : PC Host , COM port ,網路 Hub , Creator XCsale-PXA270 Development Kit S/W requirements :

nirav
Download Presentation

嵌入式 Linux 系統介紹

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 嵌入式Linux系統介紹

  2. 實習規範 目的 規格 關聯 背景需求 設備需求

  3. 目的 • 瞭解嵌入式Linux系統架構和一個完整的開發環境包含了拿些應用工具,並針對除錯、編譯等…開發環境一一說明。

  4. 技術背景-設備需求 • 技術背景需求 • 具 C 語言程式設計基礎 • 設備需求 • H/W requirements : • PC Host,COM port,網路Hub, • Creator XCsale-PXA270 Development Kit • S/W requirements : • Linux for Creator XScale-PXA270 user guide:檔案在Linux for Creator XScale-PXA270光碟中Linux\Doc路徑下。 • Create-XScale-PXA270 User’s Guide。 • 通訊軟體:例如Windows的超級終端機

  5. 實習系統概論 簡介 系統架構 電路架構 程式流程

  6. 簡介 本章實習的主要內容,在於說明何謂Embedded Linux系統、架構及其開發環境,所以將針對下列幾點加以說明: • 說明嵌入式系統為何,及Embedded Linux系統的優缺點和應用範圍。 • 說明Embedded Linux系統架構。 • 說明CreateXScale-PXA270嵌入式系統發展工具解決方案,包含如下三個部分: • Windows Host端—除錯環境 • Linux Host端—編譯環境 • Linux Target端—Target Board

  7. Window Host Ethernet CodeLyzer Print port Domingo ICE / JTAG TFTP Server Linux Host Linux target TFTP Client Samba Server mtdd/gdbserver Linux Kernel Source Flash: Linux kernel RootFS NFS Server port / mount 系統架構

  8. 電路架構

  9. 基礎知識 嵌入式系統導覽 Embedded Linux架構 完整的嵌入式系統發展工具解決方案 Windows Host端─除錯環境介紹 Linux Host端─編譯環境介紹 Linux Target端─Target Board介紹 Linux Target端和Windows Host端接線說明

  10. 嵌入式系統導覽 • 常見的嵌入式作業系統 • MS-DOS • Windows CE • Palm OS • EPOC • Symbain OS • 即時嵌入式系統 • Embedded Linux • 常見的嵌入式硬體 • X86架構 • ARM架構 • MIPS架構 • PowerPC架構 • 其他:m68k、8051..等等

  11. 嵌入式系統導覽(cont.) • 嵌入式Linux的應用範圍 • PDA • Web PDA • Set-Top-Box • Cell phones and web phones • 各樣網路相關Box • Embedded Linux的優點 • 開放原始碼,模組化設計 • 高度穩定性 • 強化的網路功能 • 可以跨越各種硬體平台 • 應用軟體眾多

  12. Embedded Linux架構

  13. Linux Kernel architecture • Architecture of a generic Linux system Ref. [3]

  14. 完整的嵌入式系統發展工具解決方案 • 一個完整的嵌入式系統發展工具解決方案包含,如下: • 線路實體模擬器(In-Circuit Emulator,ICE)、 • 系統發展板(Evaluation Board)、 • 應用程式整合開發除錯工具(Debugger) • 編譯器(Compiler) • Creator-XScale-PXA270嵌入式系統 • 開發環境的稱謂

  15. Window Host Ethernet CodeLyzer Print port Domingo ICE / JTAG TFTP Server Linux Host Linux target TFTP Client Samba Server mtdd/gdbserver Linux Kernel Source Flash: Linux kernel RootFS NFS Server port / mount 完整的嵌入式系統發展工具解決方案(cont.) • Creator-XScale-PXA270嵌入式系統架構圖 • Linux Host端為獨立PC模式

  16. Ethernet CodeLyzer Printport Domingo ICE/JTAG TFTP Server Virtual Machine Linux Host Linux target TFTP Client Samba Server mtdd/gdbserver Linux Kernel Source Flash: Linux kernel RootFS NFS Server port/mount 完整的嵌入式系統發展工具解決方案(cont.) • Linux Host端為Virtual Machine模式

  17. 完整的嵌入式系統發展工具解決方案(cont.) • Linux Host端:提供編譯環境 • Linux Host端:扮演開發系統中的編譯環境部分,因為是用GNU的compiler所以需要安裝Linux作業系統,。 • 目的是用來製作和編譯要放在Linux Target端的Boot loader、Embedded Linux Kernel、root filesystem等…image檔。 • Samba Server:建立Linux Host端Samba Server分享目錄的網路磁碟機。以達到Linux Host端和Windows Host端的檔案資源共享。 • NFS Server:Linux Target端掛載Linux Host端NFS server分享的檔案系統。以達到Linux Host端和Linux Target端的檔案資源共享。

  18. 完整的嵌入式系統發展工具解決方案(cont.) • Windows Host端:提供除錯環境 • Window Host端:扮演開發系統中的除錯環境部分,所以安裝Domingo for Linux及CodeLyzer這兩個除錯軟體。 • Domingo for Linux:提供Embedded Linux Kernel及Device Driver的除錯。 • CodeLyzer:提供Embedded Linux User Application的除錯。 • Virtual Machine:利用Virtual PC或VMware軟體,建立一個虛擬空間並安裝Linux Host端的作業系統 • Linux Target端: • 提供EmbeddedCreator-XScale-PXA27 Target Board,新華電腦所提供的Creator開發學習版。

  19. Windows Host端─除錯環境介紹 • Embedded Linux核心除錯工具 • 列印訊息法(printk) • 訊息記錄(klogd/syslogd) • 查詢除錯法(proc) • Domingo for Linux • Embedded Linux應用程式除錯工具 • 列印訊息法(printf) • 記憶體配置除錯(memwatch/YAMD) • 系統呼叫追蹤(strace) • GDB/Insight • CodeLyzer

  20. Windows Host端─除錯環境介紹(cont.) • Domingo for Linux 一套整合開發、驗證、燒錄及除錯的整合開發除錯軟體,其主要的功能說明如下: • 整合操作視窗 • 提供使用ICE硬體資源時的設定管道 • CPU資源之觀察及修改 • 待發展程式之觀察,修改及執行 • 組合語言及高階語言除錯 • Nor/Nand Flash燒錄功能 • 在Embedded Linux系統中,提供針對Linux Kernel及Device Driver的除錯

  21. Windows Host端—除錯環境介紹 (cont.) • 除錯軟體—Domingo for Linux介面介紹

  22. Windows Host端─除錯環境介紹(cont.) • CodeLyzer 一套針對Embedded Linux中User application的除錯軟體,其主要的功能說明如下: • 提供視窗化的整合除錯資訊 • 在Embedded Linux系統中,提供針對user application的除錯 • 提供multi-process的除錯模式 • 提供multi-thread的除錯模式 • 提供變數、中斷點、記憶體、程式等…除錯視窗

  23. Windows Host端—除錯環境介紹 (cont.) • 除錯軟體—CodeLyzer介面介紹

  24. Linux Host端─編譯環境介紹 • 安裝Linux作業系統 • 獨立的PC安裝Linux作業系統 • 在Windows Host上安裝Linux作業系統 • Embedded Linux Kernel Image的編譯和驗證 • 安裝Tool Chain—GCC(GNU Cross Compiler Tool Chain) • Embedded Linux Kernel程式碼版本

  25. Linux Host端—編譯環境介紹 (2) • Virtual PC • VMware

  26. Linux Host端─編譯環境介紹(cont.) • 編譯Kernel Image • Make menuconfig • Make mrproper • make dep • make clean • make zImage • make modules • make modules_install • make install • 驗證Kernel Image

  27. Linux Host端─編譯環境介紹(cont.) • Bootloader—開機引導程式 • 啟動載入(Boot Loading)模式 • 下載模式(Downloading)模式 • Linux Target端的根目錄檔案系統 • 最起碼的目錄:/dev,/proc,/bin,/etc,/lib,/usr,/tmp。 • 基本的工具程式:sh,ls,cp,mv,etc.。 • 最起碼的組態設定檔:rc,inittab,fstab,etc.。 • 設備檔:/dev/hd*,/dev/tty*,/dev/fd0,etc.。 • Runtime函式庫以提供工具程式所使用之基本功能(functions)。

  28. Linux Host端─編譯環境介紹(cont.) • Samba Server • Network File System的縮寫,意思是“網路檔案系統”,最主要功能,在於提供各種不同硬體架構,不限任何作業系統的電腦,可以透過網路,達到分享彼此檔案的目的 • 我們將利用Linux Host端的這項功能,使得Linux Target端(CreatorXScale-PXA270)可以方便取得製作Linux Host端完成的程式碼,進行測試。

  29. Linux Host端─編譯環境介紹(cont.) • NFS Server • 是延伸自SMB(Server Message Block)的代名詞,其主要功能,在於提供Linux Host端的目錄與Windows Host端進行檔案資料共享。Windows Host端建立一個網路磁碟機對映到Samba Server所分享的目錄。 • 所以Domingo for Linux便可藉由這個網路磁碟機直接取得Linux Host端編譯完成的Kernel image檔。

  30. Linux Target端─Target Board介紹 • Creator嵌入式發展系統母板

  31. Linux Target端─Target Board介紹(cont.) • Creator母版Master和Slave bus的支援

  32. Linux Target端─Target Board介紹(cont.) • Creator-XScale-PXA270嵌入式系統Flash的配置

  33. Carrier ICE Debugger ARM POD External Trigger connector PC Host Current Measurement Module Speaker Creator Microphone CMOS sensor Linux Target端和Windows Host端接線說明 • Windows Host端和Carrier ICE、Target Board的接線圖

  34. To PC Current Measurement Module Pocket ARM ICE Compact Flash Card Speaker Creator Microphone CMOS sensor Power Linux Target端和Windows Host端接線說明(cont.) • Windows Host端和Pocket ARM ICE、Target Board的接線圖

  35. Linux Target端和Windows Host端接線說明

  36. 實習步驟 系統軟硬體設置 實習一:Virtual PC安裝實作說明 實習二: Fedora Core 5.0安裝實作說明

  37. 系統設置 • 系統軟硬體的設置 • 建立Windows Host端、 Linux Host端、 Linux Target端三者之間的硬體環境連結。 • 建立Linux Host端的編譯環境。 • 實作程式碼設置

  38. 實習一:Virtual PC安裝實作說明 • 安裝Virtual PC • 建立New Virtual Machine • Virtual Machine的相關設定 • Virtual Disk

  39. 實習二: Fedora Core 5.0安裝實作說明(1) • 安裝前的建議 Virtual PC在安裝Virtual Machine時,支援’安裝光碟’及’ISO檔’兩種安裝模式,雖然兩種模式都能順利安裝Fedora Core 5.0,但是建議利用’ISO檔’的安裝模式,以減少安裝的時間。

  40. 安裝Fedora Core 5.0 Firewall跟SELinux要設定為Disabled Display的設定: Color Depth設定為”Thousands of Colors” 實習二: Fedora Core 5.0安裝實作說明(2)

  41. 實作開始 操作時間 : 20 min

  42. 習作及參考資料 • 習作Exe_1 • 參考資料 [1] Intel PXA270 Processor Family Developer's Manual [2] RM-033-04-100 : Introduction to Creator XScale-PXA270 [3] RM-033-04-101 : Creator PXA270 experiment environment overview [4] Creator PreSOCes Development Kit User's Guide

  43. Q & A

More Related