You are on page 1of 18

Introduction to PCM7230

Introduction to PCM7230
Introduction to PCM7230
• Processor
– Intel® Xscale® PXA255 RISC CPU
– 32-bit, up to 400MHz speed SoC engine
– ARM v.5TE instruction set architecture
• Peripherals
– 32MB Flash ROM, 64MB SDRAM
– CF/PCMCIA slots
– VGA, Audio In/Out
– RS232, USB, Ethernet interface
Introduction to GP 1.0
• BrainStem controller.
• 40 MHz RISC processor
• RS-232 serial port
Introduction to GP 1.0
• This sensor reports the distance as a byte-value
corresponding to the distance between 10cm to 80cm
Introduction to boot-loader
and embedded Linux
The role of boot-loader
• When the machine is on, boot-loader is
the first program being executed by
processor
• Boot-loader has the following functions
– Initialize the hardware setting
– Pass the control to OS
• To simplify the development process, the
function of boot-loader is sometimes
extended
Initialization
• Bootloader does some settings for devices
– I/O
– Setting of hardware, ex: RAM size, ROM size,
external peripheral
• Bootloader also sets up an environment fo
r OS
– Memory mapping
– Stack pointer
• Pass these information to OS kernel
Memory Mapping (Net-Start)
Embedded Linux
• What components are in our embedded Li
nux?
– Linux kernel
– Root file system
• /bin, /usr, /dev, /etc.........
• We can port our Linux kernel and root file
system to the Flash ROM so that they can
be permanently stored on the board
Homework
• Replace boot-loader on the board
• Put Linux kernel image and root file
system to Flash ROM
Replace boot-loader
• Connect your PC parallel port and PCM-7230 JTAG with JTAG cable
• Turn on PCM7230
• Under your Windows, copy bootldr in the same folder with Jen255.exe
• Run “LOADDRV.exe "
• Run "Jen255.exe “

JFLASH Version 2.10.000 - DBPXA250


OS Version 0x2
Parallel Com port found at I/O address: 378
PXA250 revision 0x6??
CPU_TYPE = 0x255
FLASH ROM: AMD Am29LV800BB 1MBytes
enter binary file name: bootldr
...

Now, the boot-loader on the board is replaced by iBoot


JTAG connection
• The brown-color line is at the right-most side

black brown
Put Linux kernel and rootfs
• Connect your PC COM 1 and PCM7230 COM 1
• Use terminal program to access target board
– Windows (hyper-terminal), Linux (minicom)
• Setup serial port mode
– Baud-rate: 115200, hardware flow-control: No
• Turn on PCM-7230 and follow below instructions

// put kernel image


iBoot> download xmodem 0xa0000000
Press Control-S, xmodem and select kernel image zImage
iBoot> flash 0x40c0000 0xa0000000 0x100000

// put root file system


iBoot> download xmodem 0xa0000000
press Control-S, xmodem and select rootfs ramdisk.gz
iBoot> flash 0x41c0000 0xa0000000 0x1000000
Finish
• Connect PCM-7230 with serial port
– COM 1: enter boot-loader mode
– COM 2: enter Linux
• Log in Linux system
– username / password: root / rootme
• You can try software in the embedded Linu
x system
– Ifconfig, iwconfig, SSH server……
Cross-Compiler
• Why do we need the cross-compiler
– The platforms of target board and host PC are not the same
– Compile binary that can be run under target platform
• ARM toolchain
– Toolchain package - cross-2.95.3.tar.bz2
• arm-linux-gcc, arm-linux-ld, arm-linux-objdump…
– Setup your environment

# tar –jxvf cross-2.95.3.tar.bz2 // extract package


# mkdir /usr/loca/arm // create directory arm
# mv 2.95.3 /usr/loca/arm // move 2.95.3 under arm
# export PATH=/usr/local/arm/2.95.3/bin:$PATH // set path
Run a simple program
• Write a helloworld.c program
# arm-linux-gcc helloworld.c // binay a.out is generated
• Put the binary to your target board
– Network
• Configure IP address of your target board
• Start ssh server - # /etc/init.d/ssh start
• Use scp utility to copy binary to the board
– Serial port
// Connect to target board using minicom
# rz // RS232 receive using zmodem
Press Control-S, zmodem and select binary a.out
# chmod a+x a.out // change mode to executable
# ./a.out // execute
Homework
• Assemble your PPRK
• Connect PPRK serial port and PCM-7230 COM 1
• Install PPRK development package
# tar -zxvf brainstem.tar.gz
• Follow steps in the readme.txt
// under PC host
# make CC=arm-linux-gcc CCP=arm-linux-g++ ARCH=ARM
# make ARCH=ARM tarball // generate dist_ARM.tar

// Put dist_ARM.tar to your target board


// under PCM-7230
# rz // minicom: control-S, zmodem, dist_ARM.tar
# tar –xf dist_ARM.tar
# cd usr/local/acroname/brainstem/aBinary
# sh run aStub

You might also like