NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
S5U1C63000A S1C63 PC-9800 S1C63000 S5U1C63000H1 IEEE-695 ICE63UPD ICE63 I63COM - Datasheet Archive
CMOS 4-BIT SINGLE CHIP MICROCOMPUTER S5U1C63000A Manual (S1C63 Family Assembler Package) NOTICE No part of this material may be
MF910-06a CMOS 4-BIT SINGLE CHIP MICROCOMPUTER S5U1C63000A S5U1C63000A Manual (S1C63 S1C63 Family Assembler Package) NOTICE No part of this material may be reproduced or duplicated in any form or by any means without the written permission of Seiko Epson. Seiko Epson reserves the right to make changes to this material without notice. Seiko Epson does not assume any liability of any kind arising out of any inaccuracies contained in this material or due to its application or use in any product or circuit and, further, there is no representation that this material is applicable to products requiring high level reliability, such as medical products. Moreover, no license to any intellectual property rights is granted by implication or otherwise, and there is no representation or warranty that anything made in accordance with this material will be free from any patent or copyright infringement of a third party. This material or portions thereof may contain technology or the subject relating to strategic products under the control of the Foreign Exchange and Foreign Trade Law of Japan and may require an export license from the Ministry of International Trade and Industry or other approval from another government agency. MS-DOS, Windows, Windows 95, Windows 98 and Windows NT are registered trademarks of Microsoft Corporation, U.S.A. PC-DOS, PC/AT, PS/2, VGA, EGA and IBM are registered trademarks of International Business Machines Corporation, U.S.A. NEC PC-9800 PC-9800 Series and NEC are registered trademarks of NEC Corporation. All other product names mentioned herein are trademarks and/or registered trademarks of their respective owners. © SEIKO EPSON CORPORATION 2001, All rights reserved. Configuration of product number Devices S1 C 63158 F 0A01 00 Packing specifications 00 : Besides tape & reel 0A : TCP BL 2 directions 0B : Tape & reel BACK 0C : TCP BR 2 directions 0D : TCP BT 2 directions 0E : TCP BD 2 directions 0F : Tape & reel FRONT 0G : TCP BT 4 directions 0H : TCP BD 4 directions 0J : TCP SL 2 directions 0K : TCP SR 2 directions 0L : Tape & reel LEFT 0M : TCP ST 2 directions 0N : TCP SD 2 directions 0P : TCP ST 4 directions 0Q : TCP SD 4 directions 0R : Tape & reel RIGHT 99 : Specs not fixed Specification Package D: die form; F: QFP Model number Model name C: microcomputer, digital products Product classification S1: semiconductor Development tools S5U1 C 63000 A1 1 00 Packing specifications 00: standard packing Version 1: Version 1 Tool type Hx : ICE Ex : EVA board Px : Peripheral board Wx : Flash ROM writer for the microcomputer Xx : ROM writer peripheral board Cx : C compiler package Ax : Assembler package Dx : Utility tool by the model Qx : Soft simulator Corresponding model number 63000: common to S1C63 S1C63 Family Tool classification C: microcomputer use Product classification S5U1: development tool for semiconductor products S1C63 S1C63 Family INTRODUCTION Introduction This document describes the development procedure from assembling source files to debugging. It also explains how to use each development tool of the "S1C63 S1C63 Family Assembler Package" common to all the models of the S1C63 S1C63 Family. Caution We are not responsible for any problems involving products you have manufactured using packed data created without the use of the tool contained in this package, or using packed data edited after being created using the tool contained in this package. How To Read the Manual This manual was edited particularly for those who are engaged in program development. Therefore, it assumes that the reader already possesses the following fundamental knowledge: · Basic knowledge about assembler language · Basic knowledge about the general concept of program development by an assembler · Basic operating methods for Windows®95/98 or Windows NT®4.0 Before installation See Chapter 1. Chapter 1 describes the composition of this package, and provides a general outline of each tool. Installation Install the tools following the installation procedure described in "setup_e.pdf". To understand the flow of program development See the program development flow in Chapter 2. For coding See the necessary parts in Chapter 4. Chapter 4 describes the grammar for the assembler language as well as the assembler functions. Also refer to the following manuals when coding: S1C63xxx Technical Manual Covers device specifications, and the operation and control method of the peripheral circuits. S1C63000 S1C63000 Core CPU Manual Has the instructions and details the functions and operation of the Core CPU. For debugging Chapter 8 gives detailed explanation of the debugger. Sections 8.1 to 8.8 give an overview of the functions of the debugger. See Section 8.9 for details of the debug commands. Also refer to the following manuals to understand operations of the In-Circuit Emulator (ICE) and the Peripheral Circuit Board S5U1C63xxxP: S5U1C63000H1 S5U1C63000H1 Manual (S1C63 S1C63 Family In-Circuit Emulator) Explains the functions and handling methods of the ICE. S5U1C63xxxP Manual (Peripheral Circuit Board for S1C63xxx) Covers the functions and handling methods of the peripheral circuit board that provides the hardware specifications of each model to the ICE. For details of each tool Chapters 3 to 8 explain the details of each tool. Refer to it if necessary. Once familiar with this package Refer to the listings of instructions and commands contained in Appendices. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON i INTRODUCTION Manual Notations This manual was prepared by following the notation rules detailed below: (1) Sample screens The sample screens provided in the manual are all examples of displays under Windows®95/98. These displays may vary according to the system or fonts used. (2) Names of each part The names or designations of the windows, menus and menu commands, buttons, dialog boxes, and keys are annotated in brackets [ ]. Examples: [Command] window, [File | Exit] menu item ([Exit] command in [File] menu), [Key Break] button, [q] key, etc. (3) Names of instructions and commands The CPU instructions and the debugger commands that can be written in either uppercase or lowercase characters are annotated in lowercase characters in this manual, except for user-specified symbols. (4) Notation of numeric values Numeric values are described as follows: Decimal numbers: Not accompanied by any prefix or suffix (e. g., 123, 1000). Hexadecimal numbers: Accompanied by the prefix "0x" (e. g., 0x0110, 0xffff). Binary numbers: Accompanied by the prefix "0b" (e. g., 0b0001, 0b10). However, please note that some sample displays may indicate hexadecimal or binary numbers not accompanied by any symbol. Moreover, a hexadecimal number may be expressed as xxxxh, or a binary number as xxxxb, for reasons of convenience of explanation. (5) Mouse operations The operation of pressing the left mouse button once, with the cursor (pointer) placed in the intended location, is expressed as "to click". The clicking operation of the right mouse button is expressed as "to right-click". To double-click: Operations of pressing the left mouse button twice in a row, with the cursor (pointer) placed in the intended location, are all expressed as "to double-click". To drag: The operation of clicking on a file (icon) with the left mouse button and holding it down while moving the icon to another location on the screen is expressed as "to drag". To select: The operation of selecting a menu command by clicking is expressed as "to select". To click: (6) Key operations The operation of pressing a specific key is expressed as "to enter a key" or "to press a key". A combination of keys using "+", such as [Ctrl]+[C] keys, denotes the operation of pressing the [C] key while the [Ctrl] key is held down. Sample entries through the keyboard are not indicated in [ ]. Moreover, the operation of pressing the [Enter] key in sample entries is represented by "". In this manual, all the operations that can be executed with the mouse are described only as mouse operations. For operating procedures executed through the keyboard, refer to the Windows manual or help screens. (7) General forms of commands, startup options, and messages Items given in [ ] are those to be selected by the user, and they will work without any key entry involved. An annotation enclosed in < > indicates that a specific name should be placed here. For example, needs to be replaced with an actual file name. Items enclosed in { } and separated with | indicate that you should choose an item. For example, {A | B} needs to have either A or B selected. (8) Development tool name ICE: Indicates S5U1C63000H1 S5U1C63000H1 (S1C63 S1C63 Family In-Circuit Emulator). ii EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CONTENTS Contents CHAPTER 1 GENERAL . 1 1.1 1.2 Features . 1 Tool Composition . 2 1.2.1 Composition of Package . 2 1.2.2 Outline of Software Tools . 2 1.3 1.4 1.5 CHAPTER 2 Working Environment . 3 Installation . 4 Directories and Files after Installation . 4 SOFTWARE DEVELOPMENT PROCEDURE . 6 2.1 2.2 Software Development Flow . 6 Development Using Work Bench . 7 2.2.1 Starting Up the Work Bench . 7 2.2.2 Creating a New Project . 8 2.2.3 Editing Source Files . 8 2.2.4 Configuration of Tool Options . 10 2.2.5 Building an Executable Object . 11 2.2.6 Debugging . 12 CHAPTER 3 WORK BENCH . 13 3.1 3.2 3.3 Features . 13 Starting Up and Terminating the Work Bench . 13 Work Bench Windows . 14 3.3.1 Window Configuration . 14 3.3.2 Window Manipulation . 15 3.4 Toolbar and Buttons . 19 3.4.1 Standard Toolbar . 19 3.4.2 Build Toolbar . 20 3.4.3 Window Toolbar . 20 3.4.4 Toolbar Manipulation . 21 3.4.5 [Insert into project] Button on a [Edit] Window . 21 3.5 Menus . 22 3.5.1 [File] Menu . 22 3.5.2 [Edit] Menu . 23 3.5.3 [View] Menu . 23 3.5.4 [Insert] Menu . 24 3.5.5 [Build] Menu . 24 3.5.6 [Tools] Menu . 25 3.5.7 [Window] Menu . 25 3.5.8 [Help] Menu . 25 3.6 Project and Work Space . 26 3.6.1 Creating a New Project . 26 3.6.2 Inserting Sources into a Project . 27 3.6.3 [Project] Window . 28 3.6.4 Opening and Closing a Project . 28 3.6.5 Files in the Work Space Folder . 29 3.7 Source Editor . 30 3.7.1 Creating a New Source or Header File . 30 3.7.2 Loading and Saving Files . 31 3.7.3 Edit Function . 32 3.7.4 Tag Jump Function . 35 3.7.5 Printing . 36 S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON iii CONTENTS 3.8 Build Task . 36 3.8.1 Preparing a Build Task . 36 3.8.2 Building an Executable Object . 36 3.8.3 Debugging . 37 3.8.4 Executing Other Tools . 38 3.9 Tool Option Settings . 40 3.9.1 Assembler Options . 40 3.9.2 Linker Options . 41 3.9.3 Debugger Options . 43 3.9.4 HEX Converter Options . 43 3.10 3.11 3.12 3.13 CHAPTER Work Bench Options . 44 Short-Cut Key List . 45 Error Messages . 45 Precautions . 46 4 ASSEMBLER . 47 4.1 4.2 Functions . 47 Input/Output Files . 47 4.2.1 Input File . 47 4.2.2 Output Files . 48 4.3 4.4 4.5 Starting Method . 49 Messages . 50 Grammar of Assembly Source . 51 4.5.1 Statements . 51 4.5.2 Instructions (Mnemonics and Pseudo-instructions) . 53 4.5.3 Symbols (Labels) . 54 4.5.4 Comments . 56 4.5.5 Blank Lines . 56 4.5.6 Register Names . 57 4.5.7 Numerical Notations . 57 4.5.8 Operators . 58 4.5.9 Location Counter Symbol "$" . 60 4.5.10 Optimization Branch Instructions for Old Preprocessor . 60 4.6 Section Management . 61 4.6.1 Definition of Sections . 61 4.6.2 Absolute and Relocatable Sections . 61 4.6.3 Sample Definition of Sections . 62 4.7 Assembler Pseudo-Instructions . 63 4.7.1 Include Instruction (#include) . 64 4.7.2 Define Instruction (#define) . 65 4.7.3 Numeric Define Instruction (#defnum) . 67 4.7.4 Macro Instructions (#macro . #endm) . 68 4.7.5 Conditional Assembly Instructions (#ifdef . #else . #endif, #ifndef. #else . #endif) . 70 4.7.6 Section Defining Pseudo-Instructions (.code, .data, .bss) . 72 4.7.7 Location Defining Pseudo-Instructions (.org, .align) . 74 4.7.8 Absolute Assembling Pseudo-Instruction (.abs) . 77 4.7.9 Symbol Defining Pseudo-Instruction (.set) . 78 4.7.10 Data Defining Pseudo-Instructions (.codeword, .word) . 79 4.7.11 Area Securing Pseudo-Instructions (.comm, .lcomm) . 80 4.7.12 Global Declaration Pseudo-Instruction (.global) . 81 4.7.13 List Control Pseudo-Instructions (.list, .nolist) . 81 4.7.14 Source Debugging Information Pseudo-Instructions (.stabs, .stabn) . 81 4.7.15 Comment Adding Function . 82 4.7.16 Priority of Pseudo-Instructions . 82 iv EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CONTENTS 4.8 Relocatable List File . 83 4.9 Sample Executions . 84 4.10 Error/Warning Messages . 87 4.10.1 Errors . 87 4.10.2 Warning . 88 4.11 Precautions . 88 CHAPTER 5 LINKER . 89 5.1 5.2 Functions . 89 Input/Output Files . 89 5.2.1 Input Files . 89 5.2.2 Output Files . 90 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 5.12 Starting Method . 91 Messages . 94 Linker Command File . 95 Link Map File . 96 Symbol File . 97 Absolute List File . 98 Cross Reference File . 99 Linking . 100 Branch Optimization Function . 102 Error/Warning Messages . 103 5.12.1 Errors . 103 5.12.2 Warning . 103 5.13 Precautions . 104 CHAPTER 6 HEX CONVERTER . 105 6.1 6.2 Functions . 105 Input/Output Files . 105 6.2.1 Input Files . 105 6.2.2 Output Files . 105 6.3 6.4 6.5 Starting Method . 106 Messages . 107 Output Hex Files . 108 6.5.1 Hex File Configuration . 108 6.5.2 Motorola-S Format . 108 6.5.3 Intel-HEX Format . 109 6.5.4 Conversion Range . 109 6.6 Error/Warning Messages . 110 6.6.1 Errors . 110 6.6.2 Warning . 110 6.7 CHAPTER Precautions . 110 7 DISASSEMBLER . 111 7.1 7.2 Functions . 111 Input/Output Files . 111 7.2.1 Input Files . 111 7.2.2 Output Files . 111 S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON v CONTENTS 7.3 7.4 7.5 7.6 Starting Method . 112 Messages . 113 Disassembling Output . 114 Error/Warning Messages . 117 7.6.1 Errors . 117 7.6.2 Warning . 117 CHAPTER 8 DEBUGGER . 118 8.1 8.2 Features . 118 Input/Output Files . 118 8.2.1 Input Files . 118 8.2.2 Output Files . 119 8.3 Starting Method . 120 8.3.1 Start-up Format . 120 8.3.2 Start-up Options . 120 8.3.3 Start-up Messages . 121 8.3.4 Hardware Check at Start-up . 121 8.3.5 Method of Termination . 123 8.4 Windows . 124 8.4.1 Basic Structure of Window . 124 8.4.2 [Command] Window . 126 8.4.3 [Source] Window . 127 8.4.4 [Data] Window . 129 8.4.5 [Register] Window . 129 8.4.6 [Trace] Window . 130 8.5 Tool Bar . 131 8.5.1 Tool Bar Structure . 131 8.5.2 [Key Break] Button . 131 8.5.3 [Load File] and [Load Option] Buttons . 131 8.5.4 [Source], [Mix], and [Unassemble] Buttons . 131 8.5.5 [Go], [Go to Cursor], [Go from Reset], [Step], [Next], and [Reset] Buttons . 131 8.5.6 [Break] Button . 132 8.5.7 [Help] Button . 132 8.6 Menu . 133 8.6.1 Menu Structure . 133 8.6.2 [File] Menu . 133 8.6.3 [Run] Menu . 133 8.6.4 [Break] Menu . 134 8.6.5 [Trace] Menu . 134 8.6.6 [View] Menu . 135 8.6.7 [Option] Menu . 135 8.6.8 [Windows] Menu . 135 8.6.9 [Help] Menu . 135 8.7 Method for Executing Commands . 136 8.7.1 Entering Commands from Keyboard . 136 8.7.2 Executing from Menu or Tool Bar . 138 8.7.3 Executing from a Command File . 139 8.7.4 Log File . 140 8.8 Debug Functions . 141 8.8.1 Loading Program and Data Files . 141 8.8.2 Source Display and Symbolic Debugging Function . 142 8.8.3 Displaying and Modifying Program, Data, Option Data and Register . 144 8.8.4 Executing Program . 146 8.8.5 Break Functions . 149 vi EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CONTENTS 8.8.6 Trace Functions . 152 8.8.7 Operation of Flash Memory . 155 8.8.8 Coverage . 156 8.8.9 Writing Data to the FPGA on the Standard Peripheral Circuit Board . 156 8.9 Command Reference . 157 8.9.1 Command List . 157 8.9.2 Reference for Each Command . 158 8.9.3 Program Memory Operation . 159 a / as (assemble mnemonic) . 159 pe (program memory enter) . 161 pf (program memory fill) . 162 pm (program memory move) . 163 8.9.4 Data Memory Operation . 164 dd (data memory dump) . 164 de (data memory enter) . 166 df (data memory fill) . 168 dm (data memory move) . 169 dw (data memory watch) . 170 8.9.5 Command to Display Option Information . 172 od (option data dump) . 172 8.9.6 Register Operation . 174 rd (register display) . 174 rs (register set) . 175 8.9.7 Program Execution . 177 g (go) . 177 gr (go after reset CPU) . 179 s (step) . 180 n (next) . 182 8.9.8 CPU Reset . 183 rst (reset CPU) . 183 8.9.9 Break . 184 bp (break point set) . 184 bc / bpc (break point clear) . 186 bd (data break) . 187 bdc (data break clear) . 189 br (register break) . 190 brc (register break clear) . 192 bs (sequential break) . 193 bsc (sequential break clear) . 195 bsp (break stack pointer) . 196 bl (break point list) . 198 bac (break all clear) . 199 8.9.10 Program Display . 200 u (unassemble) . 200 sc (source code) . 202 m (mix) . 204 8.9.11 Symbol Information . 206 sy (symbol list) . 206 8.9.12 Load File . 207 lf (load file) . 207 lo (load option) . 208 8.9.13 Flash Memory Operation . 209 lfl (load from flash memory) . 209 sfl (save to flash memory) . 211 efl (erase flash memory) . 213 8.9.14 Trace . 214 tm (trace mode display/set) . 214 td (trace data display) . 216 ts (trace search) . 219 tf (trace file) . 221 S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON vii CONTENTS 8.9.15 Coverage . 222 cv (coverage) . 222 cvc (coverage clear) . 223 8.9.16 Command File . 224 com (execute command file) . 224 cmw (execute command file with wait) . 225 rec (record commands to a file) . 226 8.9.17 log . 227 log (log) . 227 8.9.18 Map Information . 228 ma (map information) . 228 8.9.19 Mode Setting . 229 md (mode) . 229 8.9.20 FPGA Operation . 232 xfer/xfers (xilinx fpga data erase) . 232 xfwr/xfwrs (xilinx fpga data write) . 233 xfcp/xfcps (xilinx fpga data compare) . 234 xdp/xdps (xilinx fpga data dump) . 235 8.9.21 Quit . 236 q (quit) . 236 8.9.22 Help . 237 ? (help) . 237 8.10 Status/Error/Warning Messages . 238 CHAPTER 9 FUNCTION OPTION GENERATOR . 240 9.1 9.2 9.3 Outline of the Function Option Generator winfog . 240 Input/output Files . 240 Using winfog . 241 9.3.1 Starting Up . 241 9.3.2 Window . 242 9.3.3 Menus and Toolbar Buttons . 243 9.3.4 Operation Procedure . 244 9.4 9.5 CHAPTER Error Messages . 247 Example Output Files . 248 10 SEGMENT OPTION GENERATOR . 249 10.1 Outline of Segment Option Generator winsog . 249 10.2 Input/output Files . 249 10.3 Using winsog . 250 10.3.1 Starting Up . 250 10.3.2 Window . 252 10.3.3 Menus and Toolbar Buttons . 253 10.3.4 Option Selection Buttons . 254 10.3.5 Operation Procedure . 254 10.4 Error Messages . 260 10.5 Example Output Files . 261 CHAPTER 11 MELODY ASSEMBLER . 262 11.1 Outline of the Melody Assembler winmla . 262 11.2 Input/output Files . 262 viii EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CONTENTS 11.3 Using winmla . 263 11.3.1 Starting Up . 263 11.3.2 Window . 264 11.3.3 Menus and Toolbar Buttons . 265 11.3.4 Operation Procedure . 266 11.4 Melody Data . 269 11.4.1 Outline of Melody Data . 269 11.4.2 Melody Data Creation Procedure . 269 11.4.3 Method of Creating Melody Data . 270 11.4.4 Description of Melody Data . 271 11.4.5 Precautions . 274 11.5 Error Messages . 275 11.6 Error Symbols . 276 11.7 Sample Files . 277 CHAPTER 12 MASK DATA CHECKER . 281 12.1 Outline of the Mask Data Checker winmdc . 281 12.2 Input/Output Files . 281 12.3 Using winmdc . 282 12.3.1 Starting Up . 282 12.3.2 Menus and Toolbar Buttons . 283 12.3.3 Operation Procedure . 284 12.4 Error Messages . 287 12.5 Example Output File . 288 APPENDIX QUICK REFERENCE S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON ix CHAPTER 1: GENERAL CHAPTER 1 GENERAL 1.1 Features The S1C63 S1C63 Family Assembler Package contains software development tools that are common to all the models of the S1C63 S1C63 Family. The package comes as an efficient working environment for development tasks, ranging from source program assembly to debugging. Its principal features are as follows: Simple composition A task from assembly to debugging can be made with minimal tools. Integrated working environment A Windows-based integrated environment allows the tool chain to be used on its Windows GUI interface . Modular programming The relocatable assembler lets you develop a program which is made up of multiple sources. This makes it possible to keep a common part independently and to use it as a part or a basis for the next program. Source debugging A debugger can display an assembler source to show its execution status and allow debugging operations on it. This makes debugging much easier to perform. Common to all S1C63 S1C63 chips The tools included in this package are common to all S1C63 S1C63 Family models except for several chip dependent masking tools ("Dev" tools). The chip dependent information is read from the ICE parameter file for each chip. Complete compatibility with old syntax sources By supporting old syntax, existing sources written for old 63 tools are available with these new tools. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 1 CHAPTER 1: GENERAL 1.2 Tool Composition 1.2.1 Composition of Package The S1C63 S1C63 Family Assembler Package contains the items listed below. When it is unpacked, make sure that all items are supplied. 1) CD-ROM (Tools and PDF manuals are included) . One 2) Warranty card . One each in English and Japanese 3) Registration card . One each in English and Japanese 1.2.2 Outline of Software Tools The following shows the outlines of the software tools included in the package: Assembler (as63.exe) Converts the mnemonic of the source files into object codes (machine language) of the S1C63000 S1C63000. The results are output in a relocatable object file. This assembler includes preprocessing functions such as macro definition/call, conditional assembly, and file-include functions. Linker (lk63.exe) Links the relocatable objects created by the assembler by fixing the memory locations, and creates executable absolute object codes. The linker also provides an auto EXT insertion/correction function allowing the programmer to create sources without having to know branch destination ranges. Hex converter (hx63.exe) Converts an absolute object in IEEE-695 IEEE-695 format output from the linker into ROM-image data in Motorola-S format or Intel-HEX format. This conversion is needed when making the ROM or when creating mask data using the mask data checker. Disassembler (ds63.exe) Disassembles an absolute object file in IEEE-695 IEEE-695 format or a hex file in Motorola-S format, and restores it to a source format file. The restored source file can be processed in the assembler/linker/hex converter to obtain the same object or hex file. Debugger (db63.exe) This software performs debugging by controlling the ICE hardware tool. Commands that are used frequently, such as break and step, are registered on the tool bar, minimizing the necessary keyboard operations. Moreover, sources, registers, and command execution results can be displayed in multiple windows, with resultant increased efficiency in the debugging tasks. Work Bench (wb63.exe) This software provides an integrated development environment with Windows GUI. Creating/ editing source files, selecting files and major start-up options, and the start-up of each tool can be made with simple Windows operations. 2 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 1: GENERAL The tools listed below are Windows GUI applications for creating mask data. A device information definition file (s1c63xxx.ini) is required to run these tools. The CD-ROM contains the device information definition files for the models supported with the following tools. For unsupported models, model specific Development Tools are provided. Function option generator (winfog.exe) This tool creates an ICE function option setup file after selecting the mask options of the S1C63xxx and the function option document file that is necessary to generate IC mask patterns. You can create function option data by selecting the appropriate item using the check boxes. Segment option generator (winsog.exe) This tool creates an ICE segment option setup file after selecting the segment options of the S1C63xxx and the segment option document file that is necessary to generate IC mask patterns. You can create segment assignment data by merely clicking on the display memory map and segment decode table shown on the window. The winsog is used only for the model that has segment options. Melody assembler (winmla.exe) This tool converts the melody data created using an editor into the melody ROM and melody option data for the S1C63xxx melody generator. The winmla is used only for the model with a melody output function. Mask data checker (winmdc.exe) This tool checks the data in development-completed program ROM/data ROM files and option document files to create the mask data file that will be presented to Seiko Epson. 1.3 Working Environment To use the S1C63 S1C63 Family Assembler Package, the following conditions are necessary: Personal computer An IBM PC/AT or a compatible machine which is equipped with a CPU equal to or better than a Pentium 75 MHz, and 32MB or more of memory is recommended. To use the optional In-Circuit Emulator ICE, the personal computer also requires a serial port (with a D-sub 9 pin). Display A display unit capable of displaying 800 × 600 dots or more is necessary. Hard disk and CD-ROM drive Since the installation is done from a CD-ROM to a hard disk, a CD-ROM drive and a hard disk drive are required. Mouse A mouse is necessary to operate the tools. System software The S1C63 S1C63 Family Assembler Package supports Microsoft® Windows®95 (English or Japanese), Windows®98 (English or Japanese) and Windows NT®4.0 (English or Japanese). Other development tools To debug the target program, the optional In-Circuit Emulator and a Peripheral Circuit Board S5U1C63xxxP are needed as the hardware tools. The S5U1C63xxxP board is prepared for each S1C63 S1C63 model. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 3 CHAPTER 1: GENERAL 1.4 Installation The supplied CD-ROM contains the installer (Setup.exe) that installs the tools. To install the tools, start up the "Setup.exe" and follow the instructions in the dialog boxes that will be appeared. For more information on the installation procedure, please refer to "setup_e.pdf" on the CDROM. 1.5 Directories and Files after Installation The installer copies the following files in the specified directory (default is "C:\EPSON\S1C63 S1C63\"): [EPSON\S1C63 S1C63] README_E.TXT README_J.TXT . ReadMe document (English) . ReadMe document (Japanese) [\BIN] WB63.EXE AS63.EXE LK63.EXE HX63.EXE DS63.EXE DB63.EXE S1C63 S1C63.CNT S1C63 S1C63.HLP . . S1C63 S1C63 Family Assembler Package Tool . Work bench . Assembler . Linker . Hex converter . Disassembler . Debugger . Help index . Help contents . Other related files [\DEV] [\BIN] WINFOG.EXE WINSOG.EXE WINMLA.EXE WINMDC.EXE . S1C63 S1C63 Family Development Tool for Windows . Function option generator . Segment option generator . Melody assembler . Mask data checker [\63xxx] S1C63xxx.INI PAR63xxx.PAR C63xxx.FSA C63xxx.SSA : . Model-dependent files . Device information definition file . Parameter file . Sample function option HEX file (for ICE configuration) . Sample segment option HEX file (for ICE configuration) [\WRITER] [\6xxxx] ( \6Pxxx or \6Fxxx) [\URW2] US6xxxx.EXE . ROM Writer II control software (English) JP6xxxx.EXE . ROM Writer II control software (Japanese) 6xxxx.FRM . Firmware . . Other related files : Refer to the technical manual for details of the ROM Writer II. [\ICE] [\ICE63UPD ICE63UPD] TM63.EXE ICE63 ICE63.COM I63COM I63COM.O I63.PAR [\FPGA] C63xxx.MOT : 4 . ICE firmware updater to support standard peripheral circuit board . FPGA data to configure standard peripheral circuit board EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 1: GENERAL [\DOC] [\ENGLISH] REL_xxxx_E.TXT MANUAL_E.PDF QUICK_E.PDF [\HARD] xxxx_E.PDF [\JAPANESE] REL_xxxx_J.TXT MANUAL_J.PDF QUICK_J.PDF [\HARD] xxxx_J.PDF . Document folder (English) . Tool release note . This manual in PDF format . Quick reference in PDF format . Hardware development tool manuals in PDF format . Document folder (Japanese) . Tool release note . This manual in PDF format . Quick reference in PDF format . Hardware development tool manuals in PDF format Online manual in PDF format The online manuals are provided in PDF format, so Adobe Acrobat Reader Ver. 4.0 or later is needed to read it. Files for future release models The files for future release models may be provided in FDs. Refer to the Readme file included in the FD for installation. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 5 CHAPTER 2: SOFTWARE DEVELOPMENT PROCEDURE CHAPTER 2 SOFTWARE DEVELOPMENT PROCEDURE This chapter outlines a basic development procedure. 2.1 Software Development Flow Figure 2.1.1 represents a flow of software development work. Work Bench wb63 file.MAK Make file file.S or file.MS Assembly source file(s) S1C63xxx Development Tool file.par Assembler as63 Assembly list file(s) Linker command file file.LST file.O Object file(s) file.CM Function Option Generator winfog file.MS file.FSA Preprocessed source file(s) file.ABS Link map file file.MAP Absolute object file file.ALS Absolute list file Cross file.XRF reference file HEX converter hx63 Intel-HEX format files file.FDC Function option HEX file Function option document file Segment Option Generator winsog Linker lk63 Symbol file file.SYM file.ini file.SSA file.SDC Segment option HEX file Melody data file Segment option document file file.MDT Melody Assembler winmla Motorola-S format files file.MSA fileH.HEX file.HSA fileL.HEX or file.LSA fileC.HEX file.CSA file.MDC Melody ROM Melody ROM option option HEX file document file Disassembler ds63 Mask Data Checker winmdc file.MS file.PAn Disassembled source file SEIKO EPSON Mask data file Debugger db63 In-Circuit Emulator Fig. 2.1.1 Software development flow The work bench provides an integrated development environment from source editing to debugging. Tools such as the assembler and linker can be invoked from the work bench. The tools can also be invoked individually from the DOS prompt. Refer to the respective chapter for details of each tool. Some models provide other development tools (fog63xxx, sog63xxx, etc.) instead of the "S1C63xxx Development Tool" shown above. Those model dependent tools are not covered in this manual. For details, refer to the tool manual associated with each specific model. 6 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 2: SOFTWARE DEVELOPMENT PROCEDURE 2.2 Development Using Work Bench This section shows a basic development procedure using the work bench wb63. Refer to Chapter 3, "Work Bench", for operation details. 2.2.1 Starting Up the Work Bench Start up the work bench by choosing "WorkBench63" from the program menu. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 7 CHAPTER 2: SOFTWARE DEVELOPMENT PROCEDURE 2.2.2 Creating a New Project The work bench manages necessary file and tool setting information as a project. First a new project file should be created. 1. Select [New] from the [File] menu (or click the [New] button). [New] button The [New] dialog box appears. 2. Select [EPSON Project File] and click [OK]. The [Project] dialog box appears. 3. Enter a project name, select an ICE parameter file and select a directory, then click [OK]. The [ICE parameter file:] box lists the parameter files that exist in the "dev63" directory. The work bench creates a folder (directory) with the specified project name as a work space, and puts the project file (.epj) into the folder. The specified project name will also be used for the absolute object and other files. Created project [Project] window 2.2.3 Editing Source Files The work bench has an editor function. This makes it possible to edit source files without another editor. To create a new source file: 1. Select [New] from the [File] menu (or click the [New] button). [New] button The [New] dialog box appears. 2. Select [EPSON Assembly Source File] and click [OK]. 8 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 2: SOFTWARE DEVELOPMENT PROCEDURE A new edit window appears. [Edit] window 3. Enter source codes in the [Edit] window. 4. Save the source in a file by selecting [Save] from the [File] menu (or clicking the [Save] button). [Save] button S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 9 CHAPTER 2: SOFTWARE DEVELOPMENT PROCEDURE 5. Click the [Insert into project] button on the [Edit] window. [Insert into project] button The created source file is added in the project. To add existing source files, use [Files into project.] in the [Insert] menu. It can also be done by dragging source files from Windows Explorer to the project window. Create necessary source files and add them into the project. Sample list in the [Project] window The added source files are listed in the project window. Double-clicking a listed source file name opens the edit window. 2.2.4 Configuration of Tool Options The work bench supports all the start up options of each tool and they can be selected in a dialog box. A make process for generating an executable object will be configured based on the settings. In addition to option selection, command files for the linker and debugger can be configured here. To set tool options: 1. Select [Setting.] from the [Build] menu. A dialog box appears. 2. Configure options if necessary. Check box items can be selected by clicking. Items in the list can be toggled or entered by doubleclicking. Refer to Chapter 3, "Work Bench", for details of the [Settings] dialog box. 10 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 2: SOFTWARE DEVELOPMENT PROCEDURE 2.2.5 Building an Executable Object To make an executable object file: 1. Select [Build] from the [Build] menu (or click the [Build] button). [Build] button This will invoke the assembler and linker to create an executable object file. If a HEX file format (Intel HEX or Motorola S) is selected by the [Output format] box, the HEX converter will be invoked after linking. By default, an absolute object file in IEEE-695 IEEE-695 format will be created. [Output format] box Messages delivered from each executed tool are displayed in the [Output] window. The work bench has a tag-jump function that jumps to the source line in which an error has occurred by double-clicking a source syntax error message that appears in the [Output] window. It opens the corresponding source window if it is closed. Linked with the corresponding source line [Output] window In the build task, a general make process is executed to update the least necessary files. To rebuild all the files without the make function, select [Rebuild All] from the [Build] menu (or click the [Rebuild All] button). [Rebuild All] button To invoke the assembler only to correct syntax errors, select [Assemble] in the [Built] menu (or click the [Assemble] button). [Assemble] button S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 11 CHAPTER 2: SOFTWARE DEVELOPMENT PROCEDURE 2.2.6 Debugging To debug the executable object: 1. Select [Debug] from the [Build] menu (or click the [Debug] button). [Debug] button The debugger starts up with the specified ICE parameter file and then loads the executable object file. Note: Make sure that the ICE is ready to debug before invoking the debugger. Refer to the ICE hardware manual for settings and startup method of the ICE. For the debugging functions and operations, refer to Chapter 8, "Debugger". 12 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH CHAPTER 3 WORK BENCH This chapter describes the functions and operating method of the Work Bench wb63. 3.1 Features The Work Bench wb63 provides an integrated operating environment ranging from editing source files to debugging. Its functions and features are summarized below: · Source edit function that supports copy/paste, find/replace, print, label jump and tag jump from error messages. · Allows simple management of all necessary files and information as a project. · General make process to invoke necessary tools and to update the least necessary files. · Supports all options of the assembler, linker, HEX converter, disassembler and debugger. · Windows GUI interface for simple operation. 3.2 Starting Up and Terminating the Work Bench To start up the work bench Choose "WorkBench63" from the [Program] menu to start up the work bench. If "WorkBench63" is not registered in the [Program] menu, it means that the installation was not successful. Therefore, reinstall the tools . When the work bench starts up, the window shown below appears. To terminate the work bench Select [Exit] from the [File] menu. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 13 CHAPTER 3: WORK BENCH 3.3 Work Bench Windows 3.3.1 Window Configuration Menu bar [Project] window Toolbar [Edit] window [Output] window Status bar The work bench has three types of windows: [Edit] window, [Project] window and [Output] window. [Edit] window This window is used for editing a source file. A standard text file can also be displayed in this window. Two or more windows can be opened in the edit window area. When an assembly source file is opened, the source is displayed with in colors according to the contents. The default colors are shown below. S1C63 S1C63 instructions: Black Preprocess (#) pseudo-instructions: Dark brown Assemble (.) pseudo-instructions: Blue Labels: Light brown Comments: Green These colors can be changed by the [Tools | Options ] menu command (refer to Section 3.10). [Project] window This window shows the currently opened work space folder and lists all the source files in the project, with a structure similar to Windows Explorer. Double-clicking a source file icon opens the source file in the [Edit] window. 14 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH [Output] window This window displays the messages delivered from the executed tools in a build or assemble process. Double-clicking a syntax error message with a source line number displayed in this window activates or opens the [Edit] window of the corresponding source so that the source line in which the error has occurred can be viewed. Menu bar Refer to Section 3.5. Toolbar Refer to Section 3.3. Status bar Shows help messages when the mouse cursor is placed on a menu item or a button. It also indicates the cursor position in the [Edit] window and Key lock status (Num lock, Caps lock, Scroll lock). 3.3.2 Window Manipulation Resizing the windows | | | | Each window area can be resized by dragging the window boundary. The size information is saved when the work bench is terminated. So the same window layout will appear at the next time the work bench starts up. Double click Floating and docking the [Project] and [Output] window The [Project] window and the [Output] window can be made a floating window by doubleclicking the window boundary and the floating window can be moved and resized in the work bench window. The floating window will be restored to a docking window by double clicking the window's title bar or dragging the title bar towards an edge of the work bench window. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 15 CHAPTER 3: WORK BENCH Closing the [Project] and [Output] window The [Project] window and the [Output] window can be closed by selecting [Project Window] and [Output Window] from the [View] menu, respectively. To open them, select the menu items again. Maximizing the [Edit] window area The [Edit] window area can be maximized to the full screen size by selecting [Full Screen] from the [View] menu. All other windows and toolbars are hidden behind the [Edit] window area. To return it to the normal display, click the button that appears on the screen. This button can be moved anywhere in the screen by dragging its title bar. Pressing the [ESC] key also returns the window to the normal display. Opening/Closing [Edit] windows An [Edit] window opens when a source file (text file) is loaded using a menu, button or a file icon in the [Project] window, or when a new source is created. [Edit] windows close by clicking the [Close] box of each window or selecting [Close] from the [File] menu. When a project file is saved, the [Edit] window information (files opened, size and location) is also saved. So the next time the project opens, editing can begin in the saved condition. Arrangement of the [Edit] windows The [Edit] windows being opened can be arranged similar to standard Windows applications. 1 Cascade windows Select [Cascade] from the [Window] menu or click the [Cascade Windows] button. [Cascade Windows] button 16 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH 2 Tile windows To tile windows vertically, select [Tile Vertically] from the [Window] menu or click the [Tile Vertically] button. [Tile Vertically] button To tile windows horizontally, select [Tile Horizontally] from the [Window] menu or click the [Tile Horizontally] button. [Tile Horizontally] button S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 17 CHAPTER 3: WORK BENCH 3 Maximizing an [Edit] window Click the [Maximize] button on the window title bar. The window will be maximized to the [Edit] window area size and other [Edit] windows will be hidden behind the active window. 4 Minimizing an [Edit] window Click the [Minimize] button on the window title bar. The window will be minimized as a window icon. The minimized icons can be arranged at the bottom of the [Edit] window area by selecting [Arrange Icons] from the [Window] menu. 5 Moving and resizing an [Edit] window The [Edit] window allows changing of its location and its size in the same way as the standard Windows applications if it is not maximized. Switching active [Edit] window Click the window to be activated if it can be viewed. Otherwise, select the window name (source file name) from the currently-opened window list in the [Window] menu. Scrolling display contents A standard scroll bar appears if the display contents exceed the display size of a window. Use it to scroll the display contents. The arrow keys can also be used. Showing and hiding the status bar The status bar can be shown or hidden by selecting [Status Bar] from the [View] menu. 18 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH 3.4 Toolbar and Buttons Tree types of toolbars have been implemented in the work bench: standard toolbar, build toolbar and window tool bar. Standard toolbar Build toolbar Window toolbar 3.4.1 Standard Toolbar This toolbar has the following standard buttons: [New] button Creates a new document. A dialog box will appear allowing selection from among three document types: assembly source, assembly header and project. [Open] button Opens a document. A dialog box will appear allowing selection of the file to be opened. [Save] button Saves the document in the active [Edit] window to the file. The file will be overwritten. This button becomes inactive if no [Edit] window is opened. [Save All] button Saves the documents of all [Edit] windows and the project information to the respective files. [Cut] button Cuts the selected text in the [Edit] window to the clipboard. [Copy] button Copies the selected text in the [Edit] window to the clipboard. [Paste] button Pastes the text copied on the clipboard to the current cursor position in the [Edit] window or replaces the selected text with the copied text. [Find] button Finds the specified word in the active [Edit] window. A dialog box will appear allowing specification of the word to be found and a search condition. [Find Next] button Finds next target word towards the end of the file. [Find Previous] button Finds next target word towards the beginning of the file. [Print] button Prints the document in the active [Edit] window. A standard print dialog will appear allowing a specific print condition. [Help] button Displays the help window. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 19 CHAPTER 3: WORK BENCH 3.4.2 Build Toolbar This tool bar has the following buttons and list boxes used to build a project: [Assemble] button Assembles the assembly source in the active [Edit] window. This button becomes active only when the active [Edit] window shows an assembly source file. [Build] button Builds the currently opened project using a general make process. [Rebuild All] button Builds the currently opened project. All the source files will be assembled regardless of whether they are updated or not. [Stop Build] button Stops the build process being executed. This button becomes active only while a build process is being executed. [ICE Parameter] pull-down list box Selects the ICE parameter file for the model being developed. In this box, all the ICE parameter files that exist in the "Dev63" directory are listed. [Output Format] pull-down list box Selects an executable object file format. Three types of formats are available: IEEE-695 IEEE-695 absolute object format, Intel HEX format and Motorola S format. The build process will generate an executable object in the format selected here. [HEX Convert] button Invokes the HEX converter to convert an absolute object into an Intel HEX object or a Motorola S object. A dialog box will appear allowing selection of an absolute object and options of the HEX converter. [Disassemble] button Invokes the disassembler to disassemble an absolute object. A dialog box will appear allowing selection of an absolute object and options of the disassembler. [Debug] button Invokes the debugger with the specified ICE parameter file. 3.4.3 Window Toolbar This tool bar has the following buttons used in window manipulation: [Cascade] button Cascades the opened [Edit] windows. [Tile Horizontally] button Tiles the opened [Edit] window horizontally. [Tile Vertically] button Tiles the opened [Edit] window vertically. 20 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH 3.4.4 Toolbar Manipulation Hiding and showing toolbars Each toolbar can be hidden if not needed. Select the toolbar name from the [View] menu. This operation toggles between hiding and showing the toolbar. Changing the toolbar location Toolbars can be moved to another location in the toolbar area by dragging them. If a toolbar is moved out of the toolbar area, it will be changed to a window. 3.4.5 [Insert into project] Button on a [Edit] Window [Insert into project] button When a source file (.s or .ms) is opened, the [Insert into project] button appears on the [Edit] window. It can be used to insert the source file into the current opened project. For other file types, the [Edit] window opens without the [Insert into project] button. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 21 CHAPTER 3: WORK BENCH 3.5 Menus 3.5.1 [File] Menu [New.] ([Ctrl]+[N]) Creates a new document. A dialog box will appear allowing selection from among three document types: assembly source, assembly header and project. [Open.] ([Ctrl]+[O]) Opens a document. A dialog box will appear allowing selection of the file to be opened. [Close] Closes the active [Edit] window. This menu item appears when an [Edit] window becomes active. [Open Workspace.] Opens a project. A dialog box will appear allowing selection of the project to be opened. [Close Workspace] Closes the currently opened project. This menu item becomes inactive if no project is opened. [Save] ([Ctrl]+[S]) The file names listed in this menu are recently used source and project files. Selecting one opens the file. The number of files to be listed can be selected by the [Tools | Options] menu command. Saves the document in the active [Edit] window to the file. The file will be overwritten. This menu item appears when an [Edit] window becomes active. [Save As.] Saves the document in the active [Edit] window with another file name. A dialog box will appear allowing specification of a save location and a file name. This menu item appears when an [Edit] window becomes active. [Save All] Saves the documents of all [Edit] windows and the project information to the respective files. [Print.] ([Ctrl]+[P]) Prints the document in the active [Edit] window. A standard [print] dialog box will appear allowing a specific print condition. This menu item appears when an [Edit] window becomes active. [Print Preview] Displays a print image of the document in the active [Edit] window. This menu item appears when an [Edit] window becomes active. [Page Setup.] Displays a dialog box for selecting paper and printer. 22 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH 3.5.2 [Edit] Menu [Undo] ([Ctrl]+[Z]) Undoes the previous executed operation in the [Edit] window. [Cut] ([Ctrl]+[X]) Cuts the selected text in the [Edit] window to the clipboard. [Copy] ([Ctrl]+[C]) Copies the selected text in the [Edit] window to the clipboard. [Paste] ([Ctrl]+[V]) Pastes the text copied on the clipboard to the current cursor position in the [Edit] window or replaces the selected text with the copied text. [Select All] ([Ctrl]+[A]) Selects all text in the active [Edit] window. [Find.] ([Ctrl]+[F]) Finds the specified word in the active [Edit] window. A dialog box will appear allowing specification of the word to be found and a search condition. [Replace] ([Ctrl]+[H]) Replaces the specified words in the active [Edit] window with one another. A dialog box will appear allowing specification of the words. [Go To] ([Ctrl]+[G]) Jumps to the specified line or label in the active [Edit] window. A dialog box will appear allowing specification of a line number or a label name. 3.5.3 [View] Menu [Standard Bar] Shows or hides the standard toolbar. [Status Bar] Shows or hides the status bar located at the bottom of the work bench window. [Output Window] Opens or closes the [Output] window. [Project Window] Opens or closes the [Project] window. [Build Bar] Shows or hides the build toolbar. [Window Bar] Shows or hides the window toolbar. [Full Screen] Maximizes the [Edit] window area to the full screen size. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 23 CHAPTER 3: WORK BENCH 3.5.4 [Insert] Menu [File.] Inserts the specified file to the current cursor position in the [Edit] window or replaces the selected text with the contents of the specified file. A dialog box will appear allowing selection of the file to be inserted. [Files into project.] Adds the specified source file in the currently opened project. A dialog box will appear allowing selection of the file to be added. 3.5.5 [Build] Menu [Assemble] ([Ctrl]+[F7]) Assembles the assembly source in the active [Edit] window. This menu item becomes active only when the active [Edit] window shows an assembly source file. [Build] ([F7]) Builds the currently opened project using a general make process. [Rebuild All] Builds the currently opened project. All the source files will be assembled regardless of whether they are updated or not. [Stop Build] ([Ctrl]+[Break]) Stops the build process being executed. This button become active only while a build process is being executed. [Debug] ([F5]) Invokes the debugger with the specified ICE parameter file. [Settings.] ([Alt]+[F7]) Displays a dialog box for selecting tool options. [ICE parameter file.] Displays a dialog box for selecting an ICE parameter file. [Output Format.] Displays a dialog box for selecting an executable object file format. Three types of formats are available: IEEE-695 IEEE-695 absolute object format, Intel HEX format and Motorola S format. The build process will generate an executable object in the format selected here. 24 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH 3.5.6 [Tools] Menu [HEX Converter.] Invokes the HEX converter to convert an absolute object into an Intel HEX object or Motorola S object. A dialog box will appear allowing selection of an absolute object and options for the HEX converter. [Disassembler.] Invokes the disassembler to disassemble an absolute object. A dialog box will appear allowing selection of an absolute object and options for the disassembler. [WinFOG] Invokes the function option generator winfog. [WinSOG] Invokes the segment option generator winsog. [WinMLA] Invokes the melody assembler winmla. [WinMDC] Invokes the mask data checker winmdc. [Options.] Displays a dialog box for selecting work bench options such as character colors in the [Edit] window and a printing font. 3.5.7 [Window] Menu This menu appears when an [Edit] window is opened. [Cascade] Cascades the opened [Edit] windows. [Tile Horizontally] Tiles the opened [Edit] window horizontally. [Tile Vertically] Tiles the opened [Edit] window vertically. [Arrange Icons] Arranges the minimized [Edit] window icons at the bottom of the [Edit] window area. [Close All] Closes all the [Edit] windows opened. 3.5.8 [Help] Menu [Help] Displays the [Help] window. [About WB63.] Displays a dialog box showing the version of the work bench. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 25 CHAPTER 3: WORK BENCH 3.6 Project and Work Space The work bench manages a program development task using a work space folder and a project file that contains file and other information necessary for invoking the development tools. 3.6.1 Creating a New Project A new project file can be created by the following procedure: 1. Select [New] from the [File] menu or click the [New] button. [New] button The [New] dialog box appears. 2. Select [EPSON Project File] and click [OK]. The [Project] dialog box appears. 3. Enter a project name, select an ICE parameter file and select a directory, then click [OK]. The [ICE parameter file:] box lists the parameter files that exist in the "dev" directory. The work bench creates a folder (directory) with the specified project name as a work space, and puts the project file (.epj) into the folder. If a folder which has the same name as that of a specified one already exists in the specified location, the work bench uses the folder as the work space. Thus you can specify a folder in which sources are created. The specified project name will also be used for the absolute object and other files. 26 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH 3.6.2 Inserting Sources into a Project The sources created must be inserted into the project. To insert a source into a project, use one of the four methods shown below: 1. [Insert | Files into project.] menu item A dialog box appears when this menu item is selected. Choose a source file from the list box and then click [Open]. 2. [File | Open.] menu item or [Open] button [Open] button A dialog box appears when this menu item or button is selected. Choose a source file from the list box and select the [Into project] button, then click [Open]. 3. [Insert into project] button on the [Edit] window [Insert into project] button When the source file has been opened, click the [Insert into project] button on the [Edit] window. Do not forget to save the source to the file before inserting into the project. 4. Dragging source files on the [Project] window Drag source files from Windows Explorer to the [Project] window. These files will be added to the current project. When a source file is inserted into the project, the source file name appears in the [Project] window. Removing a source from the project To remove a source file from the project, select the source in the [Project] window and then press the [Delete] key. This removes only the source information, and does not delete the actual source file. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 27 CHAPTER 3: WORK BENCH 3.6.3 [Project] Window The [Project] window shows the work space folder and the source files included in the project that has been opened. When a source file icon is double-clicked, the source file will be opened or the corresponding [Edit] window will be activated. When the folder icon or a source file icon is clicked with the right mouse button, a shortcut menu including the available build menu items appears. [Properties.] shows the source file information as follows: Shortcut menu in the [Project] window Note: Note that the list in the [project] window is not the actual directory structure. Sources of the project in other folders than the work space folder are also listed as they exist in the work space folder. 3.6.4 Opening and Closing a Project To open a project, select [Open WorkSpace.] from the [File] menu. A dialog box appears allowing selection of a project file. The work bench allows only one project to be opened at a time. So if a project has been opened, it will be closed when another project is opened. At this time, a dialog box appears to select whether the current project file is to be saved or not if it has not already been saved after a modification. The project file can also be opened by selecting [Open] from the [File] menu or clicking the [Open] button. In this case, choose the file type as Project Files (*.epj) in the file open dialog box. To close the currently opened project file, select [Close WorkSpace] from the [File] menu. At this time, a dialog box appears to select whether the current project file is to be saved or not if it has not already been saved after a modification. If [Yes] (save) is selected in this dialog box, all the modification items including sources, tool settings and window configuration will be saved. 28 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH 3.6.5 Files in the Work Space Folder The work bench generates the following files in the work space folder: .epj Project file This file contains the project information. .cm Linker command file This file is generated when a build task is started, and is used by the linker to generate an absolute object file. Example: ; S1C WorkBench Generated ; Thursday, November 05, 1998 "C:\EPSON\S1C63 S1C63\DEV\63A08 63A08\PAR63A08 PAR63A08.PAR" -o "test.abs" ;ICE parameter file ;output file : absolute object ; linked object file(s) "sub.o" "main.o" The contents vary according to the source files included in the project and the linker option setting. .cmd Debugger startup command file This file is generated when a build task is started, and is used by the debugger to execute the command in this file when it is started up. Example: lf "test.abs" The work bench generates this file so that the executable file according to the format selection is loaded when the debugger starts up. .mak "make" file for build task This file is generated when a build task is started, and is used for the build process in the work bench. Example: # S1C WorkBench Generated # Thursday, November 05, 1998 ASM = as63.exe LINK = lk63.exe HEX = hx63.exe ASM_FLG = -g LINK_FLG = -g HEX_FLG = ALL : test.abs test.abs : test.cm sub.o main.o $(LINK) $(LINK_FLG) test.cm sub.o : C:\EPSON\S1C63 S1C63\Test\sub.s $(ASM) $(ASM_FLG) C:\EPSON\S1C63 S1C63\Test\sub.s main.o : C:\EPSON\S1C63 S1C63\Test\main.s $(ASM) $(ASM_FLG) C:\EPSON\S1C63 S1C63\Test\main.s This is a generic make file that contains macro setting and dependency list. The following files are generated by the development tools during a build process: .o .abs .hsa, .lsa, .csa h.hex, l.hex, c.hex S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) Relocatable object files (generated by the assembler) Absolute object file (generated by the linker) Motorola S files (generated by the HEX converter when this format is specified in the work bench) Intel HEX files (generated by the Hex converter when this format is specified in the work bench) EPSON 29 CHAPTER 3: WORK BENCH 3.7 Source Editor The work bench has a source editor function. Sources can be created and modified in the [Edit] window. 3.7.1 Creating a New Source or Header File To create a new source file: 1. Select [New] from the [File] menu or click the [New] button. [New] button The [New] dialog box appears. 2. Select [EPSON Assembly Source File] and click [OK]. An [Edit] window appears. [Edit] window Enter source codes here. Enter source codes in this window. The [New] dialog box allows selection of the [EPSON Header File]. Select it when creating a header file for constant definitions. 30 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH 3.7.2 Loading and Saving Files To load a source file: 1. Select [Open.] from the [File] menu or click the [Open] button. [Open] button The [Open] dialog box appears. 2. Choose a source file to be opened after selecting the file type, "Assembly Source Files (*.s, *.ms)", and click [OK]. An [Edit] window opens and shows the contents of the source file. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 31 CHAPTER 3: WORK BENCH To save the source: 1. Activate the [Edit] window of the source to be saved. 2. Select [Save as.] from the [File] menu. The [Save As] dialog box appears. 3. Enter the file name and then click [OK]. When overwriting the source on the existing file, select [Save] from the [File] menu or click the [Save] button. [Save] button To save all the source files opened and the project file, use the [File | Save All] menu item or the [Save All] button. [Save All] button 3.7.3 Edit Function The source editor has general text editing functions similar to standard Windows applications. Editing text Basic text editing function is the same as general Windows applications. Cut, copy and paste are supported in the [Edit] menu and with the toolbar buttons. These commands are available only in the [Edit] window. Undo can be selected from the [Edit] menu. The tab stops are set at every 8 characters. Find, replace and go to Any words can be searched in the active [Edit] window. Find To find a word, select [Find.] from the [Edit] menu or click the [Find] button. [Find] button The [Find] dialog box appears. 32 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH The controls in the dialog are as follows: [Find what:] text box Enter the word to be found in this text box. The specified word is maintained as the finding word even if this dialog box is closed. [Match whole word only] check box If this option is selected, the work bench searches only the words that are completely matched with the specified word. If not, only the part of word that matches the specified word will be searched. [Match case] check box If this option is specified, a case-sensitive search is performed. If not, a case-insensitive search is performed. [Direction] option If the [Up] radio button is selected, the specified word is searched toward to the beginning of the file. If the [Down] radio button is selected, a search is performed toward to the end of the file. [Find Next] button Clicking this button starts searching the specified word. If the specified word is found, the [Edit] window refreshes the display and highlights the word found. [Cancel] button Clicking this button closes the dialog box. Once a word to be found is specified in the [Find] dialog box, the [Find Next] and [Find Previous] buttons on the toolbar can be used for a forward or backward search. [Find Next] button [Find Previous] button Replace To replace a word with another one, select [Replace] from the [Edit] menu. The [Replace] dialog box appears. The controls in the dialog are as follows: [Find what:] text box Enter the word to be found in this text box. If a word has been specified in the [Find] dialog box, it appears in this box. [Replace with:] text box Enter the substitute word in this box. [Match whole word only] check box If this option is selected, the work bench searches only the words that are completely matched with the specified word. If not, only the part of word that matches the specified word will be searched. [Match case] check box If this option is specified, a case-sensitive search is performed. If not, a case-insensitive search is performed. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 33 CHAPTER 3: WORK BENCH [Find Next] button Clicking this button starts searching the specified word. If the specified word is found, the [Edit] window refreshes the display and highlights the word found. [Replace] button By clicking this button after the specified word is found, it is replaced with the substitute word. Then the work bench searches the next. [Replace All] button Replaces all the specified found words with the substitute word. Note that undo function cannot be performed for this operation except for the last replaced word. [Cancel] button Clicking this button closes the dialog box. Go to You can go to any source line or any label position quickly. To do this, select [Go To] from the [Edit] menu. The [Go To] dialog box appears. Going to a source line 1. Select "Line" in the [Go to what:] list box. 2. Type a line number in the [Enter Line Number] box and then click the [Go To] button. Going to a label position 1. Select "Label" in the [Go to what:] list box. The [Enter Line Number] box changes to the [Select Label] list box. 2. Select a label from the [Select Label] box and then click the [Go To] button. The [Select Label] list box has a pull-down menu that contains the list of labels defined in the current source file. The [Edit] windows for source files (*.s, *.ms) have the [Go To Label] list box similar to the [Select Label] list box in the [Go To] dialog box. You can also go to a label position using this box. Inserting a file To insert a file such as a header file and another source at the cursor position of the current source, select [File.] from the [Insert] menu. A dialog box will appears allowing selection of the file to be inserted. 34 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH Shortcut menu The [Edit] window supports a short cut menu that appears by clicking the right mouse button on the [Edit] window. It can also be done by pressing the [Short cut menu] key while the [Edit] window is active if the key is available on the keyboard. It contains the editing menu items descried above, so you can select an edit command using this menu. 3.7.4 Tag Jump Function When assembler syntax errors occur during assembling, their error messages are displayed in the [Output] window. In this case, you can go to the source line in which an error has occurred by double-clicking the error message in the [Output] window. However, this function is available only when the error message contains a source line number. Linked with the corresponding source line S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 35 CHAPTER 3: WORK BENCH 3.7.5 Printing The document in the [Edit] window can be printed out. The [Print.], [Print Preview] and [Page Setup.] commands are provided in the [File] menu. The [Print] button can also be used. They have the same function as those of standard Windows application. Select one after activating the [Edit] window of the document to be printed. 3.8 Build Task By using the [Build] menu or [Build] toolbar, the assembler, linker, debugger, HEX converter and disassembler can be executed from the work bench. In the work bench, process to generate an executable object from the source files is called a build task. For details of each development tool, refer to the respective chapter. 3.8.1 Preparing a Build Task Before starting a build task, necessary source files should be prepared and tool options should be configured. 1. Create a new project. (Refer to Section 3.6.1.) 2. Select an ICE parameter file. (Refer to Section 3.6.1.) 3. Create source files and add them into the project. (Refer to Sections 3.7 and 3.6.2.) 4. Select tool options (Refer to Section 3.9.) 3.8.2 Building an Executable Object To generate an executable object: 1. Open the project file. 2. Select an output format (absolute, Intel HEX or Motorola S) using the [Output Format] list box. 3. Select [Build] from the [Build] menu or click the [Build] button. [Build] button The work bench generates a make file according to the source files in the project and the tool options set by the user. This file is used to control invocation of tools. First, the make process invokes the assembler for each source file to be assembled. If the latest relocatable object file exists in the work space, the corresponding source file is not assembled to reduce process time. Next, the linker is invoked to generate an absolute object file. The linker command file used in this phase is automatically generated. If absolute object has been selected as the output format, the build task is completed at this phase. If Intel HEX or Motorola S has been selected, the HEX converter will be invoked to generate an object in the specified format. To rebuild all files including the latest relocatable object files, select [Rebuild All] from the [Build] menu or click the [Rebuild All] button. [Rebuild All] button The build task can be suspended by selecting [Stop Build] from the [Build] menu or clicking the [Stop Build] button. [Stop Build] button 36 EPSON S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) CHAPTER 3: WORK BENCH To invoke only the assembler, select [Assemble] from the [Build] menu or click the [Assemble] button after activating the [Edit] window of the source to be assembled. [Assemble] button 3.8.3 Debugging To debug the generated executable file, select [Debug] from the [Build] menu or click the [Debug] button. [Debug] button The debugger starts up with the specified ICE parameter file and then loads the executable object by the command file generated from the work bench. This command file contains the command to load the specified type of an executable object to the debugger. The contents of the command file can be edited in the [Settings] dialog box explained in Section 3.9. When the building process is performed again after invoking the debugger, the debugger will reload the object file if its window can be activated. Refer to Chapter 8, "Debugger", for operating the debugger. S5U1C63000A S5U1C63000A MANUAL (S1C63 S1C63 FAMILY ASSEMBLER PACKAGE) EPSON 37 CHAPTER 3: WORK BENCH 3.8.4 Executing Other Tools The HEX converter and disassembler can be invoked independently. The mask data creation tools can also be invoked from wb63. HEX converter To invoke the HEX converter, select [HEX converter.] from the [Tools] menu or click the [HEX convert] button. [HEX convert] button Then select an absolute object file to be converted in the [Hex data convert] dialog box. This dialog box allows selection of the HEX converter options. [ICE Parameter file:] list box Select an ICE parameter file from the pull-down list. [Output Format:] list box Select an output format from be