23
Board Support Package Mini Project – PCM- 7230 TA: Shun-Lee Chang ( 張張張 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page report: 4/14 (Tue) 15: 00 ~ 18:00 TA Office: EECS ( 張張張張 ) 701 E-mail: [email protected] Contact: #54850 / 0919-972660

Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

Embed Size (px)

Citation preview

Page 1: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

Board Support PackageMini Project – PCM-7230

TA: Shun-Lee Chang (張舜理 )

Important Dates:Borrowing PCM-7230: TODAY 15:00 ~ 18:00Demo and your 2-page report: 4/14 (Tue) 15:00 ~ 18:00

TA Office: EECS (電資大樓 ) 701 E-mail: [email protected]: #54850 / 0919-972660

Page 2: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

2

Project Goals

• Learn how to assemble the PCM-7230 evaluation kit

• Learn how to install the boot loader

• Learn how to compile/install an embedded system

Page 3: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

3

Development Prerequisite

• OS– Windows XP

• Does Windows Vista work?

– Linux 2.6• The project was verified on Fedora 10• The OS run upon VMWare shall be ok

• Hardware– Parallel port– COM port– D-sub (VGA)– USB slot

Page 4: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

4

2 Boxes• PCM-7230 evaluation kit:• 1 x PCM-7230 board• 1 x CN8 cable (VGA)• 1 x RST switch• 1 x JTAG cable• 1 x CN9-33 cable (COM1)• 1 x Power switch cable (can be replaced by a jumper)• 1 x Power-in cable• 4 x Short rods• 4 x Long rods• 1 x CN9-47 cable (USB, optional)• 1 x CN9-1 cable (Ethernet, optional) • Other:• 1 x Card reader• 1 x 512MB CF card• 1 x Power supply• 1 x Power line

Please return everything you get, including the boxes, in the end of this semester

Page 5: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

5

Assemble PCM-7230 KitJTAGTo Parallel

To VGA

reset

Power inPower switch(jumper)To COM1

USB

CF card slot

rods

Page 6: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

6

White alignment lineWhite notation

Page 7: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

7

The power switch cable is very fragile• If broken

– Solder it yourself– Use a jumper

• You must returned me the cable even it is broken

Page 8: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

8

Direction One PIN leftJTAG

Page 9: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

9

Page 10: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

10

Files

• giveio.zip: JTAG driver• Jen255.exe: JFlash, an application for writing bootloader

into flash• bootldr: (default) ARM Linux bootloader

• kernel: (default) ARM Linux kernel image• ramdisk.gz: ARM Linux ramdisk

• arm_linux_gcc.tar.gz: Cross compiler• linux.tgz: ARM Linux kernel source code• i-boot-lite.tgz: bootloader source code

Page 11: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

11

Install Boot Loader• Steps – install JTAG driver

– Connect PCM-7230 and PC with the parallel port (JTAG cable)– Unzip giveio.zip, and read readme.txt if any trouble happens– Execute “LOADDRV.EXE”

• Fill the LoadDrv window with full path, including GIVEIO.SYS

Page 12: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

12

Install Boot Loader• Steps – install boot loader

– Power on PCM-7230– Run “cmd” In the cmd window,

• Switch to the directory where giveio.cmd resides

• Execute “giveio”

• Switch to the directory where jen255.exe is

• Run “jen255.exe” to install a boot loader

Page 13: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

13

Before Booting PCM-7230

• Configure 超級終端機

Page 14: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

14

Booting• Copy the following files to CF card

– kernel – ramdisk.gz

• Attach CF card with PCM-7230 • Connect PCM-7230 and PC with the RS-232 (COM1)• Run 超級終端機• Power on PCM-7230

– If everything is okay, you will see…– If you want to see 小企鵝 ,

you need connect your PC and 7630 with the D-sub cable

Default account/password is root/rootme

Page 15: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

15

Before Customization

• Install toolchain (on Linux 2.6)• login as root• mkdir /usr/local/arm• cd /usr/local/arm• tar xvfz somewhere/arm_linux_gcc.tar.gz• export PATH=/usr/local/arm/2.95.3/bin:$PATH

– Verify the correctness of your installation by executing

• arm-linux-gcc -v

The directory contains arm_linux_gcc.tar.gz

Unfortunately, the toolchain can be only installed here

Page 16: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

16

Build Boot Loader

• 需要 /usr/share/automake,以 Fedora 10為例– 安裝 automake (使用 yum)– ln –s /usr/share/automake-1.7 /usr/share/automake

• 解壓縮 boot loader原始碼,並編譯 boot loader– tar zxvf i-boot-lite.tgz– cd i-boot-lite

• make• i-boot-lite/i-boot-cerf-board-pxa250_1.7-lite.img為你的 boo

t loader,請安裝到 PCM-7230

• 修改 boot loader: check src/main

Page 17: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

17

Demo 評分項目• 1. 修改 Boot loader的歡迎畫面,至少能顯示你的學號

Page 18: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

18

Build Kernel

• Steps – tar zxf linux.tgz– cd linux/kernel– Run “make clean” and “make dep” to maintain the sou

rce (you only need to do it once)– Run “make menuconfig” to choose what driver you wa

nt (you can use default and skip this step)– Run “make zImage” to build your kernel– If everything is okay, the file “./arch/arm/boot/zImage”

is your new kernel image (don’t forget to rename it to “kernel”)

Page 19: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

19

Customize ramdisk

• Steps– gzip -d ramdisk.gz – mkdir /mnt/ramdisk– mount -o loop -t ext2 ramdisk /mnt/ramdisk– 撰寫應用程式 app.c,程式執行時顯示你的學號。– 編譯 app.c

• arm-linux-gcc app.c -o app• cp app /mnt/ramdisk/bin

– umount /mnt/ramdisk– cat ramdisk | gzip -v9 > ramdisk.gz

將 ramdisk掛載至 /mnt/ramdisk目錄下

ramdisk以含有 app這隻程式

Your ramdisk

Page 20: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

20

Demo 評分項目• 2. 能在 pcm-7230 上執行 app• 3. 修改某個檔案,使得開機後,可以用超級終端機藉由

COM1控制 pcm-7230– Hint: google inittab ttyS0

Page 21: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

21

Demo Environment/Plan

• You MUST take your PCM-7230– Customized boot loader must be already installed– Customized kernel/ramdisk are in the CF card

• Demo1. Show boot loader’s welcome banner2. Execute “app”3. Show how to control the PCM-7230 via COM1

• You can demo on your notebook/PC, or demo on the notebook I provide

• After demo, return me the 7230 kit including the 2 boxes

Page 22: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

22

TA Office: EECS 701

HERE!

701

電梯7F

Page 23: Board Support Package Mini Project – PCM-7230 TA: Shun-Lee Chang ( 張舜理 ) Important Dates: Borrowing PCM-7230: TODAY 15:00 ~ 18:00 Demo and your 2-page

23

Term Project

• Modify driver or boot loader to enhance its functions or performance