Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Environment Setup 2015/9/15/ 30 1.

Similar presentations


Presentation on theme: "Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Environment Setup 2015/9/15/ 30 1."— Presentation transcript:

1 Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Environment Setup 2015/9/15/ 30 1

2 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Install build system and setup network configuration.  Learn how to copy (burn) files to flash on Creator XScale PXA270. 2015/9/15/ 30 2 Local network

3 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Host System  Windows XP  Build System  VirtualBox + Ubuntu 8.04  Target System  Creator XScale PXA270  Software  VirtualBox  Ubuntu 8.04  Domingo  Bootloader (U-Boot)  Microtime diag program  You can find all software on CSL Course Software.CSL Course Software 2015/9/15/ 30 3

4 Lab 1 Department of Computer Science and Information Engineering National Taiwan University 2015/9/15/ 30 4 ICE Ethernet cableRS232 null cablePXA270 power supply (PXA270) power supply (ICE) JTAG parallel cable

5 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Connect RS232 null cable and parallel cable to your PC.  You should connect ICE to your PC with parallel cable before turning on the PC.  Connect Ethernet cable to your PC.  Connect PXA270 and ICE via JTAG. 2015/9/15/ 30 5 parallel cable Ethernet cable RS232

6 Lab 1 Department of Computer Science and Information Engineering National Taiwan University 2015/9/15/ 30 6 Host System (Windows XP)Target System (Creator XScale PXA270) VirtualBox Build System (Ubuntu 8.04) Domingo download TFTP serverTFTP client 192.168.0.10 192.168.0.101 192.168.0.100 debug ICE and JTAG Samba server Network Neighborhood file sharing CPU, RAM

7 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Please download “VirtualBox” from https://www.virtualbox.org/ or course website.https://www.virtualbox.org/  Install VirtualBox.  Using default settings is fine.  Note that the network will be disconnected temporarily during the installation.  The related networking drivers should be installed. 2015/9/15/ 30 7

8 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: click “ 新增 (N)” in “Oracle VM VirtualBox 管理員 ”.  Step 2: create a Linux Ubuntu (32 bit) virtual machine (VM).  The size of memory needs at least 512 MB.  The size of disk needs at least 20 GB.  Step 3: add an additional network adapter to the VM.  “ 設定值 (S)”  “ 網路 ”  “ 介面卡 2”  “ 啟用網路卡 (E)”  “ 附加到 (A)” = “ 「僅限主機」介面卡 ” 2015/9/15/ 30 8

9 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 4: download Ubuntu 8.04 from course website.  Step 5: start your virtual machine and choose the Ubuntu image file for booting from CD/DVD.  “ 裝置 ”  “CD/DVD 裝置 ”  “ 選擇虛擬 CD/DVD 磁碟檔案 ”  Step 6: install Ubuntu 8.04.  English version is more stable.  Change time zone to “Asia”  “Taipei”.  When finishing installation, press “ENTER” to reboot.  Please remember the account to login Linux.  Tips:  To uncaptured the keyboard and the mouse from virtual machine to Windows XP, please press the host key, right ctrl key by default. 2015/9/15/ 30 9

10 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: open a terminal in Ubuntu 8.04.  “Applications”  “Accessories”  “Terminal”  You can execute commands with root privilege by typing “ sudo ”.  E.g., % sudo mkdir /etc/test  Step 2: install guest additions in Ubuntu 8.04.  “ 裝置 ”  “ 插入 Guest Additions CD 映像 …”  Execute the script in Ubuntu 8.04.  % sudo /media/cdrom/VBoxLinuxAdditions.run  Step 3: restart Ubuntu 8.04.  % sudo reboot  Tips:  After complete installation of guest additions, you can also share clipboard between Windows XP and Ubuntu.  In VirtualBox:  “ 機器 ”  “ 設定值 ”  “ 一般 ”  “ 進階 ”  Change the setting of “ 共用剪貼簿 ” from “ 停用 ” to “ 雙向 ”. 2015/9/15/ 30 10

