Table of Contents

Advertisement

Quick Links

phyCORE-167
QuickStart Instructions
Using PHYTEC FlashTools 16W and the Tasking C166/ST10
Embedded Development Environment (EDE) evaluation version
Note: The PHYTEC Spectrum CD includes the electronic version of
the English phyCORE-167 Hardware Manual
Hinweis: Die PHYTEC Spectrum CD beinhaltet die elektronische
Version des deutschen phyCORE-167 Hardware Manuals
Edition: January 2001
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-167 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Phytec phyCORE-167

  • Page 1 QuickStart Instructions Using PHYTEC FlashTools 16W and the Tasking C166/ST10 Embedded Development Environment (EDE) evaluation version Note: The PHYTEC Spectrum CD includes the electronic version of the English phyCORE-167 Hardware Manual Hinweis: Die PHYTEC Spectrum CD beinhaltet die elektronische Version des deutschen phyCORE-167 Hardware Manuals...
  • Page 2 The information in this document has been carefully checked and is believed to be entirely reliable. However, PHYTEC Meßtechnik GmbH assumes no responsibi- lity for any inaccuracies. PHYTEC Meßtechnik GmbH neither gives any guarantee nor accepts any liability whatsoever for consequential damages resulting from the use of this manual or its associated product.
  • Page 3: Table Of Contents

    1.4 The PHYTEC phyCORE-167............4 1.5 The Tasking C166/ST10 Embedded Development Environment (EDE)....................7 Getting Started...................11 2.1 Installing Rapid Development Kit Software.......11 2.2 Interfacing the phyCORE-167 on the Development Board to a Host-PC..................18 2.3 Downloading Example Code with FlashTools 16W ....20 2.3.1 “Hello”................25 2.3.2...
  • Page 4 Memory Window............54 4.5.2 Stack Window ............... 55 4.5.3 Simulated I/O ..............55 4.6 Resetting CrossView Pro and the phyCORE-167 ...... 56 Advanced User Information............. 57 5.1 FlashTools 16W................57 5.2 Start.asm ..................58 5.3 Linking and Locating ..............59 5.4 Debugging using Monitor Kernel..........
  • Page 5: Introduction To The Rapid Development Kit

    Introduction 1 Introduction to the Rapid Development Kit This tutorial provides: • general information on the PHYTEC phyCORE-167 Single Board Computer, • an overview of Tasking C166/ST10 Embedded Development Environment (EDE) evaluation version, and • instructions on how to run example programs on the phyCORE-167, mounted on a PHYTEC Development Board, in conjunction with Tasking software tools.
  • Page 6: Overview Of This Quickstart Instruction

    1.3 System Requirements Use of this “Rapid Development Kit” requires: • the PHYTEC phyCORE-167, • the PHYTEC Development Board with the supplied DB-9 serial cable and AC adapter supplying 5 V./min. 300 mA, • the PHYTEC Spectrum CD, • an IBM-compatible host-PC (486 or higher running at least Windows95/NT) ©...
  • Page 7 Introduction For more information and example updates, please refer to the following sources: http://www.phytec.com - or - http://www.phytec.de support@phytec.com - or - support@phytec.de http://www.tasking.com support_de@tasking.com (Germany) support@tasking.com (International) © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 8: The Phytec Phycore-167

    200-pin Molex SMT pin header connectors (pin width is 0.635 mm./25mil) lining the circuit board edges. This enables the phyCORE-167 to be plugged like a “big chip” into target hardware. The standard board runs at a 20 MHz internal clock speed (delivering 100 ns instruction cycle.) and offers 256 kByte (up to 1 MB) SRAM...
  • Page 9 Board Computers. Simple jumper configuration readies the Develop- ment Board’s connection to phyCORE-167, which plug pins-down into the contact strips mounted on the Development Board. For more information about different configurations see the PHYTEC product catalog © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 10 • second double DB-9 connector configured as CAN interfaces (optionally configurable as a RS-485 according to user needs) • VG96-connector • simple jumper configuration allowing use of the Development Board with various PHYTEC Single Board Computers © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 11: The Tasking C166/St10 Embedded Development Environment

    Tasking a.out format. The IHEX166 Object-to-Hex converter converts an absolute object file into an Intel-hexfile that is suitable for programming into an EPROM device or downloading into external Flash on the PHYTEC phyCORE-167 target board. The Tasking software tool chain consists of the following executables: •...
  • Page 12 The C166 ANSI compiler and A166 assembler are designed speci- fically for the Infineon SAB 161, 163, 164, 165, 166, 167, and ST Microelectronics ST10/262 and future derivatives. The Tasking C166 compiler provides the fastest and smallest code using industry benchmarks. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 13 The evaluation version does not have a starting address res- triction and produces useful object code. This allows you to fully evaluate the features and power of Tasking products on a PHYTEC target board. The full version has no restrictions and is fully ANSI compliant.
  • Page 14 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 15: Getting Started

    Flash memory using FlashTools 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 16 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 Meßtechnik GmbH 2001 L-548e_1...
  • Page 17 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 Meßtechnik GmbH 2001 L-548e_1...
  • Page 18 QuickStart Instructions All software and tools for this phyCORE-167 Kit will be installed to the \PHYBasic directory on your hard-drive. In the next dialog you must choose whether to copy the selected documentation as *.pdf-files to your hard-drive or to install a link to the doc.
  • Page 19 The applicable Tasking tool chain must be installed to ensure successful completion of this QuickStart Instruction. Failure to install the proper software could lead to possible version conflicts, resulting in functional problems. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 20 These QuickStart Instructions and the demo software included on the CD-ROM have been specifically tailored for use with one another. In the following windows you can decide to install FlashTools 16W software and the Acrobat Reader. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 21 Getting Started Press Finish to complete the installation and decide if you want to begin the QuickStart Instruction immediately. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 22: Interfacing The Phycore-167 On The Development Board To A Host-Pc

    QuickStart Instructions 2.2 Interfacing the phyCORE-167 on the Development Board to a Host-PC Connecting phyCORE-167, mounted PHYTEC Development Board, to your computer is simple: • As shown in the figure below, if the phyCORE is not already pre- installed, mount it pins-down onto the Development Board’s interior receptacle footprint (X6).
  • Page 23: Figure 2: Power Connector

    Development Board to a host-PC and power supply. After executing a Reset and rendering the board in Bootstrap mode, you are now ready to program the phyCORE-167 on the Development Board. This phyCORE/Development Board combination shall also be referred to as “target hardware”.
  • Page 24: Downloading Example Code With Flashtools 16W

    QuickStart Instructions 2.3 Downloading Example Code with FlashTools 16W Start FlashTools 16W by double-clicking on the FlashTools 16W icon or by selecting FlashTools 16W from within the Programs|PHYTEC program group. • The Connect tab of the FlashTools 16W Worksheet window will now appear.
  • Page 25 Before further connection attempts, be sure to reset the target hardware and render it into Bootstrap mode as described in section 2.2. • After the data transfer you will see FlashTools 16W Worksheet window with the following tabs. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 26 QuickStart Instructions Sector Utilities allow erasure of individual sectors of Flash-Memory: Flash Information shows sector and address ranges in Flash-Memory: © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 27 Getting Started File Download downloads specified hexfiles to the target hardware: Protected Areas Information shows protected areas of Flash-Memory: © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 28 QuickStart Instructions Communication Setup provides you with the possibility to disconnect the target and reconnect with an equal one. Programming of several targets is possible for you thereby. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 29: Hello

    Type in the correct drive and path to the phyCORE-167 Demo directory (default location C:\PHYBasic\pC167\Demos\Tasking\Hello\hello.hex) and click Open. • Click on the Download button. You can watch the status of the download of the hello.hex into external Flash-Memory in the Download window. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 30 HyperTerminal included with Windows. • Start the HyperTerminal program within the Programs|Accessories bar. • The HyperTerminal main window will now appear: • Double-click on the HyperTerminal icon “Hypertrm” to create a new HyperTerminal session. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 31 “COM Direct” and advances you to the next HyperTerminal window. • The New Connections Properties window will now appear. Specify Direct to COM1 under the Connect Using combobox (be sure to indicate the correct COM setting for your system). © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 32 = 8; Parity = None; Stop Bits = 1; Flow Control = None. • Selecting OK advances you to the “COM Direct – HyperTerminal” monitoring window. Notice the connection status report in the bottom lower corner of the window. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 33 COM parameters and the RS-232 connection. The demo application within the file hello.hex initializes the serial port of your phyCORE-167 to 9600 baud. The initialization values are based on the assumption that the microcontroller runs at a 20 MHz internal clock frequency.
  • Page 34: Blinky

    FlashTools 16W Worksheet finishes • Next choose the File Download tab and click on the File Open button • Type the complete pathway and name of the file you wish to download C:\PHYBasic\pC167\Demos\Tasking\Blinky\blinky.hex directory (default location) © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 35 • Press Reset (S2) on the Development Board • Successful execution of the program will flash the LED with equal on and off durations You have now successfully downloaded and executed two pre- existing example programs in *.hex hexfile format. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 36 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 37: Getting More Involved

    After you start EDE, the window shown below appears. From this window you can create projects, edit files, configure tools, compile, assemble, link and start the debugger. Other 3 party tools such as emulators can also be started from here. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 38: Blinky

    3.2.1 Creating a New Project and Adding an Existing Source File Go to the Project menu and close all projects that might be open • Open the Project menu and choose New. The window as shown below appears. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 39 • In the line ’Filename’, enter the filename of the project you are creating. For this tutorial, enter the name Blinky2 and press Save. • Press OK in the Create a new Project Window. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 40 Project|Properties|Files, which enables easy edit of your file list. • Double clicking on the files which should be part of the project (in this example start.asm and Blinky2.c) results in the following window. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 41 C source file called blinky2.c and an existing Assembler file called start.asm. The next step is to modify the C source before building your project. This includes compiling, linking, locating and creating the hexfile. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 42: Modifying The Source Code

    /* delay for 225.000 counts wait (); /* call wait function P1_0 = 1; /* output to LED port for (i=0; i< 75000 ; i++) /* delay for 75.000 counts wait(); /* call wait function © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 43: Saving The Modifications

    To configure the CPU: Open the EDE|Project Options menu and choose CPU. Adjust the default settings by clicking Defaults. In CPU type select C167CR. Press OK to close the window after the modification. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 44 Adjust the default settings by clicking Default. Select the Intel Hex records for EPROM programmers (HEX) radio button and change the output format to Intel HEX 16 records. • Select the EDE|Linker\Locator Options...|Memory and specify the following settings © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 45 The Linker options are now suitable for the Blinky2 project, enabling you to build an absolute object file without taking into account debug- ging settings. The options lead to the generation of a *.map map file with included memory map. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 46: Building The Project

    Start FlashTools 16W • Double click on phyCORE • Select the correct module from the list and press the Connect button. • Select the correct serial port for your host-PC and a 9600 baud rate. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 47 If the modified hexfile properly downloads and executes, the LED should now flash in a different mode with different on and off durations. You have now modified source code, recompiled the code, created a modified download hexfile, and successfully executed this modified code. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 48: Hello

    • Choose OK to save the new project. At this point you have created a project called hello2.pjt consisting of a C source files called hello2.c, serio.c and an assembler file called start.asm. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 49: Modifying The Example Source

    • If there are no errors, the code is assembled and linked and the executable code is ready to be downloaded to the board. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 50: Downloading The Output File

    (default location) • Click on the Download button and view the download procedure to the board in the status window • Returning to the Communication tab, click on the Disconnect button • Exit FlashTools 16W. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 51: Starting The Terminal Emulation Program

    • Resetting the Development Board (at S2) will execute the hello2.hex file loaded into the Flash. • Successful execution will send the modified character string "PHYTEC... Stick It In!" to the HyperTerminal window. • Click the Disconnect icon • Close the HyperTerminal program...
  • Page 52 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 53: Debugging

    • EDE|Linker\Locator Options|Format select IEEE-695 for Tasking CrossView Pro and other ICE vendors (ABS) • EDE|Linker\Locator Options|Memory: No entries necessary in ROM/RAM areas • EDE|Linker\Locator Options|Small Model select Default: 64K linear near data in first segment • Rebuild the project © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 54 Configuration file. • The baud rate plus COM port can be set in EDE|CrossView Pro Options|Communication menu. Press OK to close the window after the modification. Press OK to close the window after the modification. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 55: Preparing The Target Hardware To Communicate With Crossview Pro

    Boot (S1) switch Since the required microcontroller portion to communicate with CrossView Pro will be automatically downloaded by CrossView Pro using the Bootstrap mode there is no further preparation of the target system. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 56: Starting The Debugger

    You may have to open any invisible window by opening the View menu and selecting the window to view. • For troubleshooting please refer to Appendix A: Troubleshooting. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 57: Using The Tasking Crossview Pro Debug Features

    • Structures can be viewed/modified in a similar way. Just double click on recordvar and select Add Watch to display the structure in the data window. A ‘+’ sign to the left shows a possible ‘expansion’ of the value. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 58: Single Stepping

    This is the memory area for the long array table. The recursive calculated factorial values of the variable loopvar are stored in this array. Single step through the for loop: for (loopvar = 0; loopvar <= 8; ++loopvar). © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 59: Stack Window

    • The program now hangs in an endless loop while (loopvar) since loopvar is never zero. • Set the variable loopvar to zero by modifying it’s content to reach the end of the program (which includes a simulated input demons- tration too). © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 60: Resetting Crossview Pro And The Phycore-167

    Almost all registers, including the system stack pointer and program counter are initialized. • The PHYTEC Development Board does not have a hardware NMI button. A NMI is the most reliable way to stop a running program. This is even more important when you are using the Bootstrap version of the Monitor because it is difficult to re-synchronize CrossView Pro and the monitor program.
  • Page 61: Advanced User Information

    Flash. Additionally, the re-programmable Flash device on the phyCORE-167 enables easy update of user code and the target application in which the phyCORE-167 has been implemented.
  • Page 62: Start.asm

    EDE according to the settings in EDE|CPU Options. Most important in combination with the phyCORE-167 is the correct Chip Select (CS) setup via the Buscon and Addrsel registers. Because the startup code is modified by macro preprocessor defines it is not necessary to copy the start.asm file (located in \lib\src folder)
  • Page 63: Linking And Locating

    User’s Guide in section 3.2.2, “Section Allocation”. It is required that all RAM data sections are located to any internal RAM of the C167 or to any external RAM of the phyCORE-167. All ROM code and –data sections must also be located to any internal non-volatile memory (e.g.
  • Page 64 For instance if you adjust Chip Select Signal /CS1 to be active within an address range of 1 MB and the actually memory size populating the phyCORE-167 is just 256 kByte, you will get three mirrors of your RAM. We recommend that you generate a *.map map file for your project and inspect the memory map information within this file.
  • Page 65: Debugging Using Monitor Kernel

    “ROM Debug Monitor Using Dual Vector Table of the CrossView Pro Debugger User’s Guide”. The sourcefiles of the monitor program are included in the full version of the product. The monitor kernel is royalty free and may be included in the customer application. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 66 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 67: Appendices A: Troubleshooting

    EDE|Project Options|Startup menu or take a look into the map file of your project. • the address window settings may be wrong. The RAM Bank should be mapped to address 0h. Check Buscon1 and Addrsel1 settings in EDE|CPU Options. © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 68: Placing Code Breakpoint At 0Xxxxxxx Failed: Memory Not Writeable

    RAM area. The error message is generated because parts of the application are allocated in read only memory. You can verify this by checking the projects mapfile (map). © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 69 How would you improve this manual? Did you find any mistakes in this manual? page Submitted by: Customer number: Name: Company: Address: Return to: PHYTEC Technologie Holding AG Postfach 100403 D-55135 Mainz, Germany Fax : +49 (6131) 9221-33 © PHYTEC Meßtechnik GmbH 2001 L-548e_1...
  • Page 70 Published by © PHYTEC Meßtechnik GmbH 2001 Ordering No. L-548e_1 Printed in Germany...

Table of Contents