Phytec phyCORE-LPC3250 Programming manual

QuickStart Instructions
phyCORE®- LPC3250
Rapid Development Kit
Windows Embedded CE
Using Microsoft Visual Studio 2005
Software Development Tool Chain
Note: The phyCORE-LPC3250-Rapid Development Kit CD includes the electronic version of
the English phyCORE®-LPC3250 Hardware Manual
Edition: December 2008
A product of a PHYTEC Technology Holding company

phyCORE®-LPC3250 Rapid Development Kit Quickstart Instructions
© PHYTEC America LLC 2008 L-716e_1
In this manual copyrighted products are not explicitly indicated. 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 America LLC assumes no responsibility for any inaccuracies.
PHYTEC America LLC neither gives any guarantee nor accepts any liability whatsoever for
consequential damages resulting from the use of this manual or its associated product. PHYTEC
America LLC reserves the right to alter the information contained herein without prior
notification and accepts no responsibility for any damages which might result.
Additionally, PHYTEC America LLC offers no guarantee nor accepts any liability for damages
arising from the improper usage or improper installation of the hardware or software. PHYTEC
America LLC 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 2008 PHYTEC America LLC, Bainbridge Island, WA
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 be made without the explicit written consent from PHYTEC America LLC.
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
1 (800) 278-9913
Technical
Support: +49 (6131) 9221-31
1 (800) 278-9913
Fax: +49 (6131) 9221-33 1 (206) 780-9135
Web Site: http://www.phytec.de http://www.phytec.com
1st Edition: December 2008

phyCORE®-LPC3250 Rapid Development Kit Quickstart Instructions
1Introduction............................................................................................1
1.1 Rapid Development Kit Documentation...................................... 1
1.2 Professional Support Packages Available....................................1
1.3 Overview of this QuickStart Instruction...................................... 2
1.4 Conventions used in this QuickStart............................................2
1.5 System Requirements...................................................................4
1.6 Install the PHYTEC Kit CD ........................................................4
1.7 Microsoft Visual Studio 2005 Development Tool Chain............ 5
2Getting Started.......................................................................................7
2.1 Installation Sequence ................................................................... 7
2.2 Installing Visual Studio 2005....................................................... 8
2.3 Installing Windows Embedded CE 6.0 Platform Builder............9
2.4 Installing Service Packs and Windows Embedded CE6.0 Platform
Builder R2..................................................................................10
2.5 Install Windows Embedded CE 6.0 QFE's................................10
2.6 Installing Microsoft Active Sync 4.5.........................................10
2.7 Installing phyCORE-LPC3250 SDK......................................... 10
2.8 Boot Windows Embedded CE OS on the phyCORE®-LPC325011
2.9 Establishing an Active Sync Connection................................... 12
2.10 Downloading Application Code with Active Sync ...................13
2.11 Downloading Application Code with Visual Studio 2005........14
3Getting More Involved........................................................................17
3.1 Creating a New Project..............................................................17
3.2 Modifying the Source Code....................................................... 20
3.3 Building the Project ...................................................................22
4Debugging.............................................................................................23
4.1 Starting the Debugger ................................................................23
4.2 Visual Studio 2005 Debug Features ..........................................25
4.3 Using the Visual Studio 2005 Debug Features..........................26
4.4 Running, Stopping and Resetting ..............................................26
4.5 Changing Target Settings for the "Executable Version" ........... 27
5Building an OS Image .........................................................................28
5.1 Download and Install the phyCORE-LPC3250 Binary BSP..... 28
5.2 Open the OSDesign....................................................................29
5.3 Build the Image..........................................................................29
5.4 Download an Image using Visual Studio ..................................30
Appendix A Install the bootloader (eboot.nb0) from SD Card.......34
Appendix B Install an Image (NK.bin) from SD Card....................36
5 min
3-4 h
30 min
40 min
50 min
© PHYTEC America LLC 2008 L-716e_1