11 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: bridge the two network LAN, “VirtualBox Host-Only Network” and “ 區域網路 ” which connects PXA270, together.  Step 2: set IP address of the bridge on Windows XP to configure LAN environment.  IP address = 192.168.0.101  Netmask = 255.255.255.0  Step 3: set IP address on Ubuntu.  % sudo nano /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.0.10 netmask 255.255.255.0  % sudo /etc/init.d/networking restart 2015/9/15/ 30 11

12 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Unfortunately, Ubuntu 8.04 is now out of support and no longer receiving updates and security patches. There are repositories available at http://old-releases.ubuntu.com. http://old-releases.ubuntu.com  Step 1: update apt repositories.  % sudo sed -i -e 's/tw.archive.ubuntu.com\|security.ubuntu.com/old- releases.ubuntu.com/g' /etc/apt/sources.list  Be careful of the area which was set during the installation. If you chose the area other than Taiwan, you have to modify the command to the correct one.  You can type “ man sed ” to see more information.  Step 2: upgrade the sources list.  % sudo apt-get update 2015/9/15/ 30 12

13 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Samba is a free implementation of the SMB/CIFS networking protocol originally developed by Andrew Tridgell.  Through SMB/CIFS protocol, we can share files between Windows XP and Linux by network neighborhood ( 網路芳鄰 ).  Step 1: install samba server in Ubuntu.  % sudo apt-get install samba  Step 2: set the samba password of your user account for samba service.  % sudo smbpasswd 2015/9/15/ 30 13 Reference: Wikipedia - Samba, http://en.wikipedia.org/wiki/Samba_%28software%29http://en.wikipedia.org/wiki/Samba_%28software%29

14 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 3: share your home directory by adding a new entry in /etc/samba/smb.conf. [ ] path = /home/ browseable = yes read only = no create mask = 0664 directory mask = 0755 security = share  Step 4: restart the samba service.  % sudo /etc/init.d/samba restart  Please also set the workgroup in [global] entry to the workgroup of host system (Windows XP), e.g., MSHOME, etc.  You can check the workgroup in Windows XP by right-clicking on “ 我的電腦 ”  “ 內容 ”  “ 電腦名稱 ”. 2015/9/15/ 30 14

15 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: open “ 我的電腦 ”.  Step 2: click “ 工具 ”  “ 連線網路磁碟機 ”  Step 3: input the samba server name.  “ 磁碟機 ” = S:  “ 資料夾 ” = \\192.168.0.10\  Now, you can access files on Ubuntu from Windows. 2015/9/15/ 30 15

16 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: install TFTP server in Ubuntu.  % sudo apt-get install xinetd tftpd tftp  Step 2: create /etc/xinetd.d/tftp and put the following settings.  % sudo nano /etc/xinetd.d/tftp service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = /home/ / disable = no } 2015/9/15/ 30 16

17 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 3: create TFTP Server root directory.  % cd ~  % sudo mkdir  % sudo chmod -R 777  % sudo chown -R nobody  Step 4: restart the xinetd service.  % sudo /etc/init.d/xinetd restart  Step 5: test the TFTP server  % cd ~/  % nano test.txt  Input some texts in this file.  % cd /tmp  % tftp 192.168.0.10  tftp> get test.txt  tftp> quit 2015/9/15/ 30 17

18 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Domingo is an integrated development environment (IDE) developed by Microtime Computer Inc..  Domingo adopts visual project management which integrates with editor, compiler, and debugger. It lets you manage project just from a single environment. 2015/9/15/ 30 18

19 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: download “domingo” from our course website.  Step 2: directly extract this image by WinRAR.  Step 3: click autorun.exe in CD to install.  We will use this to manage ICE. 2015/9/15/ 30 19

20 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: after complete installation, execute “Domingo for Linux 1.3”.  Step 2: choose “New Project”.  Step 3: configure “TargetMachine” and “Processor”.  TargetMachine = Carrier ICE/WINeZ/WIN2K ARM  Processor = PXA270  Step 4: configure “peripheral configuration manager (PCM)”.  Import “creator_pxa270.pcm”.  Click “To Initialize PCM when Connect” and “Ok”. 2015/9/15/ 30 20

