Phytec phyCORE-PXA270 Programming manual

A product of a PHYTEC Technology Holding company
phyCORE
-PXA270
with UML
QuickStart Instructions
Using the UML Tool Rhapsody from Telelogic and the GNU Cross
Development Tool Chain
Note: The PHYTEC UML-XScale-Disc includes the electronic version of
the English phyCORE
-PXA270 Hardware Manual
Edition: November 2006

phyCORE
-PXA270 QuickStart Instructions
© PHYTEC Meßtechnik GmbH 2006 L-676e_2
In this manual are descriptions for copyrighted products that are not explicitly indicated
as such. The absence of the trademark () and copyright () symbols does not imply
that a product is not protected. Additionally, registered patents and trademarks are
similarly not expressly indicated in this manual.
The information in this document has been carefully checked and is believed to be
entirely reliable. However, PHYTEC Messtechnik GmbH assumes no responsibility for
any inaccuracies. PHYTEC Messtechnik GmbH neither gives any guarantee nor accepts
any liability whatsoever for consequential damages resulting from the use of this manual
or its associated product. PHYTEC Messtechnik GmbH reserves the right to alter the
information contained herein without prior notification and accepts no responsibility for
any damages which might result.
Additionally, PHYTEC Messtechnik GmbH offers no guarantee nor accepts any liability
for damages arising from the improper usage or improper installation of the hardware or
software. PHYTEC Messtechnik GmbH further reserves the right to alter the layout
and/or design of the hardware without prior notification and accepts no liability for
doing so.
Copyright 2006 PHYTEC Messtechnik GmbH, 55129 Mainz, Germany.
Rights - including those of translation, reprint, broadcast, photomechanical or similar
reproduction and storage or processing in computer systems, in whole or in part - are
reserved. No reproduction may occur without the express written consent from
PHYTEC Messtechnik GmbH.
EUROPE NORTH AMERICA
Address: PHYTEC Technologie Holding AG
Robert-Koch-Str. 39
55129 Mainz
GERMANY
PHYTEC America LLC
203 Parfitt Way SW, Suite G100
Bainbridge Island, WA 98110
USA
Ordering
Information:
+49 (800) 0749832
Technical
Support: +49 (6131) 9221-31
Fax: +49 (6131) 9221-33 1 (206) 780-9135
Web Site: http://www.phytec.de http://www.phytec.com
2
st
Edition: November 2006

Contents
© PHYTEC Meßtechnik GmbH 2006 L-676e_2
1
Introduction .........................................................................................1
1.1
Rapid Development Kit Documentation.......................................1
1.2
Overview of this QuickStart Instruction.......................................2
1.3
Conventions used in this QuickStart.............................................3
1.4
System Requirements....................................................................4
1.5
The PHYTEC phyCORE
-PXA270.............................................5
1.6
Software Development Tools .......................................................8
1.6.1
Telelogic UML Development Tool Rhapsody ................8
1.6.2
GNU Cross Compiler Tool Chain ...................................9
1.6.3
Eclipse Platform.............................................................10
2
Getting Started...................................................................................11
2.1
Requirements of the host platform..............................................11
2.2
Configuring the host platform.....................................................12
2.2.1
Installing Software packages:........................................12
2.2.2
Setup Network Card Configuration...............................18
2.2.3
Disabling the Firewall....................................................20
2.2.4
Configure User Rights for the Serial Interface..............21
2.3
UML-Kit Setup...........................................................................23
2.4
Setup your GPIO-Extension-Board ............................................31
2.5
Configuring Komport .................................................................34
2.6
Downloading an Example on the Target ....................................36
3
Getting more involved.......................................................................37
3.1
Open and build a project.............................................................37
3.2
Design Level Debugging............................................................43
3.3
Changing the demo application ..................................................53
4
Debugging an example project.........................................................56
4.1
Starting the GDB Server on the target........................................57
4.2
Starting Eclipse...........................................................................57
4.3
Open the demo project................................................................59
4.4
Configuring Include - Paths........................................................63
4.5
Configuring and Starting the GDB debugger .............................67
4.6
Stepping and Watching Variables Content.................................76
5
Further Information..........................................................................80
6
Summary ............................................................................................81
40 min
60 min
40 min
5 min