Introduction
1Introduction
This QuickStart provides general information on the
PHYTEC phyCORE
®
-LPC3250 System on Module
(SOM). It gives you also an overview of Microsoft’s
Visual Studio 2005 software development tool chain
and instructions on how to run example programs on
the phyCORE
®
-LPC3250, mounted on the PHYTEC
phyCORE
®
-LPC3250 Carrier Board, in conjunction
with Visual Studio 2005.
5 min
Please refer to the phyCORE®-LPC3250 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 phyCORE-LPC3250 Rapid Development Kit CD:
•the PHYTEC phyCORE®-LPC3250 Hardware Manual
•controller User's Manuals and Data Sheets
•this QuickStart Instruction with general Rapid Development Kit description,
software installation advice and an example program, enabling quick out-of-the
box start-up of the phyCORE®-LPC3250 in conjunction with the Microsoft Visual
Studio 2005 software development tool chain
1.2 Professional Support Packages Available
PHYTEC backs up our Rapid Development Kits with a Start-Up Guarantee. We
invite you to make use of our free Technical Support concerning installation and
setup of QuickStart demos until any kit start-up problem you might encounter is
resolved. For more in-depth questions, we offer technical support packages for
appropriate support option if professional support beyond installation and setup is
required.
© PHYTEC America LLC 2008 1 L-716e_1

Introduction
© PHYTEC America LLC 2008 2 L-716e_1
1.3 Overview of this QuickStart Instruction
This QuickStart Instruction gives a general Rapid Development Kit description, as
well as software installation advice and one example program enabling quick out-of-
the box startup of the phyCORE®-LPC3250 in conjunction with Microsoft's Visual
Studio 2005. It is structured as follows:
Section 1: The Introduction section provides an overview to this QuickStart
Instruction, system requirements, kit contents, and kit CD installation instructions.
Section 2: In the Getting Started section you will install Rapid Development Kit
software from Adeneo and prepare the phyCORE®-LPC3250, mounted on the
Carrier Board, to interface to a host-PC. You will also learn how to download an
example application from a host-PC using Active Sync and Visual Studio 2005.
Section 3: The Getting More Involved section provides step-by-step instructions on
how to configure and build a new WinCE image, modify the example, create and
build a new project and generate and download output files to the phyCORE®-
LPC3250 using the Microsoft tools.
Section 4: The Debugging section demonstrates simple debug functions using
Visual Studio 2005 debug environment.
Section 5: In the Building an OS image section you will learn how to add your own
application to a WinCE project, create a new image and download this image on the
LPC3250.
1.4 Conventions used in this QuickStart
The following is a list of the typographical conventions used in this book:
Bold Commands or other text that should typed literally by the user
Bold Italic File and directory names
Italic Field and window names or titles, menu items, and other terms that
correspond to items on the PC desktop
Underline Blue Hyperlinks to documents, webpage URLs, or FTPs
Bold Red Command line entries
FixedWidthSource code listings and examples

Introduction
Pay special attention to notes set apart from the text with the following icons:
At this point you might leave the sequential path of this QuickStart.
This warning will help you avoid problems.
Useful supplementary information about the topic.
Estimated completion time for the following section.
Completion of an important part of this QuickStart.
Helpful information for troubleshooting.
© PHYTEC America LLC 2008 3 L-716e_1

Introduction
© PHYTEC America LLC 2008 4 L-716e_1
1.5 System Requirements
The following PHYTEC hardware components are included in the phyCORE-LPC3250
Windows Embedded CE Rapid Development Kit (part number KPCM-040-WinCE) and are
necessary for completing the instructions in this QuickStart instruction:
•the PHYTEC phyCORE®-LPC3250 (PCM-040)
•the phyCORE®-LPC3250 Carrier Board (PCM-967)
•Bare PCB Expansion Board (PCM-988)1
•AC adapter supplying 5 VDC /3.2A adapter, center positive
•Straight Ethernet cable
•Serial cable (RS-232)
•USB Standard A to mini-B cable
•SOM extraction tool
•Hard copy schematics
•SD Card with eboot bootloader and Windows Embedded CE image
•PHYTEC Kit CD
•Windows Embedded CE 6.0 180-Day Evaluation Kit
1.6 Install the PHYTEC Kit CD
The PHYTEC Kit CD will auto install kit documentation, datasheets, and demo files for the
phyCORE-LPC3250. When you insert the PHYTEC Kit CD into the CD-ROM drive of your
host-PC, the CD should automatically launch a setup program. Otherwise the setup program
(setup.exe) can be manually executed from the root folder of the CD.
All path and file statements within this QuickStart Instruction are based on the assumption that
you keep C:\PHYTEC as the default path when installing the Kit CD to your hard drive.
1. Insert the PHYTEC Kit CD.
2. On the Welcome to the phyCORE-LPC3250 Rapid Development Kit Setup Wizard window,
select Next to continue.
1The Bare PCB Expansion Board is not demonstrated in this QuickStart instruction.

