1 / 96

嵌入式系統 Embedded System

嵌入式系統 Embedded System. 楊昌益. Embedded Linux 的系統建置. 需要 Red Hat Linux 9 PC 已有 Windows XP 作業系統 先安裝 VMware 再從 VMware Workstation 中安裝 Linux 9. 安裝 Toolchain 及 Linux 套件 #cd /usr/local #mkdir arm 放入 CD “Linux for Creator-S3C2410” Copy CD 之 source/cross-2.95.3.tar.bz2 至 /usr/local/arm

hharvey
Download Presentation

嵌入式系統 Embedded System

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. 嵌入式系統Embedded System 楊昌益

  2. Embedded Linux的系統建置 • 需要Red Hat Linux 9 • PC已有Windows XP作業系統 • 先安裝VMware • 再從VMware Workstation中安裝Linux 9

  3. 安裝Toolchain及Linux套件 • #cd /usr/local • #mkdir arm • 放入CD “Linux for Creator-S3C2410” • Copy CD之source/cross-2.95.3.tar.bz2至/usr/local/arm • #cd /usr/local/arm • #bzip2 –dc cross-2.95.2.tar.bz2 | tar xf – • Modify /etc/bashrc

  4. Close terminal • Open another terminal • #env (to check the PATH) • 主選單→系統設定→新增移除應用程式 • 程式開發→核心開發+X軟體開發

  5. 安裝Linux Kernel • #cd /usr/src • #mkdir creator • #cd creator • #mkdir nfs • #cd nfs • #mkdir s3c2410 • #cd /usr/src/creator • #mkdir s3c2410

  6. Copy linux-2.4.18.tar.gz、patch-2.4.18-rmk7.gz、patch-2.4.18-rmk7-sw18、patch2.4.18-creator2410.tar.gz from CD “Linux for Creator-S3C2410” to /usr/src/creator/s3c2410 • #cd /usr/src/creator/s3c2410 • #tar –zxvf linux-2.4.18.tar.gz • #gzip –dc patch-2.4.18-rmk7 | (cd linux; patch –p1) • #gzip –dc patch-2.4.18-rmk7-sw18 | (cd linux; patch –p1) • #tar –zxvf patch-2.4.18-creator2410.tar.gz

  7. Compile Linux Kernel Image • #cd /usr/src/creator/s3c2410/linux • #make mrproper • #make menuconfig

  8. 選擇Load an Alternate Configuration

  9. 輸入”arch/arm/def-configs/create-2410-ramdisk”→<OK>→<Exit>→<Yes>輸入”arch/arm/def-configs/create-2410-ramdisk”→<OK>→<Exit>→<Yes> • #make dep • #make clean • #make zImage • #cd /usr/src/creator/nfs/s3c2410 • #cp /usr/src/creator/s3c2410/linux/arch/arm/boot/zImage zImage_ram • #cp /image/ex2_2418_Creator2410 from CD “Linux for Creator-S3C2410” to /usr/src/creator/nfs/s3c2410

  10. Samba Server安裝 • Linux PC ↔Windows PC(讀取檔案) • Linux PC安裝Samba • 主選單→系統設定→新增移除應用程式 • 伺服器→伺服器設定工具→詳細資料

  11. 系統→系統工具→詳細資料

  12. #mkdir –p /usr/src/creator/nfs/s3c2410 • 主選單→系統設定→伺服器設定→服務

  13. Modify /etc/samba/smb.conf 1. [global] workgroup = PC電腦名稱 security = share 2. [tmp]和下面四行被mark掉的,將它打開 3. 加入 [Creator] copy = tmp path = /usr/src/creator

  14. 主選單→系統設定→伺服器設定→服務 • smb→停止→重新啟動 • #netconfig • 設定IP, subnet mask, gateway • #service network restart

  15. Download Image • Download to Target’s RAM • J19 pin的1、2腳connect • J3 pin空接 • Connect ICE with PC and Target board • 將Linux Host端之Hard disk變成Windows Host端之網路磁碟機 • Double click “Domingo for Linux” in Windows • Open Project→New Project→OK

  16. Click “Config PCM” →Import→Select ”creator_s3c2410.pcm”to open→OK→[Input New Project Name] dialog, Please input project name: s3c2410→OK • Config→OS Support→Linux(2410) • Debug→Connect • Debug→LoadModule→Select “zImage_ram” to open

  17. Debug→LoadModule→Select “ex2_2418_Creator2410” to open

  18. Modify pc to 0x32000000 • Windows Host端,open ASCII Terminal (set the baud rate to 115200, N, 8, 1 and No flow control) • Back to Domingo fo linux and press “go”

  19. Download to Target’s NAND Flash • Modify head-s3c2410.s in /usr/src/creator/s3c2410/linux/arch/arm/boot/compressed

  20. #cd /usr/src/creator/s3c2410/linux • #make zImage • #cd /usr/src/creator/nfs/s3c2410 • #cp /usr/src/creator/s3c2410/linux/arch/arm/boot/zImage zImage_nand • 將Linux Host端之Hard disk變成Windows Host端之網路磁碟機 • Double click “Domingo for Linux” in Windows • Open Project→New project→OK

  21. OK→ Please input project name: s3c2410_nand→OK • Config→OS Support→Linux(2410) • Debug→Connect • Config→Program Flash

  22. Config→Program Flash

  23. 關掉Target board電源,拔掉ICE • J19 pin的2、3腳connect • J3 pin短路 • 開啟Target board電源,從Windows的ASCII Terminal看結果

  24. Target Board

  25. Mother board: • 2M byte Flash memort • 16M SDRAM • 4x4 keyboard • 128x128 LCD • USB device port (1.1) • UARTx2 • CODEC • CF card socket • CMOS Camera • JTAG connector

  26. Master daughter board: • Samsung S3C4510 • Samsung S3C2410 + touch panel • ARM922T-EPXAI • Slave daughter board: • TI DSP5502 • FPGA XC2S • FPGA EPIC6 • Bluebooth

  27. S3C2410 • Features: • 1.8V for Core • 1.8V/2.5V/3.3V for Memory • 3.3V for I/O • 16KB for I-cache, 16KB for D-cache • External memory controller • LCD controller with 1-ch LCD-dedicated DMA • 4-ch DMAs with external request pins • 30ch UART /2-ch SPI

  28. 1-ch mulit-master IIC-bus/1-ch IIS-bus controller • SD interface (1.0)/MMC protocol (2.11) • 2-port USB host/1-port USB device • 4-ch PWM timer/1-ch internal timer • Watch dog timer • 117-bit GPIO/24-ch external interrupt source • Power control

  29. 8-ch 10-bit ADC and Touch screen interface • RTC • On-chip clock generator with PLL

  30. Memory controller

  31. Special registers

  32. Creator的模組與應用程式 • Creator-S3C2410支援的模組 • Serial (ˇ) • Ethernet (ˇ) • LED (ˇ) • DIP (ˇ) • 7-segment LED (ˇ) • Key PAD (ˇ) • LCD (ˇ) • CCM (ˇ) • CODEC (ˇ) • CF • RTC • USB

  33. 先將書本所附之CD中的程式copy到Linux PC端的/usr/src/creator/s3c2410 (假設在driver目錄下) • #cp –dfpR driver/* /usr/src/creator/s3c2410 • #cd /usr/src/creator/s3c2410/linux • #make menuconfig • Loadable module support→ Enable loadable module support→ type “y”to select →<Exit> • Character devices →Creator-s3c2410 LCD support →type “m” →Creator-s3c2410 CODEC support →type “m” →<Exit> →<Exit> →Select <Yes>

  34. Modify Config.in in usr/src/creator/s3c2410/linux/drivers/char

  35. Modify Makefile in /usr/src/creator/s3c2410/linux/drivers/char

  36. #make dep • #make clean • #make zImage • #make modules • #make modules_install • #cd ../user/creator-s3c2410-demo • #make

  37. #cd /usr/src/creator/nfs/s3c2410 • #cp /usr/src/creator/s3c2410/linux/arch/arm/boot/zImage zImage_ram • #cp /usr/src/creator/s3c2410/lib/modules/2.4.18-rmk7-sw18/kernel/drivers/char/creator-s3c2410-lcd.o . • 同動作,copy creator-s3c2410-cmos.o creator-s3c2410-codec.o 到此目錄 • #cp /usr/src/creator/s3c2410/usr/creator-s3c2410-demo/demo-creator-s3c2410 .

More Related