Introduction
© PHYTEC Messtechnik GmbH 2006 L-676e_2
1
1Introduction
5 min
In this QuickStart you can find general information on the PHYTEC
phyCORE
-PXA270 Single Board Computer (SBC), an overview of
Telelogic’s UML-Tool and the GNU Cross compiler, and instructions on
how to run example programs on the phyCORE
-PXA270, mounted on the
PHYTEC phyCORE
Development Board PXA270 in conjunction with
UML-Tool Rhapsody from Telelogic.
Please refer to the phyCORE
-PXA270 Hardware Manual for specific
information on such board-level features as jumper configuration, memory
mapping and pin layout.
1.1
Rapid Development Kit Documentation
This "Rapid Development Kit" (RDK) includes the following
electronic documentation on the enclosed "PHYTEC
UML-XScale-Disc":
•the PHYTEC phyCORE
-PXA270 Hardware Manual
•controller User's Manuals and Data Sheets
1.2
Professional Support Packages available
This Kit comes with free installation support. If you do have any
questions concerning installation and setup, you are welcome to
contact our support department.
For more in-depth questions, we offer a variety of custom
tailored packages with different support options (e-mail, phone,
direct contact to the developer) and different reaction times.
Please contact our sales team to discuss the appropriate support
option if professional support beyond installation and setup is
important to you.

phyCORE
-PXA270 QuickStart Instructions
2
© PHYTEC Messtechnik GmbH 2006 L-676e_2
1.3
Overview of this QuickStart Instruction
This QuickStart Instruction gives a general "Rapid Development
Kit" description, as well as software installation hints and an
example program enabling quick out-of-the box start-up of the
phyCORE
-PXA270 in conjunction with the GNU Cross
compiler development tool chain and Rhapsody. It is structured
as follows:
1) The “Getting Started” section describes how to configure the
host platform and how download an embedded application to the
PXA-270.
2) The “Getting More Involved” section provides a step-by-step
instructions on how to create and build new projects, generate
and download output files to the phyCORE
-PXA270 using
Rhapsody and modify the example.
3) The “Design Level Debugging” section provides an example
how to debug an application running on the PXA-270 with
Rhapsody on the host PC at “design level”.
4) The “Advanced Debugging” section provides information on
how to debug your application at “code level”
In addition to dedicated data for this Rapid Development Kit, the
PHYTEC UML-XScale-Disc contains supplemental information
on embedded microcontroller design and development.

Introduction
© PHYTEC Messtechnik GmbH 2006 L-676e_2
3
1.4
Conventions used in this QuickStart
The following is a list of the typographical conventions used in this book:
Italic
Used for file and directory names, program and command
names, command-line options, menu items, URLs, and
other terms that corresponds the terms on your desktop.
Bold
Used in examples to show commands or other text that should be
typed literally by the user.
Pay special attention to notes set apart from the text with the following
icons:
At this part you might leave be path of this QuickStart.
This is a warning. It helps you to avoid annoying problems.
You can find useful supplementary information about the topic.
At the beginning of each chapter you can find information of
the time to pass the following chapter.
You have successfully passed an important part of this
QuickStart.
You can find information to solve problems.

phyCORE
-PXA270 QuickStart Instructions
4
© PHYTEC Messtechnik GmbH 2006 L-676e_2
1.5
System Requirements
Use of this "Rapid Development Kit" requires:
•the PHYTEC phyCORE
-PXA270
•the phyCORE
Development Board PXA270 with the
included DB-9 serial cable, Ethernet crosslink cable and AC
adapter supplying 12 VDC /min. 1A
•Rhapsody Demo version
•PHYTEC Distribution based on OSELAS from Pengutronix
•an IBM-compatible host-PC (486 or higher running Linux)
For more information and example updates, please refer to the
following sources:
http://www.phytec.de

Introduction
© PHYTEC Messtechnik GmbH 2006 L-676e_2
5
1.6
The PHYTEC phyCORE
-PXA270
The phyCORE
-PXA270 represents an affordable yet highly
functional Single Board Computer (SBC) solution in sub-
miniature dimensions (70 x 57 mm). Its universal design enables
its insertion in a wide range of embedded applications.
All controller signals and ports extend from the controller to
high-density (0.635 mm) Molex pin header connectors aligning
two sides of the board, allowing it to be plugged like a "big chip"
into a target application.
The standard module runs at a maximum of 520 MHz internal
clock speed and offers 64 MByte (up to 128 MByte) SDRAM
and 32 MByte (up to 64 MByte) Flash on-board for DATA and
CODE storage.
The module communicates by means of one RS-232 transceiver,
one CAN bus interface, and a SMSC LAN91C111 10/100BaseT
Ethernet controller which enables implementation of the module
in embedded Internet applications. The phyCORE
-PXA270
operates within a temperature range of -40°C to +85°C.