Introduction
© PHYTEC America LLC 2008 5 L-716e_1
3. Keep C:\PHYTEC as the installation path and select Next to continue.
4. On the Ready to Install window, select Install.
5. After the installation process is complete, select Finish.
The PHYTEC Kit CD installation path is C:\PHYTEC\phyCORE-LPC3250 and the following
five subfolders are located within the phyCORE-LPC3250 directory:
Demos – This folder contains third party demos.
Documentation – This folder contains datasheets, hardware manual, QuickStarts, and other
product related documentation.
Linux – This folder contains the Linux BSP and tools.
Stage1 Loader – This folder contains the Stage1 Bootloader for the LPC3250.
WinCE – This folder contains a binary Eboot Bootloader, Windows Embedded CE images,
demo application for Visual Studio, and SDK.
1.7 Microsoft Visual Studio 2005 Development Tool Chain
Microsoft's Software development tools for the LPC3250 architecture aid every level
of developer from the professional applications engineer to the student just learning
about embedded software development.
Visual Studio 2005 is a new version of Microsoft’s popular IDE that supports also
embedded devices. The Platform Builder is now integrated in Visual Studio 2005. So
it is now possible to customize the WinCE Image and write user applications with
just one tool. Visual Studio 2005 combines project management, source code editing,
program debugging, and target programming in a single, powerful environment. This
QuickStart provides an overview of the most commonly used VS 2005 features
including:
•Project management, device setup, and tool configuration
•Editor facilities for creating, modifying, and correcting programs
•Target debugging
•Building a new image
The VS 2005 editor offers many standard and advanced software editing features
like:
•Automatic completion of code statements
•Auto listing of object members

Introduction
•Detailed Syntax Highlighting. Colours are used in printed output.
•Automatic indent and tab blocks of code
The Visual Studio 2005 Tool chain is available from your local Microsoft dealer.
There is also an evaluation version available which is used in this QuickStart. You
can use it to develop standard WinCE applications, MFC WinCE applications and
.NET Applications for WinCE.
If you already have installed another version of Visual Studio 2005, you
can use this one. We recommend installing the evaluation version when
working with this QuickStart.
© PHYTEC America LLC 2008 6 L-716e_1

Getting Started
2Getting Started
In this chapter you will install all of the software tools
necessary to begin development with Windows Embedded
CE. You will also interface the phyCORE
®
-LPC3250,
mounted on the Development Board, to a host-PC and
download an example application from a host-PC using
Active Sync and Visual Studio 2005.
3-4 h
2.1 Installation Sequence
It is important to install the software tools in the following sequence:
1. Visual Studio 2005
2. Windows Embedded CE 6.0 Platform Builder
3. Visual Studio 2005 Team Suite Service Pack 1
4. Windows Embedded CE 6.0 Platform Builder Service Pack 1
5. Windows Embedded CE 6.0 R2
6. Windows Embedded CE 6.0 QFE's
7. ActiveSync 4.5
8. phyCORE-LPC3250 SDK
© PHYTEC America LLC 2008 7 L-716e_1

Getting Started
2.2 Installing Visual Studio 2005
To install Visual Studio 2005 on your desktop PC insert the DVD labeled Visual
Studio 2005 Professional Edition included in this kit in your DVD Rom drive. The
setup should launch automatically. If not, open a Windows Explorer window, go to
your DVD drive, change to the directory VS and start setup.exe manually.
The following screen appears:
•Click on Install Visual Studio 2005 and follow the instructions of the setup
program.
You will require activation keys for both Visual Studio and Platform
Builder. You can request these keys from Microsoft. Please read the inside
of the Windows Embedded CE6.0 R2 DVD package for information.
© PHYTEC America LLC 2008 8 L-716e_1

Getting Started
2.3 Installing Windows Embedded CE 6.0 Platform Builder
•To install the Platform Builder Plug-in for Visual Studio 2005, please insert the
DVD labeled Windows Embedded CE6.0 in your DVD drive. The setup
should start automatically. If not, open windows file explorer, go to your DVD
drive and start "setup.exe" manually.
•When the following dialog appears, be sure to select Platform Builder and
under CE 6.0 Operating System the files for ARMV4I.
© PHYTEC America LLC 2008 9 L-716e_1

