Advertisement

Quick Links

®
phyCORE
-LPC2294
QuickStart Instructions
Using Keil's ULINK and the Keil ARM7/µVision3
Software Development Tool Chain
Note: The PHYTEC Spectrum CD includes the electronic version of
®
the English phyCORE
-LPC2292/94 Hardware Manual
Edition: June 2005
A product of a PHYTEC Technology Holding company

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the phyCORE-LPC2294 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Phytec phyCORE-LPC2294

  • Page 1 -LPC2294 QuickStart Instructions Using Keil's ULINK and the Keil ARM7/µVision3 Software Development Tool Chain Note: The PHYTEC Spectrum CD includes the electronic version of ® the English phyCORE -LPC2292/94 Hardware Manual Edition: June 2005 A product of a PHYTEC Technology Holding company...
  • Page 2 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.
  • Page 3: Table Of Contents

    4.3 Keil µVision3 Debug Features ...........67 4.4 Using the Keil µVision3 Debug Features........69 4.4.1 Breakpoints..............69 4.4.2 Single Stepping and Watch Window......70 4.5 Running, Stopping and Resetting ..........71 4.6 Changing Target Settings for the "Executable Version" ....72 © PHYTEC Meßtechnik GmbH 2005 L-659e_3...
  • Page 4 Board HD200 with phyCORE -LPC2294 ........ 15 ® Figure 2: JTAG Connector X701 on the phyCORE -LPC2294 (Bottom View)................16 ® Figure 3: ULINK Connected to the phyCORE Module ......17 Figure 4: Power Connector ............... 17 © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 5: Introduction To The Rapid Development Kit

    Introduction Introduction to the Rapid Development Kit This QuickStart provides: ® • general information on the PHYTEC phyCORE -LPC2294 Single Board Computer (SBC), • an overview of Keil's ARM7/µVision3 software development tool chain evaluation version, and • instructions on how to run example programs on the ®...
  • Page 6: Overview Of This Quickstart Instruction

    - "Debug" - to demonstrate simple debug functions using the Keil µVision3 debug environment. In addition to dedicated data for this Rapid Development Kit, the PHYTEC Spectrum CD-ROM contains supplemental information on embedded microcontroller design and development. © PHYTEC Messtechnik GmbH 2005...
  • Page 7: System Requirements

    • the Philips LPC2000 Flash Utility software • the Keil ULINK JTAG-USB adapter, not included in the standard Rapid Development Kit version • the PHYTEC Spectrum CD for ARM7 • an IBM-compatible host-PC (486 or higher running at least Windows95/NT)
  • Page 8: Lpc2294

    -LPC2294 operates within a temperature range of -40°C to +85°C and requires only a 300 mA power source. The Keil ARM/µVision3 software tools, in conjunction with the Keil ULINK adapter, enables easy on-board download of user programs. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 9 < 280 mA • controller 1.8 V core voltage generated on-board • additional operating voltage transceivers, typ. <12 mA • support of LPC2294 single chip mode Please contact PHYTEC for more information about additional module configurations. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 10 Development Board HD200, in EURO-card dimensions (160 x 100 mm) is fully equipped with all mechanical and electrical components necessary for the speedy and secure insertion ® and subsequent programming of most PHYTEC phyCORE high- density series Single Board Computers. Simple jumper configuration readies Development Board’s...
  • Page 11: Keil Arm7/Μvision3 Software Development Tool Chain

    C:\Keil\Uv3. You can start Keil µVision3 by selecting it from the Programs menu using the Windows Start button. The Keil µVision3 icon will also be placed on your desktop for easy startup of the development tools. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 12 Colors are used in printed output. • Document Outlining that provides a quick overview of complex source files. The ARM7 evaluation version, as provided on the PHYTEC Spectrum CD, has the following limitations: • The µVision Debugger is limited to 16 kBytes.
  • Page 13: Getting Started

    Flash memory using ARM7/µVision3 tools 2.1 Installing Rapid Development Kit Software When you insert the PHYTEC Spectrum CD into the CD-ROM drive of your host-PC, the PHYTEC Spectrum CD should automatically launch a setup program that installs the software required for the Rapid Development Kit as specified by the user.
  • Page 14 If you decide to individually choose different paths and/or drives you must consider this for all further file and path statements. We recommend that you accept the default destination location. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 15 All Kit-specific content will be installed to a Kit-specific subdirectory of the Rapid Development Kit root directory that you have specified at the beginning of the installation process. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 16 Spectrum CD. If you decide not to copy the documentation to your hard-drive you will need the PHYTEC Spectrum CD-ROM each time you want to access these documents. The installed links will refer to your CD-ROM drive in this case.
  • Page 17 Keil ARM7 tools that we use in this QuickStart manual. PHYTEC can not guarantee successful completion of these QuickStart instructions if a different version of the Keil ARM7 tools is used.
  • Page 18 • Click OK and follow the Flash Utility Setup instructions. • Decide if you want to begin the QuickStart Instruction immediately by selecting the appropriate checkbox and click on Finish to complete the installation. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 19: Interfacing The Phycore ® -Lpc2294 To A Host-Pc

    2.0 mm to 2.0 mm cable to the applicable header connector inside the ULINK. Make sure that pin #1 on the cable (black wire) matches pin #1 on the connector. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 20 Ensure that there is a solid connection between the module’s pins and the Development Board receptacle. Also take precautions not to ® damage the connectors when the phyCORE is removed from and inserted onto the Development Board. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 21 X1 on the phyCORE module to a power supply (refer to Figure 4 for the correct polarity). -- + Polarity: Center Hole +5 VDC 1.3 mm 3.5 mm ≥ 500 mA Figure 4: Power Connector © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 22: Downloading Example Code With Philips Lpc2000 Flash Utility

    \Software\Philips\LPC2000 Flash Utility. Among other tasks, the LPC2000 Flash Utility program downloads user code in Intel *.hex file format from a host-PC to on-chip Flash on an LPC229x device populating a PHYTEC SBC via an RS-232 connection. Note: Successful completion of this section requires that any user code residing in external Flash be erased.
  • Page 23 9,600 baud rate. • Click on the Upload to Flash button. NOTE: PHYTEC typically refers to the process of loading a machine readable file from a host-PC into a Flash device populating a PHYTEC Single Board Computer as "download". In this section we will use the term "Upload to Flash"...
  • Page 24 • Upon completion of file upload to on-chip Flash, press the Reset button S_2 on the Development Board. • Successful download of the blinky demo will result in the LED D3 on the Development Board blinking on and off at equal intervals. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 25: Downloading Example Code With Μvision3

    Keil DK-ARM tools that we use in this QuickStart manual. PHYTEC can not guarantee successful completion of these QuickStart instructions if a different version of the Keil DK-ARM tools is used.
  • Page 26: Blinky

    The "Blinky" example downloads a program to external Flash that, ® when executed, manipulates the LED D3 on the phyCORE Development Board HD200. • Open the Blinky project from the µVision3 menu Project / Open Project. • Browse to C:\PHYBasic\pC- LPC2294\Demos\Keil\Blinky. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 27 Getting Started • Select the Blinky project. • Click Open. • In the Select Target pull-down menu be sure that the phyCORE-LPC2294 XFLASH target is selected. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 28 Successful execution of the program will flash the LED D3 with equal on and off duration. Erase Flash • To erase Flash, select Flash/Erase from the uVision toolbar. This requires that a project with an XFLASH target is open. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 29: Hello

    Monitoring the execution of the Hello demo requires use of a terminal program, such as the HyperTerminal program included within Windows. • Start HyperTerminal program within Programs /Accessories/Communications bar. • The Connection Description window will now appear. Enter "COM Direct" in the Name text field. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 30 • Click OK to advance to the next window (COM1 Properties). • Then set the following COM parameters: Bits per second = 9,600; Data bits = 8; Parity = None; Stop Bits = 1; Flow Control = None. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 31 Notice the connection status report in the lower left corner of the window. • Ensure that the target hardware is properly connected to the host-PC via the ULINK and serial cable as well as a power supply. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 32 • Browse to the correct drive and path for the phyCORE -LPC2294 demo folder (default location C:\PHYBasic\pC-LPC2294\Demos\Keil\Hello\) and click Open. • In the Select Target pull down menu be sure that the phyCORE-LPC2294 XFLASH target is selected. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 33 This may lead to incoherent characters appearing in the HyperTerminal window following execution of code. • Click the disconnect icon in HyperTerminal toolbar and exit HyperTerminal. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 34 ® phyCORE -LPC2294 QuickStart Instructions © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 35: Getting More Involved

    • Change to the project directory created by the installation procedure (default location C:\PHYBasic\pC-LPC2294\Demos\Keil\Blinky2). • In the text field ’File name’, enter the file name of the project as Blinky2.uv2 and click on Save. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 36 • Click on No to not include this default startup code! The default startup code provided Keil does match phyCORE-LPC2294 hardware properties. The correct startup file called startup_phyCORE-LPC2294.s will be added to the project later. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 37: Configure The Project Components

    • To configure the target click on the icon in the build toolbar or right-click on the target, ’Target 1’ in the Project Workspace window and select Manage Components. • The Components, Environments, and Books window will appear. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 38 QuickStart Instructions • In the Project Components tab, double-click on Target 1. Change the name of the target to phyCORE-LPC2294 XFLASH. • Double-click on Source Group 1, in the Groups window, and change the name of the group to Startup Code.
  • Page 39 Getting More Involved • Add another group by selecting the New(Insert) icon in the Groups window. Name the new group Source Code. • Select the Folders/Extensions tab. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 40 • Click OK. This brings you back to the Project Workspace window. • You are now ready to add source files to the project. Make sure the view in the Project Workspace window is expanded to see both file groups. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 41: Adding Source Files To The Project

    Startup Code and select Add Files to Group ‘Startup Code’. • In the File of type pull-down menu, select: "Asm Source file (*.s*; *.src*; .a*)". Browse to C:\PHYBasic\pC-LPC2294\Demos\Keil\Blinky2 and select Startup_phyCORE-LPC2294.s. • Click on the Add button and then click Close. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 42 • Select Add Files to Group ’Source Code’. • Browse to C:\PHYBasic\pC-LPC2294\Demos\Keil\Blinky2 and select Blinky2.c. • Click on the Add button. • Select Time2.c. • Click on the Add button and then click Close. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 43 NOTE: Always use the Startup_phyCORE-LPC2294.s file provided by PHYTEC in your application project. This startup file contains the correct controller setting for access to external memory and other on-board components. Using other startup code, e.g. the default Keil...
  • Page 44: Modifying The Source Code

    • Locate the following code section and modify the delay for LED flashes from the original 149999 to 549999. T0MR0 = 149999; // 10mSec = 150.000-1 counts • Save the modified file by choosing File / Save or by clicking the floppy disk icon . © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 45: Setting Options For Flash Target

    *.opt file. • Configure options for target by selecting the Options for Target icon build toolbar right-click phyCORE-LPC2294 XFLASH target in the Project Workspace window and select Options for Target ‘phyCORE-LPC2294 XFLASH’. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 46 ® size of the memory. The phyCORE -LPC2294 standard version features 2 MByte of external Flash and 1 MByte of external SRAM. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 47 Getting More Involved Configure the Output Options • In the Output tab be sure that Create Executable, Debug Information and Beep When Complete options are selected. • Click on the Select Folder for Objects button. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 48 ® phyCORE -LPC2294 QuickStart Instructions • Browse to the folder: C:\PHYBasic\pC-LPC2294\Demos\Keil\Blinky2\XFLASH. • Click Ok. This takes you back to the Options for Target window. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 49 • In the Listing tab, be sure that the default settings are set as follows. • Click on the Select Folder for Listings button. • Browse to the folder: C:\PHYBasic\pC- LPC2294\Demos\Keil\Blinky2\XFLASH • Click OK. This takes you back to the Options for Target window. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 50 LPC2294 MEMMAP register to User External Memory Mode, where the interrupt vectors are re-mapped to external memory. Note: Please refer to the Philips LPC2294 User Manual section "Memory Mapping Control" for more details. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 51 Getting More Involved Configure the Utilities Options • Select the Utilities tab. • Select the Use Target Driver for Flash Programming option. • In the pull-down menu select ULINK ARM Debugger. • Click the Settings button. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 52 Reset and Run. Checking the Reset and Run box will execute the downloaded Blinky2 code at the end of the Flash programming sequence without having to push the Reset button (S_2) on the Development Board. • Click on Add to add a Programming Algorithm. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 53 Getting More Involved • In Programming Algorithm window, select AM29x800BT Dual Flash and click Add. The AM29DL800BT device external Flash memory populating ® phyCORE -LPC2294 module. • Click on Add. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 54 Dual Flash device and set the Start address to 0x80000000 and Size to 0x00200000 as shown below and click OK. • Back in the Utilities tab, select the browse button in the Init File: line to add the Flash initialization file. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 55 Getting More Involved • In the Select Flash Initialization File pop-up window browse to C:\PHYBasic\pC-LPC2294\Demos\Keil\Blinky2 and select the XFlash.ini file. • Click the Open button. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 56: Building The Project

    Output Window - Build tab. Use the editor to correct the error(s) in the source code and save the file and repeat the build. If there are no errors, the code is ready to be downloaded into the Flash memory. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 57: Downloading Code Into Flash Memory

    Getting More Involved 3.5 Downloading Code into Flash Memory • In the Select Target pull down menu be sure that the phyCORE-LPC2294 XFLASH target is selected. • Download the code into Flash memory by either selecting the Download to Flash Memory icon on the build toolbar or in the main menu select Flash / Download.
  • Page 58 ® phyCORE -LPC2294 QuickStart Instructions © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 59: Debugging

    JTAG interface. Debugging on the target hardware also enables the testing of peripheral components of the application and real-time program execution. The following examples utilize the ULINK ARM Debugger environment. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 60: Creating A Debug Project And Preparing The Debugger

    CPU Vendor Data base list. • Rename the target of your project within the Project Workspace window - Files tab into phyCORE-LPC2294 XRAM. • Rename the file group Source Group 1 as Startup Code and add one additional file group named Source Code.
  • Page 61: Setting Options For Target

    XRAM target is selected. • Configure options for target by selecting the Options for Target icon build toolbar right-click phyCORE-LPC2294 XRAM target in the Project Workspace window and select Options for Target ’phyCORE-LPC2294 XRAM’. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 62 It is necessary to configure the External Memory Start and Size settings so that the combined user code and data does not exceed the ® physical size of the RAM. The phyCORE -LPC2294 standard version features 1 MByte of external SRAM. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 63 • In the Output tab be sure that Create Executable, Debug Information and Beep When Complete options are selected. • Click on the Select Folder for Objects button. • Browse to the folder: C:\PHYBasic\pC-LPC2294\Demos\Keil\Debug\XRAM. • Click Ok. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 64 -LPC2294 QuickStart Instructions Configure the Listing Options • In the Listing tab, leave the default settings. • Click on the Select Folder for Listings button. • Browse to the folder: C:\PHYBasic\pC-LPC2294\Demos\Keil\Debug\XRAM. • Click Ok. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 65 Debugging • The Listing tab should appear as follows: © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 66 Symbols, Set field, type: _EXTERNAL_RAM_. This will set the LPC2294 MEMMAP register to User RAM Mode, where the interrupt vectors are re-mapped to static RAM. Note: Please refer to the Philips LPC2294 User Manual section "Memory Mapping Control" for more details. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 67 ARM Debugger setting, is NOT checked. Loading the application code and the go till main function are executed by the XRAM.ini file (see below). • Add the correct Initialization File by clicking the browse button and select XRAM.ini. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 68 ® phyCORE -LPC2294 QuickStart Instructions • The Debug tab should now appear as follows: • Click OK to save all the settings. • In the main µVision3 menu select File / Save All. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 69: Starting The Debugger

    If a problem occurs during data transfer, an error message will be displayed. If this should occur, make sure the target hardware is properly connected to a power supply and the host-PC using the Keil ULINK device (refer to section 2.2). © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 70 Notice the yellow arrow pointing to the first command in the ’main’ function. Also notice the program counter (PC $) within the Project Window – Register page showing the start address of the ’main’ function. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 71: Keil Μvision3 Debug Features

    Run button is pushed. • The next button on the debugger toolbar is the Stop button. The Stop button interrupts and stops the running program at an undetermined location. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 72 Run to Cursor line command. The Run to Cursor line command executes the program to the current cursor position within the code window. This allows use of the cursor line as a temporary breakpoint. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 73: Using The Keil Μvision3 Debug Features

    Notice that the LED (D3) on the Development Board now illuminates. • Also notice the output message in HyperTerminal that comes from statement in line # 30 and #36. printf • Click again on Insert/Remove Breakpoint remove breakpoint. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 74: Single Stepping And Watch Window

    180,000. To leave the wait function, change the value of x by typing x=179996 in the command line and press <Enter>. Now repeat clicking on Step Over until you leave the wait function. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 75: Running, Stopping And Resetting

    • To run your program without stopping at any time, delete all breakpoints by clicking on the button. • Click the Run button. The LED now blinks at changing on/off intervalls. You can use the Stop button to stop program execution at any time. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 76: Changing Target Settings For The "Executable Version

    • Start the HyperTerminal program as described in section 2.4.2. • The Debug code will start automatically at the end of the download. Now you can watch your final debug example execute. The HyperTerminal will display the status of the LED. © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 77 Did you find any mistakes in this manual? page Submitted by: Customer number: Name: Company: Address: Return to: PHYTEC America LLC 203 Parfitt Way SW, Suite G100 Bainbridge Island, WA 98110 Fax : (206) 780-9135 © PHYTEC Messtechnik GmbH 2005 L-659e_3...
  • Page 78 Published by © PHYTEC Messtechnik GmbH 2005 Ordering No. L-659e_3 Printed in Germany...

Table of Contents