phyCORE
-PXA270 QuickStart Instructions
6
© PHYTEC Messtechnik GmbH 2006 L-676e_2
The phyCORE
-PXA270 offers the following features:
•subminiature Single Board Computer (70 x 57 mm) achieved
through modern SMD technology
•populated with the Intel PXA270 microcontroller
(BGA-360 packaging)
•improved interference safety achieved through multi-layer
PCB technology and dedicated Ground pins
•controller signals and ports extend to two 160-pin high-
density (0.635 mm) Molex connectors aligning two sides of
the board, enabling it to be plugged like a "big chip" into
target application
•max. 520 MHz clock frequency
•32 MByte (up to 64 MByte) on-board Flash
1
•64 MByte (up to 256 MByte) RAM on-board
•one CAN transceiver
•RS-232 transceiver
•SMSC 91C111 Ethernet controller with configuration
EEPROM
•USB Client Interface and Host Interface
•2 * PCMCIA / Compact Flash
•2 * MMC card and MemoryStick
•LCD controller
•Synchronous Serial Protocol ports (SSP and NSSP)
•I
2
C Interface
•4 * PWM
•RTC
•General purpose I/O pins (GPIO)
1
: Please contact PHYTEC for more information about additional module configurations.

Introduction
© PHYTEC Messtechnik GmbH 2006 L-676e_2
7
The Development Board PCM-990 is a universal carrier board for start-
up and programming of the PHYTEC phyCORE-PXA270 Single Board
Computer module with two high-density SMT (160 pins each, 0.63 mm
pitch) pin header connectors.
The Development Board is fully equipped with all mechanical and
electrical components necessary for the speedy and secure insertion and
subsequent programming of the high-density PHYTEC phyCORE
module. These components include TFT display connection, touch screen
interface, Ethernet transformer and connector, DB-9, USB and power
socket connectors.
phyCORE
Development Board PXA270 Technical Highlights
•Molex connectors for mating with phyCORE-PXA270 SBC module
•Connector for 8.4" Sharp TFT display with 640*480 pixel resolution,
incl. adjustable inverter for background illumination
•AC97 controller WM9712L with touch and sound interface (Line-IN,
Line-OUT, MIC-IN and 0.4 watts speaker)
•Two DB-9 sockets for RS-232 interface from FF-UART and BT-
UART, 2*5 pin header for IR-UART
•One DB-9 plug for CAN interface, optical isolation
•RJ-45 Ethernet connector with transformer for 100/10 MBit/s
•USB Host socket for PXA270 USB host interface
•USB client socket for PXA270 USB client interface
•Power supply for unregulated input voltage from 12 V (optional
24V). It supplies regulated +3.3 V for the phyCORE-PXA270.
Additional +5 V is created for the IDE and CF card and LCD/inverter
circuitry.
•Optional battery charger circuitry for NiMH batteries
•Power magement for MMC, CF, IDE and LCD display
•Two user programmable LEDs
•Optional IDE interface for two 2.5" hard disks (Master / Slave)
•Interface for Matrix keyboards
•JTAG interface
•AC97 expansion port
•Reset and GPIO push button

phyCORE
-PXA270 QuickStart Instructions
8
© PHYTEC Messtechnik GmbH 2006 L-676e_2
1.7
Software Development Tools
1.7.1 Telelogic UML Development Tool Rhapsody
As the embedded market grows, the systems are getting more
complex. Normaly, embedded systems are designed with a
functional approach, using e.g. the language C. With more
complex systems, this will lead to problems in quality,
reusability. The commercial market has established a standard
called Unified Modelling Language for developing complex
systems. But UML is also available for the embedded market.
With UML you can describe your system graphically by drawing
diagrams, showing the components and behaviour of your
system.
Today there are many UML tools on the market, most only
concentrating on designing the models. But with these tools, you
will get not much benefit from using UML because the code
needs to be developed seperatly from the model leading to
inconsistencies during the development cycles.
Telelogic´s UML software development tool Rhapsody is the
next step in software development for the embedded market. It
allows to graphically model the behaviour and functionality of
the embedded system and will generate productivity code from
the models. With this approach, your code and your model are
always consistent.
Rhapsody supports most of the UML 2.0 diagrams, including
•Use Case diagrams
•Class diagrams
•Object model diagrams
•Component diagrams
•Sequence diagrams
•Statecharts

Introduction
© PHYTEC Messtechnik GmbH 2006 L-676e_2
9
•Activity diagrams
Rhapsody will generate code witch consists of the class
interfaces that are given in the model and the behavior the user
gave these classes. Code can be added to the class definitions.
This code is then compiled with an external cross compiler
resulting in an application that will run on the target platform.
The application running on the target can be debugged at design
and code level on the host PC.
Rhapsody need to know the location of the cross compiler, so be
sure to first install the GNU Cross Compiler Tool Chain before
installing Rhapsody
1.7.2 GNU Cross Compiler Tool Chain
Cross-development in general refers to the overall software
development process that produces a single application or a
complete system running on a platform that is different from the
development platform. This is an important concept when the
target system doesn't have a native set of compilation tools, or
when the host system is faster and has greater resources.
The platform where the actual development takes place is called
the host platform. The platform where the final application is
tested and run is called target platform. In this QuickStart we are
using a x86-architecture based Linux as host platform. As target
platform we are using the arm architecture with a PXA270 CPU.
Building a program for a CPU architecture different from the one
used on the machine where the compilation is done, is
accomplished using a cross-compiler toolchain and cross-
compiled libraries. In this QuickStart we are using the GNU
C/C++ Cross Development Toolchain.