Getting Started
© PHYTEC America LLC 2008 10 L-716e_1
2.4 Installing Service Packs and Windows Embedded CE6.0 Platform
Builder R2
These updates are required for this QuickStart.
•Insert the DVD labeled Windows Embedded CE6.0 R2 in your DVD drive.
The install.htm should start automatically. If not, open a Windows file explorer,
go to your DVD drive and start install.htm.
1. Install Microsoft Visual Studio 2005 Team Suite Service Pack 1.
2. Install Windows Embedded CE 6.0 Platform Builder Service Pack 1.
3. Install Windows Embedded CE 6.0 R2.
2.5 Install Windows Embedded CE 6.0 QFE's
•Go to:
http://msdn.microsoft.com/en-us/embedded/aa731256.aspx
•Download and install the Armv4I versions of the updates in order from oldest
to newest, starting with the cumulative 2007 update package.
2.6 Installing Microsoft Active Sync 4.5
To be able to upload the software you are developing to your LPC3250 device you
need Microsoft Active Sync 4.5. When your PC is connected to your LPC3250
device via a USB cable this software allows you to create a direct connection to your
device.
•From the DVD labeled Windows Embedded CE6.0 R2 browse to
:\ACTIVESYNC4.5\WWE and execute setup.exe.
2.7 Installing phyCORE-LPC3250 SDK
The LPC3250 SDK for WinCE is needed for writing target-oriented applications. It
will integrate in the Visual Studio IDE, offering a new target device for code
generation. The SDK includes all functionality that is included in the demo image
that runs on the LPC3250. Therefore using the SDK allows the compiler to check
that all functionality needed in the application will be present in the image. The
absence of specific features is therefore recognized at “compile-time” not at
“runtime”.
•To install the LPC3250 SDK open a file manager and navigate to:
C:\PHYTEC\phyCORE-LPC3250\WinCE\SDK.

Getting Started
•Open LPC3250_SDK.msi and install the SDK. Accept the default installation
path:
C:\Program Files\Windows CE Tools\wce600\LPC3250-SDK\
You have successfully installed the software for the phyCORE-LPC3250
WinCE Kit. You can find the programs you will need to develop own
applications for the target on your host system. All necessary
configurations were done by the setup program.
2.8 Boot Windows Embedded CE OS on the phyCORE®-LPC3250
A Windows Embedded CE image was pre-installed to the phyCORE-LPC3250 on-
board Flash memory.
The Windows Embedded CE image pre-installed on the phyCORE-
LPC3250 does not support USB-Host. For USB-Host support, follow the
instructions in Appendix B to download the NK_HOST.bin image found on
the SD card included in your kit.
•Connect the 5 V AC/DC adapter with the power supply connector (X10) on
your board.
Only use the included power supply with 5 VDC output, center positive.
If Windows CE does not start within 1 minute, you may have a kit without
the OS image preinstalled. See appendix A and B for instructions for loading
When Windows CE has loaded it will first run an LCD touch calibration screen.
After calibration a Windows Embedded CE 6.0 desktop will appear on the LCD
screen.
© PHYTEC America LLC 2008 11 L-716e_1

Getting Started
2.9 Establishing an Active Sync Connection
The LPC3250 device should already be running Windows CE 6.0 OS as described in
chapter 2.7.
ActiveSync should already be running after the installation in chapter 2.5.
•Connect the USB A/mini-B cable with the USB OTG connector (X17) on the
target to a free USB port on your host.
Ensure to use the USB A/mini-B cable included in this kit.
Establishing the connection might take a few seconds. Once the connection has been
established Active Sync will show a screen with status information.
Your PC is now connected to the LPC3250 Rapid Development Kit.
•If the Set Up a Partnership window pops up, select No and then Next.
If you are not able to establish an ActiveSync connection, the phyCORE may
have the “USB Host” version of the NK.bin WinCE image, which does not
support ActiveSync. Refer to Appendix B for instructions to install the
ActiveSync version of NK.bin
© PHYTEC America LLC 2008 12 L-716e_1

Getting Started
2.10 Downloading Application Code with Active Sync
To download the demo application provided on the PHYTEC Kit CD, you need to
have Active Sync running on your PC to be able to establish a connection to your
LPC3250 device as described in the chapter 2.9.
•Click on Tools in the menu bar of Active Sync and select Explore Device. An
Explorer window called Mobile Device will open that will show you the folder
structure of the Windows CE installation on your LPC3250 device.
•Open a file manager and navigate to:
C:\PHYTEC\phyCORE-LPC3250\WinCE\Demo Application\HelloWorld\
LPC3250-SDK (ARMV4I)\Debug
•Select HelloWorld.exe and copy it to the Mobile Device window in the folder
Program Files using drag and drop.
© PHYTEC America LLC 2008 13 L-716e_1
The program has now been copied to your LPC3250 device. You will be able to
access it by double-clicking the My Device icon on your LPC3250 device. This
opens a window that will show you the file structure of your device. You should be
able to find HelloWorld.exe at the location where it was copied. Double-click
HelloWorld.exe to execute the program. A window will open on your LPC3250
device that will print a "Hello World" message.

