COMPUTER SYSTEM
LABORATORYLab2 - Environment Setup II
/ 202Lab 2
Experimental Goal•Learn how to use the software installed in Lab1.
• Transfer files to bootloader (U-Boot) and Linux on PXA270.• Copy (burn) files to flash on PXA270.
2013/9/24
/ 203Lab 2
Environment• Host System
• Windows XP
• Build System• VirtualBox + Ubuntu 8.04
• Target System• Creator XScale PXA270
• Software• Bootloader (U-Boot)• Putty• TFTP Server• Domingo
• You can download all software from RSWiki CSL Course Software2013/9/24
/ 204Lab 2
Hardware Checklist
2013/9/24
ICE
ethernet cable RS232 null cablePXA270
CMOS sensor
power supply (PXA270)
power supply (ICE)JTAG
parallel cable
/ 205Lab 2
Target Board
2013/9/24
CreatorPreSOCes
Creator XSCale PXA270
/ 206Lab 2
Hardware Setup•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, or connect it then reset the PC.
•Connect ethernet cable to your PC.•Connect PXA270 and ICE via JTAG.
2013/9/24
parallel cable
ethernet cableRS232
ICE
/ 207Lab 2
Introduction to Domingo•Domingo is an integrated development environment 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.
2013/9/24
/ 208Lab 2
Connect to PXA270 via Domingo•Step1: please refer to Lab1 to create a PXA270 project.•Step2: click “Debug” “Connect” or “connect the IDE to WINICE” to connect PXA270.
•Now, you can see related register value and instructions.
2013/9/24
/ 209Lab 2
Memory Layout of PXA270
2013/9/24
0x000000000x00080000
0x00480000
0x01380000
0x02000000
U-BootLinux kernel
Root Filesystem
Flash
0xa0000000
0xa1080000
0xa3f80000
0xa4000000
U-Boot (TFTP)
RAM
U-Boot (Domingo)
/ 2010Lab 2
Download Executable to PXA270 (1/3)•Step1: download u-boot.bin from our course website.•Step2: click “Debug” “Load Module ...” in Domingo.•Step3: load u-boot.bin and configure “Option” to P;a3f80000.
•Step4: Click “Ok”.
2013/9/24
/ 2011Lab 2
Download Executable to PXA270 (2/3)•Step5: connect to the serial console on PXA270 via putty.
• Execute the putty.
•Step6: configure com port and speed.• Connection Type = Serial• Serial line = COM1• Speed = 9600
•Step7: click “Open”.
2013/9/24
/ 2012Lab 2
Download Executable to PXA270 (3/3)•Step8: change PC value to a3f80000 in register window.•Step9: click “Debug” “Free Go”, and then you will see the message on putty.
2013/9/24
/ 2013Lab 2
Transfer File via TFTP (1/3)•Step1: execute TFTP server.•Step2: put u-boot.bin to the TFTP root virtual folder.
2013/9/24
/ 2014Lab 2
Transfer File via TFTP (2/3)•Step3: set IP address on Windows XP to configure LAN environment.• IP address = 192.168.0.10• Netmask = 255.255.255.0• Note that if you change to LAN IP, you might
be not able to access WAN. Please download necessary software beforeyou change the configuration.
• You can change back to DHCP after usingTFTP to reconnect to WAN.
2013/9/24
/ 2015Lab 2
Transfer File via TFTP (3/3)•Step4: check IP address on PXA270.
• u-boot$ printenv
• Hit any key to stop U-Boot autoboot.• If the addresses are wrong, you can use setenv to change.
•Step5: execute tftp command in U-Boot to get file.• u-boot$ tftp a1080000 u-boot.bin
2013/9/24
size of u-boot.bin
/ 2016Lab 2
Copy File from RAM to Flash (1/3)•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.
•Step1: 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
•Step2: copy the file from RAM to flash.• u-boot$ cp.b a1080000 0 1a6c0
•Step3: now, you can reset PXA270 to check the message of U-Boot.
2013/9/24
/ 2017Lab 2
Copy File from RAM to Flash (2/3)• Please refer to previous slides to copy Linux kernel and root filesystem
to flash.• You can refer to the memory layout as in slide9.
• Step1: download uImage (Linux kernel) and rootfs (root filesystem) from our course website.
• Step2: copy uImage to flash address 0x80000.• The erased end address is 0x47ffff (32 sectors).• It will take about 3 minutes.
• Step3: copy rootfs to flash address 0x480000.• The erased end address is 0x137ffff (120 sectors).• To avoid address collision, you can change RAM address to 0xa1480000 for TFTP.• It will take about 3 minutes.
2013/9/24
/ 2018Lab 2
Copy File from RAM to Flash (3/3)•Step4: now, you can reset PXA270 to check the message of Linux.
2013/9/24
/ 2019Lab 2
Transfer File via TFTP in Linux•Step1: in Linux, we also can transfer files via TFTP.
• You can read the usage by executing tftp command without any arguments.
•Step2: for example, if you want to get u-boot.bin from TFTP server 192.168.0.10, just type:• % tftp -g -r u-boot.bin 192.168.0.10
2013/9/24
/ 2020Lab 2
Lab Requirement & Bonus•Show that you can copy files to the flash both in U-Boot and in Linux.
•Bonus:Answer the question of lab2 on RSWiki CSL course website.Write it in your report.
•Please send your report to both TAs.• Please use this title format: [CSL] G# Lab# Ver#• E.g., [CSL] G15 Lab2 Ver1
2013/9/24