phyCORE
-PXA270 QuickStart Instructions
10
© PHYTEC Messtechnik GmbH 2006 L-676e_2
1.7.3 Eclipse Platform
The Eclipse Platform provides support for C/C++ development.
Because the Eclipse Platform is only a framework for developer
tools, it doesn't support C/C++ directly; it uses external plug-ins
for support. This QuickStart shows you how to make use of the
CDT -- a set of plug-ins for C/C++ development in conjunction
with the GNU GCC C/C++ Toolchain.
The CDT is an open source project (licensed under the Common
Public License) implemented purely in Java as a set of plug-ins
for the Eclipse SDK Platform. These plug-ins add a C/C++
Perspective to the Eclipse Workbench that can now support
C/C++ development with a number of views and wizards, along
with advanced editing and debugging support.
Due to its complexity, the CDT is broken down into several
components, which take the form of separate plug-ins. Each
component operates as an autonomous project, with its own set of
committers, bug categories, and mailing lists. However, all plug-
ins are required for the CDT to work properly. Here is a list of the
plug-ins/components:
•Primary CDT plug-in is the "framework" CDT plug-in.
•CDT Feature Eclipse is the CDT Feature Component.
•CDT Core provides Core Model, CDOM, and Core
Components.
•CDT UI is the Core UI, views, editors, and wizards.
•CDT Launch provides the launch mechanism for external
tools such as the compiler and debugger.
•CDT Debug Core provides debugging functions.
•CDT Debug UI provides the user interface for the CDT
debugging editors, views, and wizards.
•CDT Debug MI is the application connector for MI-
compatible debuggers.
.

Getting Started
© PHYTEC Messtechnik GmbH 2006 L-676e_2
11
2Getting Started
40 min
In this chapter you will establish the basis to pass the steps in this
QuickStart. First you will learn how to configure the host platform. You
will install additional software packages and setup the network
configuration for connecting your host to the target. After connecting the
host to the target you will copy an application to the target. At the end of
this chapter you will be able start a first demo application on the target.
2.1
Requirements of the host platform
To pass the following steps in this Quickstart, you will need a
host pc with an installation of openSUSE 10.0 OSS (x86) and
KDE desktop.
When you are installing openSUSE 10.0, you can select KDE as
Desktop selection. The default packages to use openSUSE 10.0
with your host PC will be selected automatically. This default
selection will suffice to pass the steps in this QuickStart
Instruction. The installation of additional packages and
configurations will be described on the following pages.
In the following configuration steps we assume, that the host pc
is not connected to any other network. The target and host will
be connected with a cross-over cable via a peer-to-peer
connection. If your host is part of a company’s network, we
recommend disconnecting your host from such a network.
In this QuickStart Instruction you will have to shutdown the
firewall and configure the network card of your host pc. If your
host pc is connected to another network, changing the ip address
can cause conflicts with existing hosts.

phyCORE
-PXA270 QuickStart Instructions
12
© PHYTEC Messtechnik GmbH 2006 L-676e_2
2.2
Configuring the host platform
In this passage you will learn how to configure the host platform.
You will install additional Linux software packages that are
necessary to accomplish the steps in the QuickStart Instruction.
Then you will setup the Network configuration to use the host pc
with your target and disable the firewall. If the firewall is
enabled, you will have problems with connections to the target.
2.2.1 Installing Software packages:
To accomplish the steps in the QuickStart Instruction you will
have to install additional packages.
If you don’t install all of these packages, the setup may fail
or some configuration steps won’t work correctly.
•Open the Control Center (YaST)

Getting Started
© PHYTEC Messtechnik GmbH 2006 L-676e_2
13
•Enter your root password and click on the OK button.
•Open Software Management in Software.

phyCORE
-PXA270 QuickStart Instructions
14
© PHYTEC Messtechnik GmbH 2006 L-676e_2
•Select Filter Search.
•Type libxml2-devel and click Search button.
•Check libxml2-devel.
•Type python-devel and click Search button.
•Check python-devel

Getting Started
© PHYTEC Messtechnik GmbH 2006 L-676e_2
15
•Type tftp and click Search button.
•Check the package tftp
•Type qt3-devel and click Search button.
•Check qt3-devel.

phyCORE
-PXA270 QuickStart Instructions
16
© PHYTEC Messtechnik GmbH 2006 L-676e_2
•Select Filter Selections.
•Select C/C++ Compiler and Tools in the window selection.
•Select Tcl/Tk Development System in the window selection.
•Click Accept button.
Other manuals for phyCORE-PXA270
2
Table of contents