Getting Started
2.11 Downloading Application Code with Visual Studio 2005
PHYTEC provides you with example code to learn about downloading code onto
your LPC3250 device. This code has already been copied to your local hard drive by
the setup in section 1.6.
•Start the tool chain by selecting Microsoft Visual Studio 2005 from the
programs group: Start\Programs\Microsoft Visual Studio 2005.
After starting Visual Studio 2005 the window shown below will appear. Here you
can create projects, edit files, configure tools, assemble, link and start the debugger.
© PHYTEC America LLC 2008 14 L-716e_1

Getting Started
The HelloWorld example downloads a program to your device that, when executed,
prints the text "Hello World" on the display of your phyCORE®Development Board
LPC3250.
•To open the HelloWorld project select File/Open/Project/Solution from the Visual
Studio 2005 menu bar.
•Browse to the folder C:\PHYTEC\phyCORE-LPC3250\WinCE\Dem_
Application\HelloWorld
•Select the HelloWorld project HelloWorld.vcproj.
•Click Open.
•In the Solution Platform pull-down menu make sure that the LPC3250-SDK
(ARMV4I) configuration is selected. Also make sure that LPC3250-SDK
ARMV4I Device is selected in the Target device menu.
If these menus are not shown in your Visual Studio IDE, move your mouse
to an empty space on the toolbar, press the right mouse button and select
from the pop up menu the menus Target and Device.
•Build the target by either selecting the Build icon on the build toolbar or in
the main menu bar select Build / Build HelloWorld.
•If any source file of the project contains any errors, they will be shown in the
Output Window - Build tab. Use the editor to correct the error(s) in the source
code, save the file and repeat the build.
•If there are no errors, the code can be downloaded to your LPC3250 device. For
this to work you need to have established an Active Sync connection between
your PC and your LPC3250 device as described in section 2.9. When the
connection is established select Build/Deploy HelloWorld from the main menu
bar.
•The individual steps of the download procedure can be viewed in the Output
Window - Build tab.
© PHYTEC America LLC 2008 15 L-716e_1
•Wait until the download is complete.

Getting Started
•The newly created application was now deployed on your LPC3250 device. To
start it select My Device on the target platform and go to the folder Program
Files/Helloworld and double tap on Helloworld
•A window will open on your LPC3250 device that will print a "Hello World"
message.
•Click on the Close icon in the window to close the application.
You have successfully passed the Getting Started part of this QuickStart. In this
chapter you learned how to open a project, build an executable and transfer and
run this executable on the target hardware.
© PHYTEC America LLC 2008 16 L-716e_1

Getting More Involved
3Getting More Involved
In this chapter you will learn how to configure the Visual
Studio 2005 IDE (Integrated Development Environment),
modify the source code from our example, create a new
project and build and download a machine-readable output
file to the target hardware.
30 min
3.1 Creating a New Project
•To create a new project file select File / New / Project from the Visual Studio
2005 menu. This opens a dialog that will ask about the kind of project you wish to
create.
•Open the Visual C++ tree and select Smart Device.
•In the Templates window select Win32 Smart Device Project.
•In the Name field, enter the name of the project you wish to create, e.g.
myHelloWorld.
•Click OK.
© PHYTEC America LLC 2008 17 L-716e_1
Other manuals for phyCORE-LPC3250
2
Table of contents
Other Phytec Microcontroller manuals

Phytec
Phytec IoT-Enablement-Kit 1 User manual

Phytec
Phytec phyCORE-LPC3250 Programming manual

Phytec
Phytec Linux-Kit phyCARD-M Programming manual

Phytec
Phytec phyCORE-SC520 User manual

Phytec
Phytec nanoModul-164 Programming manual

Phytec
Phytec phyCORE-167CS User manual

Phytec
Phytec i.MX6UR User manual

Phytec
Phytec phyCORE-i.MX31 User manual

Phytec
Phytec miniMODUL-537 User manual

Phytec
Phytec LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit User manual