21 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: check the hardware connection between PXA270 and ICE.  Be careful to connect parallel cable before turning on the PC.  Step 2: click “Debug”  “Connect” or “connect the IDE to WINICE” to connect PXA270.  Now, you can see related register value and instructions. 2015/9/15/ 30 21

22 Lab 1 Department of Computer Science and Information Engineering National Taiwan University 2015/9/15/ 30 22 0x00000000 0x00040000 0x00080000 0x02000000 U-Boot diag Flash 0xA0000000 0xA1080000 0xA3F80000 0xA4000000 U-Boot (TFTP) RAM U-Boot (Domingo)

23 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: download “putty” from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html or course website. http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html  Step 2: putty can be executed without installation. 2015/9/15/ 30 23

24 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: download “u-boot.bin” from our course website.  Step 2: click “Debug”  “Load Module...” in Domingo.  Step 3: load u-boot.bin and configure “Option” to P;A3F80000.  Step 4: Click “Ok”. 2015/9/15/ 30 24

25 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 5: connect to the serial console on PXA270 via putty.  Please execute the putty which is installed previously.  Step 6: configure com port and speed.  Connection Type = Serial  Serial line = COM1  Speed = 9600  Step 7: click “Open”. 2015/9/15/ 30 25

26 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 8: change PC value to A3F80000 in register window.  Please press enter to commit the change.  Step 9: click “Debug”  “Free Go”, and then you will see the message on putty.  Remember to hit any key to stop U-Boot autoboot. 2015/9/15/ 30 26

27 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Step 1: put u-boot.bin into the folder in Ubuntu.  Step 2: execute “ tftp ” command in U-Boot to get file.  u-boot$ tftp a1080000 u-boot.bin  By default, u-boot will find the TFTP server in 192.168.0.10. 2015/9/15/ 30 27 size of u-boot.bin

28 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Suppose we want to copy (burn) a file with 0x1a6c0 byes from RAM address 0xA1080000 to flash address 0x0, i.e., the u-boot.bin.  Step 1: erase the specified range (0x0 to 0x7FFFF).  Flash should be erased before copying files.  u-boot$ protect off 0 7ffff  u-boot$ erase 0 7ffff  Step 2: copy the file from RAM to flash.  u-boot$ cp.b a1080000 0 1a6c0  Step 3: now, you can reset PXA270 and check the message of U-Boot.  Also, you can remove the JTAG from PXA270 because now you have a U-Boot program on your PXA270 and there is no need to use Domingo.  In case your U-Boot is broken, please use Domingo to copy a new one. 2015/9/15/ 30 28

29 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Microtime provides a program “ diag ” that can help developers diagnose peripheral devices on PXA270, e.g., SDRAM, flash, LED, CCD, LCD, etc. You can diagnose the target board by yourself first if you think it is broken.  Step 1: download diag_ram.bin.  u-boot$ tftp a1080000 diag_ram.bin  Step 2: copy diag_ram.bin to flash address 0x40000 on PXA270.  u-boot$ cp.b a1080000 40000  Step 3: reset PXA270 and then you will see the menu of diag on the LCD. 2015/9/15/ 30 29

30 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  We collect some common commands in Linux and questions in course website.  http://rswiki.csie.org/dokuwiki/courses:103_1:csl_common_ins_errors http://rswiki.csie.org/dokuwiki/courses:103_1:csl_common_ins_errors  If you have any problems, please refer to the document first. 2015/9/15/ 30 30

31 Lab 1 Department of Computer Science and Information Engineering National Taiwan University  Show that you can share some data between Windows and Ubuntu.  Please hand in your lab report to the FTP.  Server: 140.112.90.174  Username: csl2015  Password: csl2015HomeWork  Directory: lab1,2  Please use this format for filename: “G# Ver#”, where G# is your group id and Ver# is revision version number.  E.g., G1 Ver2 2015/9/15/ 30 31


Download ppt "Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Environment Setup 2015/9/15/ 30 1."

Similar presentations


Ads by Google