Home

Epson S5U1C63000A Computer Accessories User Manual

image

Contents

1. TN Mnemonic V Extended function Flags Classification Opcode Operand Basic function when LDB EXT imm8 is executed Clk Elilclz Symbol Logic XOR X A X IX VA X X 1 2 0 gt operation X B X lt X VB X X 1 2 0 gt X imm4 X X Vimm4 X X 1 B 2 lo le E XOR 96 Y 96A Y Y VA FFimm8 FFimm8 vA 2 o eo Y B Y Y vB FFimm8 FFimm8 vB 2 o o 9 Y imm4 Y e Y Vimm4 FFimm8 FFimm8 vimm4 2 0 gt Y A Y IYIVA Y Y 1 2 o le Y B Y e Y VB Y Y 1 2 lo l le m Y imm4 Y e Y Vimm4 Y Y 1 2 lo le BIT A A AAA e 1 lol l le A B AAB 1 lol l le A imm4 A imm4 1 0 gt A X AA A 00imm8 REH ES Ee A X AA X X X 1 1 lol l le A Y ANY A FFimm8 ides E 96A YY AA Y Y e Y 1 1 0 gt BIT B A BAA E 1 j0 e B B BAB 1 j0 o B imm4 Baimm4 1 0 gt z B X BA X Bx 00imm8 1 0 gt B X BA X X X 1 1 Jol J lo B Y BALY BA FFimm8 1 0 gt B Y BA Y Y Y 1 1 0 gt BIT X A X AA 00imm8 AA 110 o X B X AB 00imm8 B 1 0 gt i 9eX imm4 X nimm4 00imm8 Aimm4 110 o X A XJAA X X 1 E koleft tks x X B XJAB X X 1 1 Io ees m X imm4 XJaimm4 X X 1 1 0 gt BIT Y A YJAA FFimm8
2. Remarks Instruction List 8 S1C63000 Core CPU T Mnemonic i y Extended function Flags Classification Opcode Operand Basic function when LDB EXT imm8 is executed Clk Elilclz Symbol Logic AND A A A AAA 1 lol o operation A B A AaB 1 0 gt z A imm4 A A imm4 1 0 gt A X A amp AAX A A 00imm8 10 o A X A AA X X X 1 1 0 gt A Y A AA Y A A FFimm8 1 0 gt 96A v6 Y A lt AA Y Y Y 1 1 Jol J lo AND B A B BAA 1 j0 eo m B B B lt BAB 1 lol l le B imm4 B Baimm4 E 1 0 gt B X Be BA X B BA 00imm8 1 0 gt E B X B BA X X X 1 1 Jol J lo B Y Be BAY B BA FFimm8 10 o B Y B BAY Y Y 1 1 0 gt z AND F imm4 F Faimm4 1 0 0 0 0 AND X A X X AA 00imm8 lt 00imm8 xA 2 o le X B X X AB 00imm8 00imm8 B 2 0 gt 9oX imm4 X X aimm4 00imm8 lt 00imm8 ximm4 2 o le X A X XJ A X X 1 m 2 0 gt X B X X AB X X 1 E 2 lo le X imm4 X X Aimm4 X X 1 2 0 gt AND Y A Y Y AA FFimm8 FFimm8 AA 2 0 z Y B Y Y
3. Message Description Display File name error Number of characters in the file name or extension exceeds the limit Dialog Illegal character Prohibited characters have been entered Dialog Please input file name File name has not been entered Dialog Can t open File xxxx File xxxx cannot be opened Dialog INI file is not found Specified device information definition file ini does not exist Dialog INI file does not include FOG information Specified device information definition file ini does not contain Dialog function option information Function Option document file is not found Specified function option document file does not exist Dialog Function Option document file does not Contents of the specified function option document file do not match Dialog match INI file device information definition file ini A lot of parameter Too many command line parameters are specified Dialog Making file s is completed Finished creating the file but the created file xxxx does not contain Message xxxx is no data exist any data Can t open File xxxx File xxxx cannot be opened when executing Generate Message Making file s is not completed Can t write File xxxx File xxxx cannot be written when executing Generate Message Making file s is not completed Table 9 4 2 winfog Warning Messages Message Description Display Are you file update Overwrite confirmation message Dialog xxxx is already exist Specifi
4. Mode Seiting This menu item sets the on the fly display break and execution counter modes using a dialog box It performs the same functions as executing the md command 8 6 8 Windows Menu windo Cascade This menu item cascades the opened windows v 1 Command Tile 2Data This menu item tiles the opened windows e This menu shows the currently opened window names Selecting one activates the 5 Mix window 8 6 9 Help Menu Help Contents Contents This menu item displays the contents of help topics About Db63 About Db63 This menu item displays an About dialog box for the debugger S5U1C63000A MANUAL EPSON 135 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 7 Method for Executing Commands All debug functions can be performed by executing debug commands This section describes how to execute these commands Refer to the description of each command for command parameters and other details To execute a debug command activate the Command window and input the command from the keyboard The menu and tool bar can be used to execute frequently used commands 8 7 1 Entering Commands from Keyboard Select the Command window by clicking somewhere on the Command window When the prompt gt appears on the last line in this window and a cursor is blinking behind it the system is ready to accept a command from the keyboard Input a debug command at the prompt position The com
5. This menu item displays sets or clears data break conditions using a dialog box It performs the same function as executing the bd command Register Break This menu item displays sets or clears register break conditions using a dialog box It performs the same function as executing the br command Sequential Break This menu item displays sets or clears sequential break conditions using a dialog box It performs the same function as executing the bs command Stack Break This menu item displays or sets stack break conditions using a dialog box It performs the same function as executing the bsp command Break List This menu item displays the all break conditions that have been set It performs the same function as executing the bl command Break All Clear This menu item clears all break conditions It performs the same function as executing the bac command 8 6 5 Trace Menu Trace Mode Set Trace Search Trace File Trace Mode Set This menu item sets a trace mode and trace conditions using a dialog box It performs the same function as executing the tm command Trace Search This menu item searches trace information from the trace memory under the condition specified using a dialog box It performs the same function as executing the ts command Trace File This menu item saves the specified range of the trace information displayed in the Trace window to a file It performs t
6. Y sign8 Y Y sign8 sign8 128 127 Y lt Y imm16 imm8 set in EXT is used as high order 8 bits 1 0 OGGI CMP X imm8 X imm8 imm8 0 255 X imm16 imm8 set in EXT is used as high order 8 bits 1 0 O GI Y imm8 Y imm8 imm8 0 255 Y imm16 imm8 set in EXT is used as high order 8 bits 1 0 gt O GI INC SP1 SP1 SP1 1 1 0 gt SP2 SP2 SP2 1 11 0 e DEC SP1 SP1 SP1 1 1 0 gt SP2 SP2 SP2 1 1 0 Stack PUSH A SP2 1 A SP2 SP2 1 1 0 operation B SP2 1 B SP2 SP2 1 1 0 F SP2 1 F SP2 SP2 1 1 0 9 eX SP1 1 4 3 SP1 1 4 X SP1 SP1 1 1 0 YY SP1 1 4 3 SP1 1 4 Y SP1 SP1 1 1 0 POP 96A A lt SP2 SP2 SP2 1 1 0 B B lt SP2 SP2 SP2 1 1 0 F F SP2 SP2 lt SP2 1 1 Jolololo X X SP1 4 3 SP1 4 SP1 SP1 1 1 0 SY Y lt SP1 4 3 SP1 4 SP1 SP1 1 1 0 Remarks S1C63000 Core CPU DRE Mnemonic i Extended function Flags Classification opcode Operand Basic function when LDB EXT imm8 is executed Cik eT Jefz Se Branch control JR sign8 PC PC sign8 1 sign8 128 127 PC PC sign16 1 sign16 32768 32767 1 1 0 O
7. o file name Specify output file name File names Absolute object file ABS or CSA LSA HSA Error Messages Cannot create file kind file lt FILE NAME gt The file cannot be created Cannot open file kind file FILE NAME gt The file cannot be opened Cannot read file kind file FILE NAME gt The file cannot be read Cannot write file kind file FILE NAME Data cannot be written to the file Illegal file name FILE NAME gt specified with option option The specified output source file name is incorrect Illegal file name FILE NAME gt The specified input file name is incorrect Illegal HEX data format The input file is not a Motorola S format file Illegal option lt option gt An illegal option is specified Out of memory Warning Message Input file name extension XXX conflict Cannot secure memory space Two or more file names with the same extension have been specified The last one is used Cannot open Hex file xxx csa The file cannot be opened It is assumed there is no data memory Debugger db63 1 Development Tools Outline Start up Command Usage This software performs debugging by controlling the ICE hardware Usage tool Commands that are used frequently such as break and step d
8. 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 config ured 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 62 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 Absolute Object Y Absolute Obiect Intel Hex Motorola S 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 r
9. Output Error log file Output Symbol file Disable removal branch optimization Output cross reference file IV Add source debug information Cancel zm He In this dialog section allocation symbol definition and other linker options can be specified The work bench generates a linker command file including these specifications and specifies it when invoking the linker Specifying section allocation This option is set by default as all the sections will be allocated from the memory start address To specify a section start address double click the cell and then enter the address Source BSS CODE DATA Default Double click here to change default CODE section start address then type an address Source BSS CODE DATA 7 DE o100 EM The edit box shows the default setting Default and the list of source files in the project The default setting applies to all the sections excluding those of the source specified To set a specific source independently select the check box at the front of the source file name Check here gt V EV 0x200 S5U1C63000A MANUAL EPSON 41 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH Symbol definition To define a symbol click the New button and then enter the symbol name and address in the edit box Symbol Addr lt Enter a symbol name and the address To modify a symbol name or address double click the name or the address in the edit box and then e
10. If you want to change an assigned address clear its cell assignment using the Delete button first and then reassign a new address If you want to change a selected output mode too select the correspond ing SPEC cell and clear its selected output mode with the Delete button before reselecting a new output mode Two or more cells selected by dragging an area can also be deleted using the Delete button If you select Generate without changing the file name the dialog box asking you whether to over write the file is displayed Click Yes to overwrite or No or Cancel to stop overwriting Use the Setup dialog box to change the file name Notes The segment option document file can be read only when the device information definition file has been loaded Some models need a function option document file to be loaded at the start of winsog and the contents of the file affect the segment option setup condition Therefore the segment option document file in which the settings do not match the function option cannot be read 10 Quitting To terminate winsog select End from the File menu S5U1C63000A MANUAL EPSON 259 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR 10 4 Error Messages The error messages of winsog are listed below The Dialog in the Display column means that messages are displayed in the dialog box and Message means that messages are displayed in the SOG window message ar
11. Output Format Displays a dialog box for selecting an executable object file format Three types of formats are available 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 MANUAL 81C63 FAMILY ASSEMBLER PACKAGE 3 5 6 Tools Menu Hex Converter Disassembler WinFOG WinSOG WinMLA WinMDC Options CHAPTER 3 WORK BENCH 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 Window Cascade Tile Horizontally Tile Vertically Arrange Icons Close All 3 5 8 Help Menu Help Help About WE This menu appears when an Edit window is opened
12. Unassemble button S5U1C63000A MANUAL EPSON 201 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER SC source code Function This command displays the contents of the program source file in the Source window The display contents are as follows Line number in the source file Source code Format gt sc lt address gt direct input mode lt address gt Start address for display hexadecimal or symbol IEEE 695 format only Condition 0 lt address lt last program memory address Display 1 When Source window is opened Source Display lolx Search Label EI Source ba SP1_INIT ADDR sp1 ba set SP1 ba SP2_INIT_ADDR sp2 ba set SP2 INIT_RAM_BLK1 initialize RAH block 1 INC_RAM_BLK1 increment RAHM block 1 Loop infinity loop xxxxx RAM block sees nrn AxA If lt address gt is not specified display in the Source window is changed to the source display mode If lt address gt is specified display in the Source window is changed to the source display mode At the same time code is displayed beginning with lt address gt 2 When Source window is closed The 16 lines of source code are displayed in the Command window The system then waits for a command input If lt address gt is not specified this display begins with the current PC displayed in the Register window If lt address gt is specified the display begins with lt address
13. e A dialog box appears to show the progress of erasing while executing To abort erasing click the Cancel button on the dialog box or press the ESC key When the execution stops the warning message shown below is displayed Warning User cancel In this case the standard peripheral circuit board cannot be used until the FPGA is erased and reprogrammed e Erase time is about 2 minutes 40 seconds max when the transfer rate between the ICE and PC is 38400 bps Do not erase the sub FPGA unless otherwise specified as it normally contains some LCD functions GUI utility None 232 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Xfwr xfwrs xilinx fpga data write Function This command writes peripheral circuit data to the FPGA on the standard peripheral circuit board inserted in the ICE Format gt xfwr file name gt H S N for main FPGA direct input mode gt xfwrs file name gt H S IN for sub FPGA direct input mode file name gt FPGA data file mot Motorola S mcs Intel HEX H Load Intel HEX file S Load Motorola S file N Skip erasing before writing data Examples gt xfwr ice fpga c63xxx mot S gt In this example the main FPGA is erased and then data in the c63xxx mot file Motorola S format is written to it gt xfwr ice fpga c63xxx mot S NJ gt In this example erasing before writing is skipped However t
14. ASM_FLG C EPSON S1C63 Test sub s main o C EPSON S1C63 Test main s ASM ASM_FLG C EPSON 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 lt file gt o Relocatable object files generated by the assembler lt file gt abs Absolute object file generated by the linker lt file gt hsa lt file gt lsa lt file gt csa Motorola S files generated by the HEX converter when this format is specified in the work bench lt file gt h hex lt file gt 1 hex lt file gt c hex Intel HEX files generated by the Hex converter when this format is specified in the work bench S5U1C63000A MANUAL EPSON 29 S1C63 FAMILY ASSEMBLER PACKAGE 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 al New button The New dialog box appears EPSON Project File 2 Select EPSON Assembly Source File and click OK An Edit window appears WorkBench63 Version x xx ASM1 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
15. 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 win dow area Close All Closes all the Edit windows opened Help Displays the Help window About WB63 Displays a dialog box showing the version of the work bench S5U1C63000A MANUAL EPSON 25 S1C63 FAMILY ASSEMBLER PACKAGE 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 D New button The New dialog box appears Mes x New EPSON Assembly Source File EPSON Assembly Header File Cancel Help 2 Select EPSON Project File and click OK The Project dialog box appears Project ICE parameter file PARB3AD8 PAR C ancel Location CASICE3 Bj n 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
16. Click OK and the file is loaded If the specified file exists and there is no problem with its contents the option list and the melody ROM option document areas are updated according to the contents of the file To stop loading the file click Cancel Perform steps 2 and 3 to update the file If you select Generate without changing the file name the message shown below is displayed asking you whether or not to overwrite the file Click Yes to overwrite or No or Cancel to stop overwrit ing Use the Generate dialog box to change the file name WARNING ES Are you file update 22222222 MDC is already exist Note The melody ROM option document file can be read only when the device information definition file has been loaded 5 Quitting To terminate winmla select Exit from the File menu 268 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 11 4 Melody Data 11 4 1 Outline of Melody Data To produce music or sound effects with the melody generator of the S1C63xxx the following four data must be created 1 Tempo data Two types of tempo settings are available for a piece of music They can be selected from 16 types of tempos 2 Main data a Control bits Attack for separating notes rest and the end of melody are specified b Note data Eight types of notes are available c Interval data The range differs according to the referen
17. Closes the currently opened project This menu item becomes inactive if no project is opened Save Ctrl S 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 MANUAL 81C63 FAMILY ASSEMBLER PACKAGE 3 5 2 Edit Menu Edit Undo Ctrl Z Cut Ctrl gt Copy Ctrl C Paste Ctrl V Select All Ctrl 4 Find Ctrl F Replace Ctrl H GoTo Ctl G 3 5 3 View Menu Standard Bar Status Bar Output Window Project Window Build Bar Window Bar ery fe lt lt L Full Screen CHAPTER 3 WORK BENCH Undo Ctrl Z
18. Defines a character string with a define name defnum lt defnum name gt value Defines a value with a defnum name macro lt macro name gt par par Defines a statement string with a macro name lt statements gt par Dummy parameters endm ifdef lt name gt Conditional assembling lt statements 1 gt name defined statements 1 is assembled else lt name gt undefined lt statements 2 gt is assembled lt statements 2 gt endif ifndef lt name gt Conditional assembling lt statements 1 gt lt name gt undefined lt statements 1 gt is assembled else lt name gt defined lt statements 2 gt is assembled lt statements 2 gt endif code Declares the start of a CODE section data Declares the start of a DATA section bss Declares the start of a BSS section abs Specifies absolute assembling org address Specifies an absolute address align alignment number Specifies alignment of a section comm global symbol size Defines a global symbol and secures memory area in a bss section Icomm local symbol size Defines a local symbol and secures memory area in a bss section set symbol lt address gt Defines an absolute address for a symbol global symbol Declares the symbol as global codeword data data data Defines codes in the CODE section word lt data gt lt data gt
19. Format 2 sflJ Protect flash memory l yes 2 no Lal Protect is set Write program l yes 2 no 14 Write contents are selected data l yes 2 no LA fog l yes 2 no 14 sog l yes 2 no e dLa mla l yes 2 no 14 Please wait few minutes Save to flash memory done gt If you enter only the Enter key in the middle of guidance the guidance is terminated and only the area you have selected up to that time is written into the flash memory Notes If the flash memory is write protected an error results and memory contents are not written to the flash memory Error flash ROM is protected The write protect can be removed by erasing the flash memory with the efl command S5U1C63000A MANUAL EPSON 211 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER If the flash memory has been erased an error results in which case you can choose to continue or stop processing Error format error Save with the map information or quit the command 1 save 2 quit 1 Protect flash memory l yes 2 no Ber If the flash memory and target memory are mapped differently an error results In this case the system displays the map information of the memory and a message prompting you to choose to continue or stop processing Error Map infomation is ICE flash Chip name 63A08 Parameter version 02 00 Size of program 2000 0 data RAM 800 8000 data ROM 1000 7000 ext memory 100 700 LCD 2C0 800 I
20. GoTo ChhG Finds the specified word in the active Edit window Output Format Displays a dialog box for selecting an executable object file format Work Bench wb63 4 Development Tools Menus Tools menu Tools Hex Converter Disassembler WinFOG WinSOG WinMLA WinMDC Options HEX Converter nvokes the HEX converter Disassembler nvokes the disassembler WinFOG nvokes the function option generator WinSOG nvokes the segment option generator WinMLA nvokes the melody assembler WinMDC nvokes the mask data checker Options Displays a dialog box for setting work bench options Window menu Cascade Tile Horizontally Tile Vertically Arrange Icons Close All 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 Close All Closes all the Edit windows opened Help menu Help About WBEB3 Help Displays the Help window About WB63 Displays a dialog box showing the version of the work bench Short Cut Key List Ctrl N Creates a new document Ctrl O Opens an existing document Ctrl F12 Opens an existing docu
21. INIT_RAM_BLK1 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 Goto Label OI BOOT LOOP NMI 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 MANUAL 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 Goto Label r tifdef SMALL_RAM set KD SP1 init addr Helse set SP1_INIT_ SP1 init addr ttendif Find set SP2 INIT SP2 init addr 3 7 4 Tag Jump Function When assembler syntax errors occur during assembling their error messages are displayed in the Out put window In this ca
22. Number of steps out of range use 0 65535 The specified step count is out of range flash ROM is protected Flash memory is protected against access SO address out of range use 0 0x1FFF SO address is invalid format error Flash memory is not mapped SP1 address out of range use 0 0x3FF The specified SP1 address is out of range Map information is not the same Map information loaded from parameter file does not match that in the parameter file verify error XXXX Command errors Address out of range use 0 0xXXXX Verify error has occurred when data was written to flash memory SP2 address out of range use 0 0xFF The specified SP2 address is out of range symbol type error Command warning Break address already exists The specified symbol type program data is incorrect Attempt is made to set an already set break address Identical break address input Input command contains identical address The specified program memory address is out of range round down to multiple of 4 Watch data address is invalid Address out of range use 0 0xFFFF The specified data memory address is out of range User cancel Command is aborted by the user Verify error FPGA verify error Function Option Generator winfog 1 Development Tools Outline required when debugging programs with the ICE Windows FOG Function Option Generator
23. Output error log file Output Option Ip Default C Lowercase 7 Upper case This dialog box allows selection of the disassembler options Output error log file check box Select this option to generate the error log file of the disassembler Output Option Select a character case option using the radio buttons When Default is selected the disassembled source will be made with all labels in upper case characters and instructions in lower case characters When Upper case is selected the source will be made with upper case characters only When Lower case is selected the source will be made with lower case characters only After selecting an executable object and options click the Open button The disassembler starts up and converts the selected object into the source file The messages delivered from the disassembler are displayed in the Output window Function option generator segment option generator melody assembler and mask data checker The Tools menu allows invocation of the following tools WinFOG Function option generator winfog Chapter 9 WinSOG Segment option generator winsog Chapter 10 WinMLA Melody assembler winmla Chapter 11 WinMDC Mask data checker winmdc Chapter 12 Refer to the respective chapter for how to use each tool Note These tools do not support some models no device information definition file is provided In this case other tools are provided for each model How
24. SP1 init addr set SP2 INIT ADDR Oxlf SP2 init addr NMI amp BOOT global global org calr reti org ldb ldb ldb ldb calr calr jr IN LOOP T_RAM_BLK1 INC_RAM_BLK1 Ox IN Ox 00 T_RAM_BLK1 10 7SP1 init addr 0x2c 0x12c Oxlf Subroutine in sub s Subroutine in sub s initialize RAM block 1 in NMI watchdog timer ba SP1_INIT_ADDR spl ba ba SP2 INIT ADDR ssp2 sba INIT RAM BLK1 INC RAM BLK1 LOOP P RAM block org 0x0 bss comm RAM BLKO 4 comm RAM BLK1 4 Assembler 63 Ver x xx Error log file MAIN ERR Mon Jan 15 Assembler 63 Ver x xx SEIKO EPSON CORP Copyright 1998 2001 Created preprocessed source file MAIN MS Created relocatable list file MAIN LST Created error log file MAIN ERR Created relocatable object file MAIN O Assembly 0 error s 0 warning s set SP1 set SP2 initialize RAM block 1 increment RAM block 1 infinity loop 12 40 41 2001 86 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE 4 10 Error Warning Messages 4 10 1 Errors CHAPTER 4 ASSEMBLER When an error occurs no object file will be generated The assembler error messages are delivered displayed in the following format Source file name Line number Error Error message Example TEST S 431 Error Illegal syntax Some error messages are displayed without a
25. To start up the work bench Choose WorkBench63 from the Program menu to start up the work bench MS MS DOS Prompt Get S If WorkBench63 is not registered in the Program H menu it means that the installation was not successful Therefore reinstall the tools When the work bench starts up the window shown below appears A Windows95 WorkBench63 Version X xx File Edit View Insert Build Tools Help oea yae mea 8 FA JPARE3408 PAR Absolute Object RS i ies S un For Help press F1 No document OVA HUN To terminate the work bench Select Exit from the File menu 5U1C63000A MANUAL EPSON 13 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH 3 3 Work Bench Windows 3 3 1 Window Configuration Menu bar Toolbar Edit window 7 WorkBench63 Version X Xx sub File Edit View Insert Build Tools Window Help osaa alee e e Fe hes PAR63408 PAR m Absolute Object d is test files 4 main s main s b sub s ed BEE GotoLabet d 1 sub s 2 RS63 test program subroutine 3 4 global RAM BLK1 5 6 xxxxx RAM block 1 initialize xxx 7 8 global INIT RAH BLK1 9 INIT Bon BLK1 18 ldb ext RAM BLK1Gh 11 ldb x1 RAM_BLK1 1 set RAM_BLK1 addre ld x 6x6 Linker 63 Uer x xx Copyright C SEIKO EPSON CORP 1998 2661 Created absolute object file TEST ABS Li
26. X X 1 Y Y 1 2 opa LD SY SA Y lt A FFimm8 A 1 Hype Y B Y B FFimm8 B 1 0 Y imm4 Y imm4 FFimm8 imm4 1 0 Y X Y X 2 ey oe RR ie Y X Y X X X 1 gt 6 ES Y A Y A Y Y 1 1 Weer Y B Y B Y Y 1 1 0 E Y imm4 Y imm4 Y Y 1 1 Pee las zs Y X Y X Y Y 1 2 eyes c Aes Y X Y e X Y Y 1 X X 1 2 s Remarks S1C63000 Core CPU EA Mnemonic y Extended function Flags Classification Scode Operand Paste function when LDB EXT imm8 is executed Cik eT cz Symbol 4 bit data EX A B AoB 110 transfer EX 96A 96 X A o X A lt gt 00imm8 2 JO pres A X A o X X X 1 E 2 0 A Y Ace Di A lt gt FFimm8 2 0 A Y A o Y Y Y 1 2 0 E EX B X B gt X B 00imm8 2 0 l B X Be X X X 1 E 2 0 B Y Be Y B lt gt FFimm8 2 0 B Y Be Y Y e Y 1 2 0 Arithmetic ADD SA SA A lt A A 1 0 gt operation A B A A B 1 0 gt A imm4 A lt A imm4 LO A X A A X A A 00immg8 1 0 gt A X A A X X X 1 1 0 olo 9
27. p Pass Count Clear Cancel 194 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER bsc sequential break clear Function This command clears the sequential break condition that has been set Format gt bsc direct input mode GUI utility Break Seguential Break menu item When this menu item is selected a dialog box appears for clearing sequential break conditions See the bs command S5U1C63000A MANUAL EPSON 195 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER bsp break stack pointer Function This command allows you to specify a stack area to generate a break for illegal stack access A break occurs when stack operation is performed in locations other than the area specified by this command Format 1 gt bsp lt address1 gt lt address2 gt lt address3 gt lt address4 gt J direct input mode 2 bsp J guidance mode Stack area set status SP1 start address address12 J SP1 end address address2 J SP2 start address lt address3 gt SP2 end address address4 J gt lt address1 gt SP1 start address hexadecimal or symbol IEEE 695 format only lt address2 gt SP1 end address hexadecimal or symbol IEEE 695 format only lt address3 gt SP2 start address hexadecimal or symbol IEEE 695 format only lt address4 gt SP2 end address hexadecimal or symbol IEEE 695 format only Condition 0 lt a
28. sauss EE Melody ROM Melody ROM option option HEX file document file Disassembler ds63 i Mask ites sa i file PAn data file Disassembled XE Source file SEIKO EPSON Debugger db63 In Circuit Emulator 1 Mask Data Checker winmdc 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 in voked 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 MANUAL 81C63 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 Manual E Quick Reference Read Me WorkBench63 la StartUp Eh Settings KS MS DOS Prompt R Q Windows Explorer Windows95 Start up the work bench by choosing Wor
29. 1 Contents of display i Reg Im x The following lists the contents displayed by this command PC 8118 PC Program counter A A register x AAAA e B B register M AAAA X Contents of X register and indirectly addressed data memory EIC2 6666 ai SP4 AA Ke Contents of Y register and indirectly addressed data memory SP2 AA EICZ Flags EXT AA M QUEUE AAAA SP1 Stack pointer SP1 8888820898 cycle SP2 Stack pointer SP2 8888 AAAA 6684 C983 EXT EXT register 0008 AAAA QUEUE QUEUE register 006C AAAA bus cycle Execution cycle counter 2 xxxx Watch data at four locations f the memory locations indicated by the X and Y registers are in an unused area the data in that area is marked by an as it is displayed Note that watch data is always displayed even if it resides in an unused area indeterminate 2 When Register window is opened When the Register window is opened all the above contents are displayed in the Register window according to the program execution When you use the rd command the displayed contents of the Register window is updated 3 When Register window is closed Data is displayed in the Command window in the following manner gt rd 1 PC 0110 A A D A X AAAA Y AAAA EICZ 0000 SP1 AA SP2 AA EXT AA QUEUE AAAA bus cycle 000002AB3D cycle 0000 0000 0010 AAAA 0014 AAAA 0018 AAAA gt 4 During
30. 7 6 Error Warning Messages 7 6 1 Errors When an error occurs the disassembler immediately terminates the processing after displaying an error message It will not output a source file The disassembler error messages are given below Error message Description Cannot create lt file kind gt file lt FILE NAME gt The file cannot be created Cannot open lt file kind gt file lt FILE NAME gt The file cannot be opened Cannot read lt file kind gt file lt FILE NAME gt The file cannot be read Cannot write lt file kind gt file lt FILE NAME gt Data cannot be written to the file Illegal file name lt FILE NAME gt specified with The specified output source file name is incorrect option lt option gt Illegal file name lt FILE NAME gt The specified input file name is incorrect The input file is not a Motorola S format file An illegal option is specified Cannot secure memory space Illegal HEX data format Illegal option lt option gt Out of memory 7 6 2 Warning Even if a warning is issued the disassembler keeps on processing and completes the processing after displaying a warning message unless in addition an error is produced Description Two or more file names with the same extension have been specified The last one is used The file cannot be opened It is assumed there is no data Warning message Input file name extension XXX conflict Cannot open Hex file
31. A B A A B 1 0 gt A imm4 A lt A imm4 LO A X A A X A A 00imm8 1 0 leolo E A X A MX X X 1 l 1 0 Jolo 96A 95 Y A A Y A c A FFimm8 1 o leolo j A Y A AY Y Y 1 1 o Jolo SUB B A B BA 1 0 gt B B B B A 5 1 0 gt B imm4 B B imm4 LO Remarks S1C63000 Core CPU JO Mnemonic i Extended function Flags EE Opsrand Paste functo when LDB EXT imm8 is executed Cik rez Symbol Arithmetic SUB B X Bc B X B B 00imm8 1 0 lelo operation B X B B X X X 1 E 1 o lolo B Y B B IY B B FFimm8 1 lol lele B Y B B Y Y Y 1 m 1 0 eolo SUB X A X X A 00imm8 lt 00imm8 A 2 0 o gt X B X X B 00imm8 lt 00imm8 B 2 0 ole X imm4 X X imm4 00imm8 lt 00imm8 imm4 2 0 e e X A X lt X A X X 1 2 0 gt X B X lt X B X X 1 2 10j ole X imm4 X X imm4 X X 1 2 0 gt SUB Y A Y YA FFimm8 FFimm8 A 2 0 olo Y B Y Y B FFimm8 FFimm8 B 2 0 ole 9eY imm4 Y Y imm4 FFimm8 FFimm8 imm4 2 0 o le Y A Y Y A Y e Y 1 2 0 le e
32. Break by external break Break caused by signal input to ICE BRKIN pin 2 ICE error messages Error message Content of message communication error Communication error other than time out overrun framing or BCC error CPU is running Target is running ICE is busy ICE is busy processing a job ICE is free run mode ICE is operating in free run mode ICE is maintenance mode ICE is placed in maintenance mode no map area XXXX No map area is specified for accessing not defined ID XXXX ICE respond ID is invalid on tracing System is tracing execution data reset time out CPU cannot be reset for more than 1 second target down Peripheral Circuit Board does not operate correctly or remains reset Time Out Communication time out 3 Flash memory error messages Error message Content of message flash memory error XXXX Writing or erasing flash memory has failed at XXXX flash ROM is protected Flash memory is protected against access format error Flash memory is not mapped Map information is not the same Map information loaded from parameter file does not match that in the parameter file verify error XXXX Verify error has occurred when data was written to flash memory 4 Command error warning messages Error message Content of message Commands involved Address out of range use 0 0xXXXX The specified program memory address is out of range a as pe pf pm sc m u g gr
33. File Tool Help H The function option generator winfog is the software tool for creating the file necessary to generate mask patterns of several hardware specifications such as UO port functions In addition simultaneously with this file winfog can create a mask option setup file that are Option list area si 2 d Root No 1 OSC1 SYSTEM CLOCK Crystal 32 768KHz 7 CR 60KHz E No 2 OSC3 SYSTEM CLOCK V CR 200KHz CR Type 1 8MHz Ceramic 4MHz a a oc CR external resistor No 3 INPUT PORT PULL UP RES DI Koo J7 With Resistor Gate Direct E K01 JV With Resistor WWW Gate Direct KOZ Making file s is completed ttt OPTION NO 1 OSC1 SYSTEM CLOCK Crystal 32 768KHz OPTO101 O1 ttt OPTION NO 2 Selected OSC3 SYSTEM CLOCK CR 200KHz Selected OPTOZO1 01 K13 PTAANT N1 OPTION NO 3 INPUT PORT PULL UP With Resistor With Resistor With Resistor With Resistor With Resistor With Resistor With Resistor With Resistor RESISTOR Selected Selected Selected Selected Selected Selected Selected Selected Lists mask options set in the device information definition file s1c63xxx ini Use the check boxes in this area to select each option A selected option has its check box marked by V F
34. For Help press F1 Ln27 Co 19 C4AP NUM Double click WorkBench63 Version X Xx sub s File Edit View Insert Build Tools Window Help De a aa Ziel aelel CL s sub s AS63 test program subroutine global RAM_BLK1 px RAM block 1 initialize sex 1 2 3 4 5 6 7 8 global INIT_RAM_BLK 9 INIT_RAM_BLK1 8 ldb ext RAM_BLK nssenbling 1db x1 RAM_BLK1 5Ub S 1d x1 8x8 Assembler 63 Ver x xx Copyright C SEIKO EPSON CORP 1998 2881 Created preprocessed source file SUB MS Created relocatable list file SUB LST Created error log file SUB ERR Created relocatable object file SUB 0 Assembly 6 error s 6 warning s main s Assembler 63 Uer x xx Copyright C SEIKO EPSON CORP 1998 2001 For Help press F1 w pm NUM 5U1C63000A MANUAL 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 e it window area can be maxi GoloLabet H The Edit d b 4 main s a s P 2 7 A568 test progrm main routine mized to the full screen size by selecting 5 pee INITIAL SP1 amp SP2 ADDRESS DEFINITION xxx Full Screen from the View menu All Heen EE SP4 init adar ox2c other windows and
35. If a symbol mask is applied to a numeric value an error will result e If a symbol mask is omitted the lower bits effective for that instruction will be used However if the bit value does not fall within the instruction range an error or warning will be issued e Symbols and symbol masks cannot be used on 4 bit immediate values 4 5 4 Comments Comments are used to describe a series of routines or the meaning of each statement Comments cannot comprise part of coding Definition of comment A character string beginning with a semicolon and ending with a line feed code LF is interpreted as a comment Not only ASCII characters but also other non ASCII characters can be used to describe a comment Examples This line is a comment line LABEL This is the comment for LABEL ld a b This is the comment for the instruction on the left Restrictions A comment is allowed up to 259 characters including a semicolon spaces before after and inside the comment and a return line feed code When a comment extends to several lines each line must begin with a semicolon Examples These are comment lines The second line will not be regarded as a comment An error will result Ihese are comment lines Both lines will be regarded as comments 4 5 5 Blank Lines This assembler also allows a blank line containing only a return line feed code It need not be made into a comment line using a
36. Instruction format code Function Declares the start of a CODE section Statements following this instruction are assembled as those to be mapped in the code ROM until another section is declared The CODE section is set by default in the assembler Therefore the code pseudo instruction can be omitted at top of a source file Always describe it when you change a section to a CODE section Precautions A CODE section can be divided among multiple locations of a source file for purpose of definition describing the code pseudo instruction in the respective start positions e A CODE section is relocatable by default unless its location is specified with the org pseudo instruc tion or more loosely with the align pseudo instruction data pseudo instruction Instruction format data Function Declares the start of a DATA section Statements following this instruction are assembled as those to be mapped in the data ROM until another section is declared Precautions The DATA section is a static data area and effective only for models with data ROM installed Ina DATA section nothing other than the org and word pseudo instructions symbols and com ments can be described ADATA section can be divided among multiple locations of a source file for purpose of definition describing the data pseudo instruction in the respective start positions ADATA section is relocatable by default unless its location is speci
37. SP2 BA SP2 1 0 Remarks S1C63000 Core CPU TEN Mnemonic i y Extended function Flags Classification opcode Operand Basic fune when LDB EXT imm8 is executed hkiertere Sie 8 16 bit LDB BA imm8 BA lt imm8 1 0 O h transfer and BA X A X B X 1 X X 2 2 0 operation BA Y A amp Y B Y 1 Y Y 2 2 0 LDB XL BA XL BA 1 0 XL imm8 XL imm8 X lt imm16 imm8 set in EXT is used as high order 8 bits 1 O z O I XH BA XH BA 1 0 LDB YL BA YL BA 1 0 YL imms YL imm8 Y lt imm16 imm8 set in EXT is used as high order 8 bits 1 pee SS O I YH BA YH BA 1 0 LDB EXT BA EXT BA 1 1 EXT imm8 EXT imm8 5 1 1 O L h rh xh LDB SP1 BA SP1 BA 1 0 SP2 BA SP2 BA 1 0 LDB X BA X A X41 B X X 2 2 0 X imm8 X i3 0 X 1 i7 4 X X 2 2 0 O GI Gh LDB Y BA Y A Y 1 B Y Y 2 2 0 ADD X BA X X BA 1 O o X sign8 X X sign8 sign8 128 127 X lt X imm16 imm8 set in EXT is used as high order 8 bits 1 0 O GI Y BA Y lt Y BA 1 0 gt
38. 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 i Db63 Command BEES File Run Break Trace View Option Window Help lo sese nana 4045099 8118 A Unassenble A ba 4b ldb ba SP1_INIT_ADDR Tonon ldb spi ba ldb sp1 ba AAA ldb ba 1f ldb ba SP2_INIT_ADDR WEI ldb sp2 ba ldb sp2 ba SP1 AA ldb ext fe ldb ext fe SP2 AA calr ea calr INIT_RAM_BLK1 ENT AA QUEUE AAAA ldb ext fe ldb ext fe 0000000008 cycle calr ef calr INC Bon BLK1 0000 AAAA jr fd jr LOOP 0004 AAAA 88681 AAAA P f 7 LCD board version EXT board version S check 0000 ICE hardware version 0010 ICE software version 0020 0030 gt com C S1C63 Test test cmd D1F test abs S file 0K DDDDDDDDDDO DDDDDDDDDD EE DDDDDDDDDDJN DDDDDDDDDD U DDDDDDDDD D a DDDDDDDDDD U DDDDDDDDDDO DDDDDDDDDD DDDDDDDDDDO DDDDDDDDDDU DDDDDDDDDD TE Refer to Chapter 8 Debugger for operating the debugger S5U1C63000A MANUAL EPSON 37 S1C63 FAMILY ASSEMBLER PACKAGE 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 dk HEX convert button Then select an ab
39. Select Device INI Select from the Tool menu or click the Device INI Select button Device INI Select button The dialog box shown below appears Enter a file name including the path in the text box or select a file by clicking the Ref button Device INI file Click OK and the file is loaded If the specified file exists and there is no problem with its contents the set up items in winmdc are initial PS ized with the loaded device information To stop loading the file click Cancel Once a device information definition file is selected the same file is automatically loaded the next time you start winmdc 2 Packing 1 Select Pack from the Tool menu or click the Pack button on the tool bar to bring up the Pack 2 SLC63 DEVE3 DEV63xxx_Vl zzzzzzzz HSa 2 S1LC63 DEV63 DEV63xxx_Vl zzzzzzz2z LSa DASICG6SADEVGSGADEV63xxx Vlizzzzzzzz CSA DASICG6SADEVGGADEV63xxx VlYizzzzzzzz FDC IMSIC6SADEV6GADEV63xxx Vlizzzzzzzz MDC 2 SLC63 DEVE3 DEVE3xxx_Vl zzzzzz22 SDC 284 EPSON 5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 12 MASK DATA CHECKER 2 Select the files to be entered Pack Input Files lists the files of the type specified in the device information definition file by their default file names If the data files to be entered are represented by different names in this list replace the file names following the procedure below a Select a file name to be changed by clicking on it from the list
40. The Extended function shows the operation of the instruction when LDB EXT imm8 is executed prior to the instruction S1C63000 Core CPU TAE Mnemonic i y Extended function Flags Classification o Scode Operand Beso function when LDB EXT imm8 is executed Cik eT1 c z me 4 bit data LD A A ASA lol TI S transfer A B A B E lol TT z A F AcF 1 0 m YA imm4 A imm4 1 Ioa Am es 96A 9 6X A X A 00imm8 1 0 A X A X X X 1 1 o S A Y A Y A lt FFimm 1 fol A Y A Y Y Y i E t o epu LD B A Bc A 1 0 E B B B amp B IEN EES B imm4 B imm4 1 Pes esi B X Be X B 00imm8 1 0 B X B X X X 1 z 1 lol B Y Be B FFimm BCEE B Y B Y Y Y 1 1 lol 2 LD F A FEA 1 lolelele F imm4 F lt imm4 1 Jolololo LD X A X A 00imm8 A 110 X B X B 00imm8 B iols 9eX imm4 X imm4 00imm8 imm4 T f xX Y X Y 2 0 X YY X Y Y Y 1 2 0 pe X A X A X X 1 1 Ob ele X B X B X X 1 j 1 ota eS X imm4 X imm4 X X 1 ME e EES X Y X Y X X 1 2 0 X Y X Y
41. There are two methods to read a command file into the debugger and to execute it as described below 1 Execution by the start up option By specifying a command file in the debugger start up command one command file can be executed when the debugger starts up If the above example of a command file is specified for example the necessary files are read into the debugger immediately after the debugger starts up so everything is ready to debug the program Example Startup command of the debugger db63 startup cmd par63xxx par 2 Execution by a command The debugger has the com and cmw commands available that can be used to execute a command file The com command reads in a specified file and executes the commands in that file sequentially in the order they are written The cmw command performs the same function as the com command except that each command is executed at intervals specified by the md command 1 to 256 seconds Examples com startup cmd cmw test cmd The commands written in the command file are displayed in the Command window Restrictions Another command file can be read from within a command file However nesting of these command files is limited to a maximum of five levels An error is assumed and the subsequent execution is halted when the com or cmw command at the sixth level is encountered S5U1C63000A MANUAL EPSON 139 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 7 4 Log File The execut
42. X X42 RETI PC SP1 4 3 SP1 4 SP1 SP1 1 2 lelelele F SP2 SP2 SP2 1 System HALT Halt 2 0 control SLP Sleep 2 0 NOP No operation PC PC 1 1 0 Remarks 1 sign16 s15 s8 imm8 sign16 s7 s0 sign8 Software Development Flowchart Development Tools Work Bench wb63 f F z S 2 z ite mak ile S Mor file MS J source iet S1C63xxx Development Tool Make file ee ie E St Eet gt 4 i Assembler as63 Assembly Z list file s Losch Log Hy rems Jp um raj een Function option Function option Sea Ae source file s HEX file document file E Linker bod Ik63 i i Absolute 1 Symbol file tie SYM tie ABS Tue as jet ine file SSA i eee TTT i lee 8 d teg Absolute F Cross Segment option Segment option Link map file file MAP J object file file XRF J reference j HEX file document file Melody data file 1 lelody Assembler Intel HEX Motorola S winmla format files format files file MSA 1 H Melody ROM Melody ROM option ile CSA i option HEX file document file Disassembler Mask Data Checker ds63 i j winmdc gt Mask file MS i i file PAn J gata file H Disassembled X
43. Y A C FFimm8 FFimm8 A C 2 0 e e gt operation Y B Y lt Y B C FFimm8 FFimm8 B C 2 0 e e gt Y imm4 Y Y imm4 C FFimm8 FFimm8 imm4 C 2 0 je gt Y A Y lt Y A C Y Y 1 2 0 e6 o Y B Y Y B C Y Y 1 2 0 e e gt Y imm4 Y Y imm4 C Y Y 1 2 0 o o CMP SALA A A 1 O0 jolo A B A B 1 0 gt A imm4 A imm4 110 o6le SA ve X A X A 00imm8 1 0 gt A X A X X X 1 1 O lolo SAVY A Y A FFimm8 1 O Jolo SALLY A Y Y lt Y 1 1 O lolo CMP B A B A 1 O lolo B B B B 1 O lolo B imm4 B imm4 LEE B X B X B 00imm8 1 O0 Jolo B X B X X X 1 1 O lolo B Y B Y B FFimm8 1 0 gt B Y B Y Y Y 1 1 0 gt CMP X A X A 00imm8 A 2 0 o o X B X B 00imm8 B 2 0 je e gt 9eX imm4 X imm4 00imm8 imm4 2 0 ole X A X A X X 1 2 0 o o X B X B X X 1 2 0 eo o X imm4 X imm4 X X 1 2 0 eo o CMP 96Y 96A Y A FFimm8 A 2 0 eo o Y B Y B FFimm8 B 2 0 eo o 9e Y imm4 Y imm4 FFimm8 imm4 2 0 gt Y A YA Y Y 1 2 0 o o Y B Y B Y Y 1 2 0 e6 o Y imm4 Y imm4 Y Y 1 2 0 o o INC O0addr6 OOaddr6 lt 00addr6 1 2 0 o o O DEC O0addr6 OO0
44. button To save all the source files opened and the project file use the File Save All menu item or the Save All button GI 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 d Find button The Find dialog box appears Find MEI ne J Match whole word only Direction Cancel T Match case C Up Down 32 EPSON S5U1C63000A MANUAL 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
45. 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 amp Find Next button al Find Previous button Replace To replace a word with another one select Replace from the Edit menu The Replace dialog box appears Replace 7 x Find what m Replace with Beplace Replace P T Match whole word only E Match case cma 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 wo
46. click OK The setup contents are saved and the dialog box is closed The setup contents take effect immediately If you click Cancel current settings will not be changed and the dialog box is closed Notes File name specification is subject to the following limitations 3 1 The number of characters that can be used to specify a file name including the path is 2 048 2 The file name itself not including the extension can be up to 15 characters and the exten sion up to three characters 3 The file name cannot begin with a hyphen nor can the following symbols be used as part of directory names folder names file names and extensions 1 The symbols shown below cannot be used in the User s Name and Comment Setting segment outputs The LCD drive circuit of an S1C63 Family chip that has had segment options set normally allows selecting the segment output and DC output for every two pins in certain types of microcomputers individually for each pin Segment output should be specified when using the pins for driving an LCD panel Segment output ports have a built in segment decoder allowing any address and data bit in the display memory area to be assigned to any segment When the segment memory bit is set to 1 the assigned segment lights up when the bit is set to 0 the segment dims Segments and display memory bits correspond individually so that you cannot assign one display memory bit to multiple s
47. 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 MANUAL 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 pen REI Look in Test E Si ol KS main s sub s mg Files of type assembly Source Files 5 ms Cancel Choose a source file from the list box and then click Open 2 File Open menu item or Open button a Open button A dialog box appears when this menu item or button is selected pen MEI Look in amp Test Si el E main s sub s Files of type assembly Source Files s ms Cancel Open as read only 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 e Insert into project button When the source file has been o
48. key gt 190 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Notes For the first time this command is executed no item can be skipped because no default value is set In guidance mode the following keyboard inputs have special meaning qa Command is terminated finish inputting and start execution PANI Return to previous address J Input is skipped keep current value When the command is terminated in the middle of guidance by q J the contents that have been input up to that time will be modified However these contents will not be modified if some cleared settings are left intact An error results if you input the register name other than A B X Y or F when using the direct input mode Error Incorrect register name use A B X Y F You can use the direct input mode to set register break condition at a time or change one or several items for register break setting The register value can be input as a binary number with or without mask bits or a hexadecimal number in the range of the bit width of each register An error results if the limit is exceeded Error invalid data pattern The program stops one to two instructions after the break condition has been met GUI utility Break Register Break menu item When this menu item is selected a dialog box appears for setting register break conditions Register Break x To set a register condi
49. lt data gt Defines data in the DATA section list Turns output ON list OFF nolist in the assembly list nolist file Effective only when the I option is specified stabs file name gt FileName Outputs source information for debugging stabn 0 FileEnd Effective only when the g option is specified stabn line numbers Linelnfo Assembler as63 2 Development Tools Operators Priority Parenthesis 1 Plus sign 2 Minus sign 2 Negation 2 H Acquires 8 high order bits 3 AL Acquires 8 low order bits 3 T Multiplication 4 Division 4 96 9696 Residue 4 Addition 5 Subtraction 5 Shifting to left 6 gt gt Shifting to right 6 a Equal relational operator 7 l Not equal relational operator 7 lt Less than relational operator 7 lt Less than or equal relational operator R gt Greater than relational operator 7 gt Greater than or equal relational operator 7 amp Bit AND 8 Bit XOR 9 Bit OR 10 amp amp AND relational operator 11 ll OR relational operator 12 Numbers and symbols can be used as terms in expressions The expression is calculated as a signed 16 bit data Do not put any space or TAB between operator and number Error Messages Address out of range The specified address is out of range Cannot open file kind file FILE NAME gt The specified file cannot
50. making it possible to materialize optional functions on the ICE that are equivalent to those on the actual IC 9 2 Input output Files Figure 9 2 1 shows the input output files of winfog Device information s1c63xxx ini definition file ad sien mask options Function option Function option HEX file document file To ICE Mask data creation by debugger by mask data checker Fig 9 2 1 Input Output Files of winfog Device information definition file s1c63xxx ini This file contains option lists for various types of microcomputers and other information Always be sure to use the files presented by Seiko Epson This file is effective for only the type of microcomputer indicated by the file name Do not modify the contents of the file or use the file in other types of microcomputers Function option document file zzzzzzzz fdc This is a text format file in which the contents of selected mask options are stored You can read this file into winfog and correct the already selected option settings This file is packed along with com pleted other program data files into a single file by the mask data checker winmdc which we would like to have presented to Seiko Epson as the mask data file From this file Seiko Epson will create the mask patterns for the IC Function option HEX file zzzzzzzz fsa This is the Motorola S2 format file necessary to set the selected mask options in the ICE When you debug programs with the ICE dow
51. the assembler linker hex converter to obtain the same object or hex file 7 2 Input Output Files 7 2 1 Input Files Absolute object file File format File name Description Hex file File format from Hex converter from Linker file hsa hsa file csa IEEE 695 absolute object file Motorola S file Disassembler ds63 file ms Preprocessed source file Fig 7 2 1 Flow chart Error file Binary file in IEEE 695 format lt File name gt abs A path can also be specified Absolute object file created by the linker Text file in Motorola S format File name lt File name gt hsa lt File name gt lsa and lt File name gt csa Description Hex files created by the hex converter Three hex files are needed hsa that con tains the four high order bits of the object codes with 0b000 extended lsa that contains the eight low order bits and csa that contains four bit data for the data ROM If there is no data ROM the csa file is not required 7 2 2 Output Files Source file File format Text file File name lt File name gt ms Output destination Current directory Description Disassembled contents of the input file are delivered Error file File format Text file File name ds63 err Output destination Current directory Description The file is created if the e start up option is specified It records the information that the disassembler outputs to the Standard Output s
52. tion has been loaded The display start address you specified must be within the range of the program memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or not a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX GUI utility View Program Source Display menu item Source bution When this menu item or button is selected the Source window opens or activates and displays the program from the current PC address Source button S5U1C63000A MANUAL EPSON 203 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER m mix Function Format Display This command displays the unassembled result of the program and the contents of the program source file in the Source window The display contents are as follows Line number Program memory address Object code Unassembled contents of the program Source code gt m lt address gt direct input mode lt address gt Start address for display hexadecimal or symbol IEEE 695 format only Condition 0 lt address lt last program memory address 4 When Source window is opened Unassemble ba 4b sp1 ba ba 1f ldb sp2 ba ldb ext fe calr ea ldb ldb ldb ext fe calr ef jr fd ldb ldb ldb ldb ldb calr ldb calr jr ba SP1_INIT_ADD
53. with its contents the set up items in winsog fc SLC63 Dev63 DEV63xxx_V1 Slc63xxx ini Ref are initialized with the loaded device information To stop loading the file click Cancel specified file exists and there is no problem 254 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR Once a device information definition file is selected the same file is automatically loaded the next time you start winfog If a function option document file is required for setting the segment option the dialog box shown below will appear to allow file selection In this case enter the file name including the path in the text box or choose the file from the dialog box that appears by clicking on the Ref button Function option document file name set C S1C63 DEV63 DEV63xxx_V1l zzzzzz2z FDC Lem emen Note When you load a device information definition file after setting up options all settings are reset to the default state 2 Setup Select Setup from the Tool menu or click the Setup button to bring up the Setup dialog box From this dialog box select items and enter data Setup button Segment Option File Generate Setup x Date 2c0c 4 s 7 fiz Displays the current date Change it as necessary IC SLC63 DEVE3 DEVE3xxx_Vl zzzzzzzz SDC J Segment Option Document file Specify the segment option document file 5 i 4 name you want to create The f
54. 0 address1 2 last program memory address Operation 1 Program execution The target program is executed from the address indicated by the PC Program execution is continued until it is made to break for one of the following causes The set break condition is met The Key Break button is clicked or the Esc key is pressed A map break etc occurs If a temporary break is specified the program execution will be suspended before executing the instruction at the specified address Up to two temporary break addresses can be specified gt g 1a0J Executes the program from the current PC address to address 0x1a0 When program execution breaks the system stands by waiting for a command input after displaying a break status message When you hit the Enter key here program execution is resumed beginning with a PC address next to the break address Temporary break address settings are also valid 2 Window display by program execution In the initial debugger settings the on the fly function is turned on During program execution the PC flags and watch data contents in the Register window are updated in real time every 0 5 seconds default by the on the fly function If the Register window is closed the above contents are displayed in the Command window The on the fly function can be turned off by the otf command In this case the Register window is updated after a break The Source window is updated after a b
55. 0 lt i gt 4580 0 2 E e ee e a Se EP e 3 4 5 6 lt 7 gt lt 8 gt lt 9 gt lt 10 gt 11 2 Creating melody data Create a melody data based on the score using a general purpose editor Example of melody data melody sample file Description from to the end of the line is skipped as it is regarding as a comment EMPO Start mark of tempo data It cannot be omitted mO tempo 0 1 EMPO 0 0 4 TEMPO 0 1 10 lt 1 gt Tempo 0 of the melody No 0 m0 4 2 Tempo 1 of the m0 10 END End mark of tempo data It cannot be omitted AI Start mark of main data It cannot be omitted no cntl note pitch jump tempo The data order is melody data No control bit note data m0 test pitch data jump bit and tempo No from the left 01765 00 lt 3 gt 1 6F5 00 lt 4 gt 2 5 D5t 0 0 lt 5 gt 3 2 4 RR 10 lt 6 gt 403 E5 01 lt 7 gt 5 2E5 01 lt 8 gt 6 1 D5 01 lt 9 gt 710c5 01 10 8 3 0 RR 11 l1 The jump bit in the last data of a melody should be set to 1 if data is a rest END End mark of main data It cannot be omitted CONTROL Start mark of control data It cannot be omitted mo Melody number m0 m15 0 This means that the m0 begins from 0 3 in the main data 0 4 END End mark of control data It cannot be omitted Either capitalletters or small letters can be used for describing melody data 270 EPSON S5U1C63000A MANUAL 81
56. 0 8 60 0 1 32 0 9 68 6 2 34 0 10 80 0 3 36 9 11 96 0 4 40 0 12 120 0 5 43 6 13 160 0 6 48 0 14 240 0 7 53 3 15 480 0 S5U1C63000A MANUAL EPSON 271 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 2 Main data For the main part of the score such as pitches and the duration should be described in the main data field as follows MAIN Start mark of main data It cannot be omitted mX data A comment should be described for easy reading 0 17 G6 00 116F5 00 2 5 D5 0 0 3 4 RR 10 403 E5 01 5 l1 2 E5 DL 6 D5 01 7 1 0995 9 1 8 0 RR 11 Tempo No Jump bit Pitch data Note data Control bit Main data No END End mark It cannot be omitted 2 1 Main data No Assign numbers of main data sequentially from 0 regardless of the melody number Data can be set from 0 to 494 2 2 Control bit The control bit specifies attack separating notes rest or the end of melody The control bit values 0 to 3 mean as below Table 11 4 4 2 Control Bit 0 Attack is disabled When the next note has the same pitch the current note and the next one will be played as tied notes In the above main data example two E5 at the main data No 4 and 5 will be played as one note Attack is enabled Notes will be played independently even if the next note has the same pitch 2 Indicates a rest When the control bit is set to 2 the melody data in the line is regarded as a rest even if a pitc
57. 0000 00000000000000AB 000000000000009B 000000000000008B 000000000000007B 000000000000006B 000000000000005B 00000000000000E4 000000000000003B 000000000000002B 000000000000001B 000000000000000B 00000000000000FB 01010101010101DA 01010101010101CA 01010101010101B9 01010101010101AA 00000000000000A4 000000000000009A 00000000000000F9 E2EOE2E E8AAF CEEEAA4EEFOE4FE OE2E EAEGE 8AAECEEEAA4EE2C EACAFIE boo C rj E OO NB oO ij r 0 6 0 6 6E8EAEEEEEEEF EOEOE2EOE2E040 000 EOE3F7 00000 00 000 000 00000 00000 A AOF2F4EOA6F6EOE6A81E FE 0 0 000000000000000C 00000000000000F7 Ol01FFFFFFFFFFFFFFFFFFFFFFFFFFFFF2 FB 280 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 12 MASK DATA CHECKER CHAPTER 12 MASK DATA CHECKER 12 1 Outline of the Mask Data Checker winmdc The Mask Data Checker winmdc is the software tool for checking the format of each generated file and creating the files necessary to generate mask patterns winmdc checks the HEX files of the code ROM and data ROM generated by the HEX converter hx63 the function option document file generated by the function option generator winfog and the segment option document file generated by the segment option generator winsog The winmdc also has a function fo
58. 1 0 FINE 36 17 B4 00 37 17 C5 00 38 17 D5 0 0 39 1 5 ES 0 0 40 1 7 G4 00 41 1 7 F5 00 42 1 7 ES 0 0 43 15 D5 00 44 1 7 FA 0 0 45 17 E5 00 46 17 D5 00 4715c5 00 48 17 E4 0 0 49 1 7 D5 00 50 17 C5 00 eg 7 BA 0 0 5217 E4 0 0 53 17 E4 0 0 54 17 E4 0 0 55 17 E4 0 0 56 7 E4 0 0 57 7 E4 00 58 17 E5 00 59 17 ES 0 0 60 1 7 D5 0 0 6117 E5 0 0 62 1 7 D5 0 0 63 17 E5 00 64 1 7 D5 0 0 65 17 E5 00 66 1 7 D5 1 0 DC 67 3 7 RR 1 0 Data for ending the melody END CONTROL mo 0 36 0 67 END 278 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER Example of output file Melody ROM option document file S21400000 S80400000 S21400000 S80400000 S21400000 S80400000 S21400000 S21400005 S80400000 S21400000 S21400005 S80400000 S21400000 S21400001 S21400002 S21400003 S21400004 S2140001F S80400000 S21400000 S21400001 S21400002 S21400003 S21400004 S2140001F000000000000000 S80400000 S1C63xxx 000000000000000000000000000000 OFB 008000000000000000000000000000 S21400001000000000000000000000000000000 OFB 0A39D819489710A3F665FA64800000 OFB 0000000000 0000000000 OFB 0002400430 0000000000 OFB 0010101010 0010101010 0010101020 0010101010 0010101030 0000000000 OFB 0000000000 0000000000 0000000000 0000000000 1010101010 1010101010 1010101010 1010101010 0000000000 0000000000 0000000000 0000000000 0000000000 0
59. 40 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH The edit box shows the default setting Default and the list of source files in the project The default setting applies to all the sources excluding ones that are specified independently To select options of a specific source select the check box at the front of the source file name Check here sub s No No No Each of the Error file Debug info and List file options is set to either No or Yes and it toggles by double clicking For example to change the default List file option from No to Yes double click No in the Default line It changes to Yes Source Error file Debug info List file Defines Default No Yes No Double click here It will be changed to Yes To define a name for conditional assembly double clicking the Defines part Source Error file Debug info List file Defines Default No Yes No lt Double click here then type a define name An text box appears Type a name in the box If two or more names are to be entered separate each name with a comma Refer to Chapter 4 Assembler for details of the assembler options 3 9 2 Linker Options Assembler Linker Debugger Hex Converter Soue ess tone Bi __New Dee peu ta au 1 2j Disable all branch optimizations v Output absolute list file Disable insertion of branch extension I Output Map file
60. 6666 1 6061 6666 1 6066 08607 1 88868 1 1 1 1 jr Oxfd ldb ext 6xfe calr 8xef ldb ext 6x66 mmmmnmmmmnmmm mp 216 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 2 When Trace window is closed When the td command is input without lt cycle gt the debugger displays 11 lines of the latest trace data in the Command window When the td command is input with lt cycle gt the debugger displays 11 lines of the trace data from lt cycle gt in the Command window gt tdJ Start point ENTER from the latest trace fetch fetch register flag data trace cycle addr code disasm AB X Y EICZ addr data SP in 00011 0118 00FD jr Oxfd F 1 0007 AAAA 0000 012C rAAAA 1 00010 0116 O8FE ldb ext Oxfe F 1 0007 AAAA 0000 00009 0117 O2EF calr Oxef F 1 0007 AAAA 1000 00008 0007 0800 1db ext 0x00 F 1 0007 AAAA 0000 0128 w0118 1 00007 0008 OA04 ldb x1 0x04 F 1 0007 AAAA 1000 00006 0009 1911 add x 0x01 F 1 0004 AAAA 0000 00005 F 1 0005 AAAA 0000 0004 rD 00004 000A 1990 adc x 0x00 F 1 0005 AAAA 0000 0004 wE 00003 F 1 0006 AAAA 0000 0005 r5 00002 000B 1990 adc x 0x00 F 1 0006 AAAA 0000 0005 w5 00001 F 1 0007 AAAA 0000 0006 rE gt td 104 trace fetch fetch register flag data trace cycle addr code disasm AB X X EICZ addr data SP in 00020 0009 1911 add x 0x01 F 1 0004 AAAA 0000 0001
61. 8 4 3 Source Window Mix Search Label EI Unassemble ldb ba 4b 1db ba SP1_INIT_ADDR Lab sp1 ba ldb sp1 ba ldb ba 1f 1db ba SP2 INIT fDDR ldb sp2 ba ldb sp2 ba ldb ext fe ldb ext fe calr ea calr INIT_RAM_BLK1 ldb ext fe ldb ext fe calr ef calr INC_RAM_BLK1 jr fd jr LOOP The Source window displays the contents of 1 to 4 listed below This window also allows breakpoints to be set and words or labels to be found 1 Unassembled codes and source codes You can choose one of the following three display modes 1 Mix mode selected by the Mix button or entering the m command In this mode the window displays the addresses codes unassembled contents Mix burton and corresponding source line numbers and source statements See the dia gram above 2 Source mode selected by the Source button or entering the sc command In this mode the window displays the source line numbers and source state Source button Ris 3 Unassemble mode a selected by the Unassemble button or entering the u command In this mode the window displays the addresses codes and unassembled Unassemble button Ponens rm contents This format is selected when the debugger starts up Note The m sc and u commands can update the Source window if the window is already opened If the Source window is closed the program code is displayed in the Commana window The Mix Source and Unassemble buttons open
62. 8 9 22 Help Outline of the Function Option Generator winfog Input output Files 240 ULTRI M M 241 9 31 St rtih OD M 241 9 3 2 WIHdOW isto etae itinere ree ta UD en ro fet ERR IEEE 242 9 3 3 Menus and Toolbar Buttons eese eene 243 93 44 Operation Proced f ies denies ccc erre eren e n 244 Error Messages E 247 Example Output Files l nii et tret ttt eo Red ree ie E E 248 CHAPTER 10 SEGMENT OPTION GENERATOR eese eene eese senes eeeeseeeeessessssesesses 249 10 1 10 2 10 3 10 4 10 5 Outline of Segment Option Generator winsog esee 249 Input output Files eet hte oe te aee re ern Peto EE ate USING EE 10 3 1 Starting Up 10 3 2 Window cti 10 3 3 Menus and Toolbar Buttons is anete 253 10 3 4 Option Selection Buttons seis sess eid eris 254 10 3 3 Operation Procedure ice ettet oisi poi 254 Error Messages T t ss 260 Example Output Files sie eta at iet vete eei ended 261 CHAPTER 11 MELODY ASSEMBLER eese eee eene enne nenne eeeess sensns se seeeeessessssssesesseses DOD 11 1 11 2 Outline of the Melody Assembler winmla essen 262 J put outp t FILES sg roster he e pte Yee ie i o etii pee 262 viii EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE 11 3 11 4 11 5 11 6 11 7 CONTENTS USIng WInmla2 see d oe RORIS EL EHE 263 LABEL Starting Up ceto rote terree ipia 263 TT 312 Win
63. 8 give an overview of the functions of the debugger See Section 8 9 for details of the debug commands Also refer to the follow ing manuals to understand operations of the In Circuit Emulator ICE and the Peripheral Circuit Board S5U1C63xxxP S5U1C63000H1 Manual 1C63 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 MANUAL EPSON i S1C63 FAMILY ASSEMBLER PACKAGE 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 Windows995 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 debugg
64. AA 1 0 gt Y B Y AB FFimm8 AB 1 0 gt 9eY imm4 Y imm4 FFimm8 Aimm4 1 10 o Y A Y AA Y Y 1 1 0 gt Z Y B YJAB Y Y 1 110 e Y imm4 Y Aimm4 Y Y 1 1 j0 e E Remarks Instruction List 11 S1C63000 Core CPU SE Mnemonic m y Extended function Flags Classification opcode Operand Bani unten when LDB EXT imm8 is executed Cik FET ez Symbol Logic CLR OOaddr6 imm2 OOaddr6 lt 00addr6 Anot 2imm2 2 0 o O operation FFaddr6 imm2 FFaddr6 FFaddr6 Anot 2imm2 2 0 gt O SET OOaddr6 imm2 OOaddr6 00addr6 v 2imm2 2 0 jo O FFaddr6 imm2 FFaddr6 FFaddr6 v 2imm2 2 0 o O TST OOaddr6 imm2 OOaddr6 x 2imm2 1 0 gt O FFaddr6 imm2 FFaddr6 x 2imm2 1 0 gt O Shift and SLL 96A A C D3 lt D2 lt _D1 lt D0 lt 0 1 0 gt rotate B B C D3 D2 D1 D0 0 1 0 gt X X C D3 D2 D1 lt D0 0 00imm8 C D3 lt _D2 lt _D1 lt D0 lt 0 2 0 je gt X X C D3 D2 D1 D0 0 X X 1 2 0 SY Y C D3 lt D2 lt D1 lt D0 lt 0 FFimm8 C lt D3 lt D2 lt D1 lt D0 lt 0 2 0 e e gt Y Y CeD3 D2 lt D1 D0 0 Y Y 1 2 0 o
65. AB FFimm8 FFimm8 xB 2 0 gt Y imm4 Y YJaimm4 FFimm8 FFimm8 Aimm4 2 o le Y A Y Y AA Y Y 1 2 0 gt Y B Y Y JAB Y Y 1 2 lo le Y imm4 Y Y aimm4 Y Y 1 2 0 gt us OR 96A 96A A AvA m 1 lol l le A B A AvB 1 j0 o A imm4 A Avimm4 1 0 gt A X A lt Av X A lt Av 00imm8 10 o A X A lt Av X X X 1 m 1 0 gt A Y A lt Av Y A c Av FFimm8 10 o A Y A lt Av Y Y Y 1 1 Jol J lo OR B A B BvA 1 0 gt B B B BvB B 1 lol l le Remarks S1C63000 Core CPU T Mnemonic i y Extended function Flags Classification Leeder Operand Eagle functo when LDB EXT imm8 is executed Ckleli c z Symbol Logic OR B imm4 B Bvimm4 1 lo e operation B X B Bv X B Bv 00imm8 1 lo le B X B Bv X X X 1 i 1 0 gt E B Y B B4Y B Bv FFimm8 1 0 o B Y B Bv Y Y Y 1 E 1 0 gt OR F imm4 F Fvimm4 t ti 1 1 1 i OR X A X X vA 00imm8 lt 00imm8 vA 2 0 gt X B X X vB 00imm8 lt 00imm8 vB 2 0 gt X imm4 X X vimm4 00imm8 lt 00imm8 vimm4 2 0 gt 9 X 6A X X vA X X 1
66. Cik eT cz Symbol Arithmetic ADC PA SHA A A A C x 1 0 gt operation A B A lt A B C 1 0 gt A imm4 A lt A imm4 C 1 0 gt A X A A X C A lt A 00imm8 C 1 0 gt x A X A A X C X X 1 1 0 gt A Y A A Y C A lt A FFimm8 C 1 0 gt A Y A A Y C Y Y 1 1 0 gt ADC B A B B A C 1 0 gt gt B B B B B C 1 0 gt Ge B imm4 B B imm4 C LEE B X B B X C B B 00imm8 C 1 0 gt B X B B X C X X 1 1 0 gt B Y B B Y C B B FFimm8 C 1 0 gt B Y B B Y C Y Y 1 1 0 gt ADC X A X X A C 00imm8 00imm8 A C 2 0 o e gt X B X X B C 00imm8 lt 00imm8 B C 2 10j ole 9eX imm4 X X imm4 C 00imm8 00imm8 imm4 C 2 0 olo X A X X A C X X 1 2 0 gt X B X X B C X X 1 2 0 gt X imm4 X X imm4 C X X 1 2 0 gt ADC Y A Y Y A C FFimm8 FFimm8 A C 2 0 lolo Y B Y Y B C FFimm8 FFimm8 B C 2 0 e e 9eY imm4 Y Y imm4 C FFimm8 FFimm8 imm4 C 2 0 gt Y A Y Y A C Y Y 1 2 0 gt Y B Y Y B C Y Y 1 2 0 le e 96 Y imm4 Y Y imm4 C Y Y 1 2 0 gt SUB PA SA A amp A A 1 0 gt
67. D DDDDDDDDD ow DDDDDDDDDD DDDDDDDDDDU DDDDDDDDD D DDDDDDDDDD S5U1C63000A MANUAL EPSON 167 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER df data memory fill Function This command rewrites the contents of the specified data memory area with the specified data Format 1 gt df lt address1 gt lt address2 gt data J direct input mode 2 gt df J guidance mode Start address lt address1 gt 1 End address lt address2 gt 1 Data pattern lt data gt gt lt address1 gt Start address of specified range hexadecimal or symbol IEEE 695 format only lt address2 gt End address of specified range hexadecimal or symbol IEEE 695 format only lt data gt Write data hexadecimal Condition 0 lt address lt address2 lt Oxffff 0 lt data Oxf Examples Format 1 df 200 2ff 04 Fills the data memory area from address 0x200 to address Ox2ff with 0x0 Format 2 gt df Start address 2004 Start address is input End address 2ffJ End address is input Data pattern 0 Data is input gt Command execution can be canceled by entering only the Enter key and nothing else Notes Both the start and end addresses specified here must be within the range of the data memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or a valid symbol Error invalid value no such symbol
68. Data window is opened its display contents are updated after the execution During a single step operation the program will not break even if the break condition set by a command is met Unlike in successive executions g or gr command the Register window is updated every time a step is executed GUI utility Run Next menu item Next button When this menu item or button is selected the n command without step count is executed P Next button 182 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 8 CPU Reset rst reset CPU Function This command resets the CPU Format gt rst direct input mode Notes The registers and flags are set as follows PC 0110 A A B A X AAAA Y AAAA EICZ 0000 SP1 AA SP2 AA EXT AA QUEUE AAAA The execution cycle counter is cleared to 0 If the Source window is open the window is redisplayed beginning with address 0x0110 If the Register window is open the window is redisplayed with the above contents The debug status such as memory contents breaks and trace is not reset GUI utility Run Reset CPU menu item Reset button When this menu item or button is selected the rst command is executed lt P Reset button S5U1C63000A MANUAL EPSON 183 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 9 Break bp break point set Function This command sets o
69. Dialog Can t write file xxxx File xxxx cannot be written Dialog Table 12 4 2 List of ROM Data Error Messages Message Description Display Hex data error Not S record Data does not begin with S Message Hex data error Data is not sequential Data is not listed in ascending order Message Hex data error Illegal data Invalid character is included Message Hex data error Too many data in one line Too many data entries exist in one line Message Hex data error Check sum error Checksum does not match Message Hex data error ROM capacity over Data is large Greater than ROM size Message Hex data error Not enough the ROM data Data is small Smaller than ROM size Message Hex data error Illegal start mark Start mark is incorrect Message Hex data error Illegal end mark End mark is incorrect Message Hex data error Illegal comment Model name shown at the beginning of data is incorrect Message Table 12 4 3 List of Function Option Data Error Messages Message Description Display Option data error Illegal model name Model name is incorrect Message Option data error Illegal version Version is incorrect Message Option data error Illegal option number Option No is incorrect Message Option data error Illegal select number Selected option number is incorrect Message Option data error Mask data is not enough Mask data is insufficient Message Option data error Illegal start mark Start mark is incorrect Message Option d
70. Displays the version of winfog Help menu Help H Versiont Error Messages File name error Number of characters in the file name or extension exceeds the limit Illegal character Prohibited characters have been entered Please input file name File name has not been entered Can t open File xxxx File xxxx cannot be opened INI file is not found Specified device information definition file ini does not exist INI file does not include FOG information Specified device information definition file ini does not contain function option information Function Option document file is not found Specified function option document file does not exist Function Option document file does not match INI file Contents of the specified function option document file do not match device information definition file ini A lot of parameter Too many command line parameters are specified Making file s is completed xxxx is no data exist Finished creating the file but the created file xxxx does not contain any data Can t open File xxxx Making file s is not completed File xxxx cannot be opened when executing Generate Can t write File xxxx Making file s is not completed Warning Message Are you file update xxxx is already exist File xxxx cannot be written when executing Generate Overwrite confirmation message Specified file alre
71. EPSON 53 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER Types of pseudo instructions The following 25 types of pseudo instructions are available include define macro endm ifdef ifndef else endif defnum abs align org code data bss codeword word comm lcomm global set list nolist stabs stabn For details of each pseudo instruction and its functionality refer to Section 4 7 Assembler Pseudo Instructions Restriction The mnemonics and pseudo instructions are all not case sensitive Therefore they can be written in uppercase A Z characters lowercase a z characters or both For example Id LD and Ld are all accepted as Id instructions However the user defined symbols used in the operands or param eters are case sensitive They must be the same with the defined characters When assembling with the c option all symbols are case insensitive 4 5 3 Symbols Labels A symbol label is an identifier designed to refer to an arbitrary address in the program It is possible to refer to a branch destination of a program or a data memory address using the defined symbol Definition of a symbol Usable symbols are defined as 16 bit values by any of the following methods 1 Symbol Example LABEL1 LABEL I is a label that indicates the address of a described location Preceding spaces and tabs are ignored It is a general practice to describe from the top of a line 2 Definiti
72. Example Indicates a sample execution of the command Note Shows notes on using GUI utility Indicates a menu item or tool bar button if they are available for the command Notes In the command format description the parameters enclosed by lt gt indicate they are necessary parameters that must be input by the user while the ones enclosed by indicate they are optional parameters The input commands are case insensitive you can use either upper case or lower case letters or even mixed An error results if the number of parameters is not correct when you input a command using direct input mode Error Incorrect number of parameters 158 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 3 Program Memory Operation al as assemble mnemonic Function This command assembles the input mnemonic and rewrites the corresponding code to the program memory at the specified address Format 1 gt a address lt mnemonic gt lt file name gt direct input mode 2 gt a lt address gt guidance mode Start address lt address gt Displayed only when address is omitted Address Original code Original mnemonic lt mnemonic gt address Start address from which to write code hexadecimal or symbol IEEE 695 format only lt mnemonic gt Input mnemonic valid mnemonic of S1C63000 expression and symbols are supported file name
73. FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 5 Tool Bar This section outlines the tool bar available with the debugger 8 5 1 Tool Bar Structure The tool bar has 14 buttons each one assigned to a frequently used command lO cwmmemmB 5 sosxsos09 The specified function is executed when you click on the corresponding button 6 5 2 Key Break Button This button forcibly breaks execution of the target program This function can be used to cause the program to break when the program has fallen into an endless loop 8 5 3 Load File and Load Option Buttons 5 Load File button This button reads an object file in the IEEE 695 format into the debugger It performs the same function when the If command is executed 55 Load Option button 7 This button reads a program file data file for the data ROM or an optional HEX file in Motorola S format into the debugger It performs the same function when the lo command is executed 6 5 4 Source Mix and Unassemble Buttons These buttons open the Source window or switch over the display modes Source button This button switches the display of the Source window to the source mode The Source window opens if it is closed This button performs the same function when the sc command is executed E Unassemble button This button switches the display of the Source window to the unassemble mode The Source window opens if it is closed This button performs th
74. FILE NAME gt specified with option lt option gt The specified hex file name is incorrect Illegal ICE parameter at line line number of FILE NAME gt The ICE parameter file contains an illegal parameter setting Illegal file name FILE NAME gt The specified input file name is incorrect Illegal option option An illegal option is specified Illegal absolute object format The input file is not an object file in IEEE 695 format No ICE parameter file specified ICE parameter file is not specified Out of memory Warning Message Input file name extension XXX conflict Cannot secure memory space Two or more file names with the same extension have been specified The last one is used Disassembler ds63 Development Tools Outline Disassembles an absolute object file in 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 Flowchart from Linker from Hex converter IEEE 695 absolute object file file abs file lsa_ file csa Disassembler ds63 Ss file ms Preprocessed source file Motorola S file Error file Start up Command Usage Usage ds63 options file name Options cl Use lower case characters cu Use upper case characters e Output error log file DS63 ERR
75. File in which the symbol used in the operand was defined Condition 0 address last program memory address Examples Format 1 gt a 200 ld Sa EI Assembles LD 96A 0xF and rewrites the code at address 0x200 Format 2 gt a Start address 2004 Address is input 0200 1ff6 ld a Sf add Sa Sb Mnemonic is input Source file name enter to ignore 2 Ignored 0201 1fff nop J Returned to previous address 0200 1972 add a b J Input is skipped 0201 1fff nop qd Command is terminated gt Source file name should be entered when a symbol label is used as the operand Specify the source file name in which the symbol was defined 0200 1972 add a b jr LOOP Symbol is used Source file name enter to ignore main s l Source file name is input S5U1C63000A MANUAL EPSON 159 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Notes The a and as commands have the same function The start address you specified must be within the range of the program memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or not a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX An error results if the input mnemonic is invalid for S1C63000 Error illegal mnemonic In guidance mode the f
76. G6 32 768kHz RR Rest Note data 0 7 Note data Control bit 0 3 Main data No 0 1 2 494 max END lt End mark of main data CONTROL lt Start mark of control data mO lt Melody No m0 m15 0 lt m0 starts from a a gt b gt c d 0 lt Jump from d to a a 2bc 4d 4 lt Jump from d to e e2fg h i Control bit END End mark of control data 0 Attack is disabled Tie 1 Attack is enabled 2 Rest 3 End of a melody Mask Data Checker winmdc 1 Development Tools Outline The Mask Data Checker winmdc checks the format of the code data ROM HEX files generated by the HEX converter hx63 and the option document files generated by the function option generator winfog segment option generator winsog and melody assembler winmla and create a file necessary to generate mask patterns winmdc also has a function for restoring the created mask data file into the original file format K DATA CHECK Flowchart Device information Code ROM definition file HEX file ZZZZZZZzz hsa Melody ROM Data ROM Function option option Segment option HEX file document file document file document file E c Lena 22222222 sad Packing To Seiko Epson Pack file C63xxxyYY paN mask data file Unpacking Mask Data Checker winmdc 2 Development Tools Buttons Tool bar aa Pack button tel Packs the ROM data file a
77. GUI utility File Flash Memory Operation menu item When this menu item is selected a dialog box appears allowing selection of flash memory operations Flash Memory Operation Ea To execute the fl command select Load from flash memory from the Operation list box and Operation KK select contents using the check boxes then clock OK E Protect ash memory Contents program C dms T fog D sog Cancel T ni pa 210 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Sfl save to flash memory Function This command writes the contents of the target memory in the ICE into the flash memory Writing to the flash memory allows the ICE to be operated in free run mode Furthermore the next debug session can be continued immediately from the current contents in the flash memory Format 1 gt sfl content lt content gt p direct input mode 2 sfl guidance mode Protect flash memory 1 yes 2 no lt 1 2 Write program 1 yes 2 no lt 1 2 1 data 1 yes 2 no lt 1 2 gt 1 fog 1 yes 2 no lt 1 25 sog 1 yes 2 no lt 1 s mla 1 yes 2 no 1 2 1 Saving gt content Data type p program d data f fog s sog m mla p Protect option Examples Format 1 gt sfl p d f s m pJ Saves all contents and sets prorect Please wait few minutes Save to flash memory done gt
78. Generate from the Tool menu or clicking the Generate button this area displays a message showing the result of the selected operation 264 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 11 3 3 Menus and Toolbar Buttons This section explains each menu item and toolbar button File menu File F Open Exit Tool menu Tooli Generate G Device INI Select Help menu HelptH Versiont Open Opens a melody ROM option document file Use this menu command when correcting an existing file The Open button has the same function g Open button Exit Terminates winmla Generate Sets the date of creation output file name and a comment included in the melody ROM option document file and creates a file according to the selected contents of the option list The Generate button has the same function el Generate button Device INI Select Loads the device information definition file s1c63xxx ini The Device INI Select button has the same function This file must be loaded first before performing any operation with winmla 8 Device INI Select button Version Displays the version of winmla The Help button has the same function 8 Help button The dialog box shown below appears Click OK to close this dialog box About winmla winmla Version x xx E Copyright C SEIKO EPSON CORP 2001 S5U1C63000A MANUAL EPSON 2
79. Insertion of debugging information When the g option is specified as a start option the preprocess stage of the assembler will insert debugging pseudo instructions in the preprocessed file Therefore you do not have to describe these pseudo instructions in creating source files S5U1C63000A MANUAL EPSON 81 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 15 Comment Adding Function The preprocessing pseudo instructions that begin with are all expanded to codes that can be as sembled and delivered in the preprocessed file Even after that those instructions are rewritten with comments beginning with a semicolon so that the original instructions can be identified However note that the replacements of Define names will not subsist as comments The comment is added to the first line following the expansion In case the original statement is accompa nied by a comment that comment is also added A macro definition should have a semicolon placed at top of the line Example Before expansion define Areg oe Di macro ADDX2Y VALUE ld Areg VALUE add Areg x ld sy Areg fendm ADDX2Y 10h MX 10h gt MY After expansion no debugging information define Areg ga macro ADDX2Y VALUE ld Areg VALUE H add Areg x id y Areg tendm ADDX2Y 10h MX 10h MY ld Sa 0x10 add Sa Sx ld Syl a 4 7 16 Priority of Pseudo Instructions Some remarks concer
80. Map Address Address EPSON OxFFFF OxFFFF I O memory area Program area OxFF00 Datt d OxFEFF CMOS 4 bit Single Chip Microcomputer 0x0140 S1C63 Family Assembler Package 0x013F Software interrupt vectors Data area 0x0111 k R f 0x0110 Program start address UIC ererence 0x010F 0x0400 Hardware interrupt vectors OxOSFF for De elo ment 0x0101 Data and SP1 stack area V p 0x0100 NMI vector 0x0100 OxOOFF Progr OxOOFF adu Sik Data and SP1 SP2 stack area 0x0000 gek 0x0000 4 gt 4 13 bits 4 bits S1C63000 Core CPU Registers Flags 15 8 7 4 3 0 3 0 PC Program counter F Flag register X T E 1 C Z ndex register XH XL 9 PN Z Zero flag 1 Zero 0 Non zero Y C Carry flag 1 Carry borrow 0 No carry YH YL Index register Y I Interrupt flag 1 Enabled 0 Disabled E Extension mode flag 1 Extended mode 0 Normal mode QUEUE Queue register 0 0 0 0 0 0 SP1 0 0 Stack pointer 1 00H SP2 Stack pointer 2 EXT Extension register BA F B Data register B amp A S1C63000 Core CPU Symbols in the Instruction List Registers Register Data Functions 96A A Data register A or the contents of the register 4 bits c Indicates that the right item is loaded or set to the left item B B Data register B or the contents of the register 4 bits e Indicates that data is exchanged between the right and left items BA BA Data register BA or the contents of the register 8 bits the B register is high order 4 bits Addition
81. No Previous No New No E0C63158 S1C63158 E0C63467 S1C63467 E0C5250 S1C05250 E0C63256 S1C63256 E0C63557 S1C63557 E0C5251 S1C05251 E0C63358 S1C63358 E0C63558 S1C63558 EOC63P366 S1C6P366 E0C63567 S1C63567 E0C63404 S1C63404 E0C63F567 S1C6F567 E0C63406 S1C63406 E0C63658 S1C63658 E0C63408 S1C63408 E0C63666 S1C63666 E0C63F408 S1C6F408 EOC63F666 S1C6F666 E0C63454 S1C63454 E0C63A08 S1C63A08 E0C63455 S1C63455 E0C63B07 S1C63B07 E0C63458 S1C63458 E0C63B08 S1C63B08 E0C63466 S1C63466 EOC63B58 S1C63B58 EOC63P466 S1C6P466 Comparison table between new and previous number of development tools Development tools for the S1C63 Family Development tools for the S1C63 88 Family Previous No New No Previous No New No ADP63366 S5U1C63366X ADS00002 S5U1C88000X1 ADP63466 S5U1C63466X GWH00002 S5U1C88000W2 ASM63 S5U1C63000A URM00002 S5U1C88000W1 GAM63001 S5U1C63000G ICE63 S5U1C63000H1 PRC63001 S5U1C63001P PRC63002 S5U1C63002P PRC63004 S5U1C63004P PRC63005 S5U1C63005P PRC63006 S5U1C63006P PRC63007 S5U1C63007P URS63366 S5U1C63366Y 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 51C63 Family Assembler Package common to all the models of the 1C63 Family Caution We are not respon
82. No code to locate There is no valid code for mapping No ICE parameter file specified ICE parameter file is not specified No name and address specified with option lt option gt Name and address are not specified with the option No object file specified Object files to be linked are not specified Out of memory Cannot secure memory space lt section kind gt section lt address gt lt address gt overlaps with lt section kind gt section lt address gt lt address gt The address range of the section overlaps with another section s address range lt section kind gt section lt address gt lt address gt overlaps with the unavailable memory The address range of the section overlaps with the unavailable memory Unresolved external lt label gt in lt FILE NAME gt Reference was made to an undefined symbol Unusable instruction code lt instruction code gt in lt FILE NAME gt Warning Messages Cannot create lt file kind file lt FILE NAME gt The object contains an instruction invalid for the model The file cannot be created Cannot open lt file kind gt file lt FILE NAME gt The file cannot be opened No debug information in lt FILE NAME gt Debugging information is not included in the file No symbols found Symbols cannot be found Second definition of label lt label gt in lt FILE NAME gt The label has already been defin
83. Table 8 8 3 2 Commands menu item to operate on data memory Function Command Menu Dumping data memory dd View Data Dump Entering modifying data de Rewriting specified area df Copying specified area dm DEEZ eae i cuzns nzoj 663 6662 66162 6 KK HH HH HHH KH HHH HH X HK 6F Fx BFFx ess x x SS x 6F 6F 6F F QF x 6FF FF OFF OF F B F F 5 5 x 3 x x HH X G64 Dxxx xx 2 80 8 Ox x x 66660 xxx 666 6 6 6 x FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 1 Dumping data memory The contents of the data memory are displayed in hexadecimal dump format If the Data window is opened the contents of the Data window are updated if not the contents of the data memory are displayed in the Command window 2 Entering modifying data Data at a specified address is rewritten by entering hexadecimal data Data can be directly modified on the Data window 144 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE 3 Rewriting specified area An entire specified area is rewritten with specified data 4 Copying specified area The content of a specified area is copied to another area 5 Monitoring memory Four memory locations each with area to store 4 consecutive words can be registered as watch data addresses The registered watch data can be verified in the Register window The content of this window is updated in real time at 0 5 second intervals by th
84. The org pseudo instruction is used to specify the starting location of each code block The following shows examples of disassembled sources Sample outputs Absolute list file test als Linker 63 ver x xx Absolute list file TEST ALS Mom Jan 15 12 40 41 2001 qs sub s 21 AS63 test program subroutine EE 4 global RAM BLK1 5t 61 RAM block 1 initialize K ER global INIT_RAM_BLK1 9 INIT RAM BLK1 0 0000 0800 ldb ext RAM_BLK1 h T3 0001 0a04 ldb x1 RAM_BLK161 set RAM_BLK1 address to x 2 0002 1e90 ld x 0x0 3 0003 1e90 ld Sx 0x0 4 0004 1e90 ld x 0x0 5 0005 1e80 ld x 0x0 7set 0x0000 to RAM BLK1 6 0006 1ffB8 ret K 8 P RAM block 1 increment 93 20 global INC RAM BLK1 21 INC RAM BLK1 22 0007 0800 ldb ext RAM BLK1Gh 23 0008 0a04 ldb xl RAM BLK1Gl set RAM BLK1 address to x 24 0009 TILL add Sx 1 25 000a 1990 adc x 0 26 000b 1990 adc x 0 27 000c 1980 adc x 0 increment 16bit value 28 000d l1ff8 ret 29 main s 30 AS63 test program main routine 31 A 323 33 P INITIAL SP1 amp SP2 ADDRESS DEFINITION 34 354 ifdef SMALL_RAM 36 set SP1_INIT_ADDR Oxb SP1 init addr 0x2c 37 telse 38 set SP1_INIT_ADDR 0x4b 7SP1 init addr 0xl2c 393 endif 40 41 set SP2 INIT ADDR Oxlf SP2 init addr Oxlf 42 43 44 NMI amp BOOT LOOP 45 46 global INIT_RAM_BLK1 subroutine in s
85. The file name displayed by default can be modified You can use the Ref button to look at other folders Melody ROM Option HEX Do you make hex file Select whether to create a melody ROM option HEX file You need to create one when you use the ICE to debug programs Melody ROM Option HEX file When you create a melody ROM option HEX file specify its file name here The file name displayed by default can be modified You can use the Ref button to look at other folders EPROM Type This option is not available for S1C63 Family microcomputers User s Name Enter your company name Up to 40 characters can be entered You can use English letters numbers symbols and spaces The content entered here is recorded in the USER S NAME field of the melody ROM option document file Comment Enter a comment Up to 50 characters can be entered in one line You can enter up to 10 lines You can use English letters numbers symbols and spaces Use the Enter key to create a new line All comments should include the following information Place of business your department or section e Address telephone number and facsimile number Other Technical information etc The content entered here is recorded in the COMMENT field of the melody ROM option document file When you have finished entering the above necessary items click Generate The melody ROM option document file you specified and the melody ROM option HEX file if specified
86. The step count must be specified within the range of 0 to 65 535 An error results if the limit is ex ceeded Error Number of steps out of range use 0 65535 If the Data window is opened its display contents are updated after the execution During a single step operation the program will not break even if the break condition set by a command is met Unlike in successive executions g or gr command the Register window is updated every time a step is executed GUI utility Run Step menu item Step button When this menu item or button is selected the s command without step count is executed 7h Step button S5U1C63000A MANUAL EPSON 181 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER n next Function This command single steps the target program from the current PC position by executing one instruc tion at a time Format gt n lt step gt direct input mode lt step gt Number of steps to be executed decimal default is 1 Condition 0 lt step lt 65 535 Operation This command basically operates in the same way as the s command However the calr calz and int instructions including all subroutines until control returns to the next address are executed as one step Notes The step count must be specified within the range of 0 to 65 535 An error results if the limit is ex ceeded Error Number of steps out of range use 0 65535 If the
87. abs If no extension is specified abs will be supplemented at the end of the specified output path file name The 1st input file name is used for the output file names Output of symbol file Outputs a symbol file If this option is not specified no symbol file will be output Output of cross reference file Outputs a cross reference file If this option is not specified no cross reference file will be output Set up of a relocatable CODE section start address Sets the absolute start address of a relocatable CODE section Absolute sections remain unaffected CODE sections are mapped in succession from this address unless otherwise specified e One or more spaces or tabs are necessary between code and address The address should be described in hexadecimal format 0xnnnn If this option is not specified the CODE section will begin from the code ROM physical start address specified with the ICE parameter file code 0x100 Set up of a relocatable DATA section start address Sets the absolute start address of a relocatable DATA section Absolute sections remain unaffected DATA sections are mapped in succession from this address unless otherwise specified One or more spaces or tabs are necessary between data and address The address should be described in hexadecimal format 0xnnnn If this option is not specified the DATA section will begin from the data ROM physical start address specified wi
88. an output path file name without extension or with an extension o If no extension is specified o will be supplemented at the end of the specified output path file name Default The input file name is used for the output file names C Function Explanation Default Function Explanation Default Function Explanation Default Ignore character case of symbols e Allows description of symbols in case insensitive If this option is not specified symbol names will be case sensitive Output of relocatable list file e Outputs a relocatable list file If this option is not specified no relocatable list file will be output Output of error file Creates an ert file which contains the information that the assembler outputs to the Standard Output stdout such as error messages If this option is not specified no error file will be created When entering an option in the command line you need to place one or more spaces before and after the option The options can be specified in any order It is also possible to enter options after the source file name Example c epson sic63 bin as63 g e l d TEST1 d TEST2 test s S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE EPSON 49 CHAPTER 4 ASSEMBLER 4 4 Messages The assembler delivers all its messages through the Standard Output stdout Start up message The assembler outputs only the following message when it starts up Assemb
89. are mapped to the location specified in the source files The start addresses of the CODE and BSS relocatable sections in test2 0 is specified by the rcode and rbss options so CODE3 is mapped from address 0x0110 and CODE 4 follows CODES BSS4 is mapped from address 0x0400 Since the start addresses of the relocatable CODE DATA and BSS sections in test1 0 have not been specified they are mapped from the relocatable section start addresses specified by the code data and bss options First the linker will try to map CODEI from address 0x0000 to address 0x00ff If CODE 1 is smaller than 0x100 words CODEI can be mapped from address 0x0000 In this example CODEI is mapped behind CODE4 because CODE1 is larger than 0x100 words DATA is mapped from address 0x8000 and BSS1 is mapped from address 0x0000 A section cannot be overlapped to other sections therefore an error will occur if there is no free area larger than the section size For example an error will occur if CODE2 is larger than 0x10 words S5U1C63000A MANUAL EPSON 101 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 11 Branch Optimization Function The PC relative branch instructions jr jrc jrnc jrz jrnz and calr need an address extension instruction Idb ext imm8 when the relative distance to the destination address exceeds the 127 to 128 range Since the location of relocatable sections is not decided until the linking process is completed the linke
90. area 168 dm data memory move Copy data area 169 dw data memory watch Set watch data address 170 Option information od option data dump Dump option data 172 Register operation rd register display Display register values 174 rs register set Modify register values 175 Program execution g go Execute successively 177 gr go after reset CPU Reset CPU and execute successively 179 S step Step into 180 n next Step over 182 CPU reset rst reset CPU Reset CPU 183 Break bp breakpoint set Set breakpoint 184 bc bpc breakpoint clear Clear breakpoint 186 bd data break Set data break 187 bdc data break clear Clear data break 189 br register break Set register break 190 brc register break clear Clear register break 192 bs sequential break Set sequential break 193 bsc sequential break clear Clear sequential break 195 bsp break stack pointer Specify stack area for illegal stack access detection 196 bl breakpoint list Display all break conditions 198 bac break all clear Clear all break conditions 199 Program display u unassemble Unassemble display 200 sc source code Source display 202 m mix Mix display 204 Symbol information sy symbol list List symbols 206 Load file If load file Load IEEE 695 format absolute object file 207 lo load option Load Motorola S format file 208 Flash memory Ifl load from flash memory Read from flash memory 209 operation sfl save to flash memory Wr
91. box 212 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER efl erase flash memory Function This command erases the contents of the ICE flash memory including map information and removes its protect function Format efl direct input mode Example eflJ Clear flash memory done gt Note When erased by the efl command all data in the flash memory is initialized at Oxff Even when part of the data such as a program is thereafter written to the flash memory by the slf command all other data remains unchanged Oxff In this condition the ICE cannot be operated in free run mode In order for the ICE to be operated in free run mode always make sure that after erasing the flash memory all the data has been written into the flash memory In the ICE furthermore the default values for all option data are 0x00 Consequently if you write to the flash memory before loading option data lo command the data you have written to the flash memory is overwritten by 0x00 GUI utility File Flash Memory Operation menu item When this menu item is selected a dialog box appears allowing selection of flash memory operations Flash Memory Operation x To execute the efl command select Erase flash memory from the Operation list box and then Operation iS SN S Sd clock OK E Protect flash memory Contents Program fad n B Cancel E
92. 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 e me Help button Displays the help window E S5U1C63000A MANUAL EPSON 19 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH 3 4 2 Build Toolbar This tool bar has the following buttons and list boxes used to build a project Z 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 PaRe3ADBPAR ICE Parameter pull down list box PAR 634 08 PAR Selects the ICE parameter file for the model being developed In this box all the PAR63B07 PAR ICE parameter files that exist in the Dev63 directory are listed Absolute Object Intel Hex IEEE 695 absolute object format Intel HEX format and Motorola S format The Motorola S build process will generate an exec
93. command and measurement is taken until execution of a specified number of steps is completed The counter is reset every step if execution of only one step is specified or execution is initiated by a tool bar button or menu command 4 Resetting execution cycle counter The execution cycle counter is reset in the following cases When the CPU is reset with the rst command Reset in the Run menu or the Reset button When the gr command or Go from Reset in the Run menu is executed When the execution cycle counter mode is switched over by the md command between execution time and bus cycle modes or between hold and reset modes When program execution is started in reset mode Resetting the CPU The CPU is reset when the gr command is executed or by executing the rst command When the CPU is reset the internal circuits are initialized as follows 1 Internal registers of the CPU PC 0x0110 A B Oxa X Y QUEUE OXaaaa F 0b0000 SP1 SP2 EXT Oxaa 2 The execution cycle counter is reset to 0 3 The Source and Register windows are redisplayed Because the PC is set to 0x0110 the Source window is redisplayed beginning with that address The Register window is redisplayed with the internal circuits initialized as described above The data memory contents are not modified 148 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 8 5 Break Functions The tar
94. displays a message Unpacking completed in the Unpack message text box If an error has occurred an error message is displayed 5 Click the Cancel button to close the dialog box Alternatively you can click the Cancel button to quit winmdc before it executes unpacking 4 Quitting To terminate winmdc select End from the File menu 286 EPSON 5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE 12 4 Error Messages The error messages of winmdc are listed below The Dialog in the Display column means that messages are displayed in the dialog box and Message means that messages are displayed in the message area of the Pack or Unpack dialog box CHAPTER 12 MASK DATA CHECKER Table 12 4 1 List of I O Error Messages S1C63 FAMILY ASSEMBLER PACKAGE Message Description Display File name error Number of characters in the file name or extension exceeds the limit Dialog Illegal character Prohibited characters have been entered Dialog Please input file name File name has not been entered Dialog INI file is not found Specified device information definition file ini does not exist Dialog INI file does not include MDC information Specified device information definition file ini does not contain Dialog MDC information Can t open file xxxx File xxxx cannot be opened
95. f no address parameter is specified all the breakpoints that have been set are cleared The format of parameters is same as the bp command You can also use the guidance input mode of bp command to do the same operation You can use this command for multiple times to clear breakpoints An error results if an address that is not set at a breakpoint is specified GUI utility Break Breakpoint Set menu item When this menu item is selected a dialog box appears for clearing breakpoints See the bp com mand Break button Error Input address does not exist When this button is clicked after placing the cursor to a break address line in the Source window the breakpoint is cleared If the address has not been set as a breakpoint this button sets a new breakpoint at the address di Break button 186 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER bd data break Function This command sets or clears data break This command allows you to specify the following break conditions 1 Memory address range to be read or written one area 2 Data pattern to be read or written bit mask possible 3 Memory read write three conditions read write or read or write The program breaks after completing a memory access that satisfies the above conditions Format 1 gt bd data option lt address1 gt address2 direct input mode 2 gt bd gu
96. file Sample symbol file Linker 63 ver x xx Symbol file TEST SYM Mon Jan 15 12 40 41 2001 CODE section labels of TEST ABS Address Type File Symbol 0x0110 Local MAIN O BOOT 0x0007 Global SUB O INC RAM BLK1 0x0000 Global SUB O INIT RAM BLK1 0x0116 Local MAIN O LOOP 0x0100 Local MAIN O NMI BSS section labels of TEST ABS Address Type File Symbol 0x0000 Global MAIN O RAM BLKO 0x0004 Global MAIN O RAM BLK1 Contents of symbol file Symbol Indicates all the defined symbols in alphabetical order Address Indicates the absolute address defined for the symbol Type Indicates the scope of the symbol Global or Local File Indicates the object file in which the symbol has been defined S5U1C63000A MANUAL EPSON 97 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 8 Absolute List File The absolute list file is an assembly source file that carries the absolute addresses and object codes added to the first half of each line It is delivered only when the l option is specified Its file format is a text file and the file name is file name gt als The file name gt is the same as that of the output object file While a relocatable list file can be made for each assembly source file the absolute list file is made as a single file integrating all the linked objects and their according sources Sample absolute list file Linker 63 ver x xx Absolute
97. file A standard text file can also be displayed in this window Two or more windows can be opened in the edit window area Work Bench wb63 2 Development Tools Tool bars Standard tool bar New button Creates a new document source header or project Open button Opens a document source header or project Save button Saves the document in the active Edit window to the file The file will be overwritten Save All button 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 Find button Finds the specified word in the active Edit window 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 Help button Displays the help window S 5 s5 82 3 5 1 n u o Saves the documents of all Edit windows and the project information to the respective files Build tool bar Assemble button Assembles the assembly source in the active Edit window Build button Builds the currently opened project using a general make process Rebuild All button Rebuilds the currently opened project Stop Bu
98. file is not specified Out of memory Cannot secure memory space 6 6 2 Warning Even if a warning is issued the hex converter keeps on processing and completes the processing after displaying a warning message unless in addition any error occurs Warning message Input file name extension XXX conflict Description Two or more file names with the same extension have been specified The last one is used 6 7 Precautions 1 When creating the hex files for making the mask data file in the mask data checker specify Motorola S format and convert for the entire available memory range of the model do not specify the b and i options Otherwise an error will occur in the mask data checker Refer to the Development Tool Manual of each model for details of the mask data checker 2 If an 8 character output file name DOS file name without extension is specified for the Intel HEX wow files it will be changed to a long file name because h hex I hex or c hex is added to the file name 110 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 7 DISASSEMBLER CHAPTER 7 DISASSEMBLER This chapter describes the functions of the disassembler ds63 7 1 Functions The disassembler s input is an object in IEEE 695 or Motorola S format The code in the object file is disassembled into mnemonics and output as a source file The restored source file can be processed in
99. for constant definitions 30 EPSON 5U1C63000A MANUAL 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 i Open button The Open dialog box appears 1 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 WorkBench63 Version X XX main s ER Absolute Object Fa eg e main s ASM63 test program main routine jxxxxx INITIAL SP1 amp SP2 ADDRESS DEFINITION sexe tifdef SMALL_RAM set SP1_INIT_ADDR 6xb SP1 init addr 6x2c telse 18 set SP1_INIT_ADDR 6x4b SP1 init addr 6x12c 11 tendif 12 13 set SP2 INIT fDDR 8x1f SP2 init addr 8x1f 14 15 16 xxx NMI amp BOOT LOOP sexe 17 zi 5U1C63000A MANUAL EPSON 31 S1C63 FAMILY ASSEMBLER PACKAGE 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 Save in atest z Si cl SES we BO Save as type Assembly Source Files s ms Cancel 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 KH Save
100. format File name Description Trace file File format File name Description Text file file name gt log An extension other than log can also be used This file contains the information of executed commands and execution results that are output to a file Output of this file can be controlled by the log command Text file file name cmd An extension other than cmd can also be used This file contains the information of executed commands that are output to a file Output of this file can be controlled by the rec command Text file file name gt trc An extension other than trc can also be used This file contains the specified range of trace information Output of this file can be con trolled by the tf command S5U1C63000A MANUAL EPSON 119 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 3 Starting Method 8 3 1 Start up Format General form of command line db63 lt parameter file name gt start up option denotes a space indicates the possibility to omit Note The parameter file will be recognized by its extension par so par must be included in the parameter file name to be specified 8 3 2 Start up Options The debugger has three start up options available command file name Function Explanation comX Function Explanation b baud rate gt Function Explanation Specifies a command file For a series of commands to be executed i
101. function option document file is required for setting the segment option a dialog box will appear to allow file selection In this case enter the file name including the path in the text box or choose the file from the dialog box that appears by clicking on the Ref button winsog exe Startup by command input You can also start winsog from the MS DOS prompt by entering the command shown below gt winsog s1c63xxx ini d denotes entering the return key You can specify the device information definition file s1c63xxx ini as a command option You can also specify a path When you specify the device information definition file here winsog reads it as it starts If a function option document file is required for setting the segment option the file zzzzzzzz fdc must be prepared in the directory in which s1c63xxx ini and winsog exe exist before entering the command When the command is entered a dialog box will appear to allow file selection Enter the file name including the path in the text box or choose the file from the dialog box that appears by clicking on the Ref button This specification can be omitted 250 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR When winsog starts it displays the SOG window The following diagrams show a SOG window when the device information definition file has been loaded and when it has not SOG Segment Option Generator
102. hexadecimal number or a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xFFFF e The contents of the unused area will be marked as If you encounter any address marked by a press Enter key to skip that address or terminate the command Data must be input using a hexadecimal number in the range of 4 bits 0 0xf An error results if the limit is exceeded Error Data out of range use 0 0xF When the contents of the data memory is modified using the de command the displayed contents of the Data window are updated automatically n guidance mode the following keyboard inputs have special meaning g Command is terminated finish inputting and start execution AJ Return to previous address ml Input is skipped keep current value If the maximum address of data memory is reached and gets a valid input other than J the command is terminated 166 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER GUI utility Data window The Data window allows direct modification of data Click the Data window and select the displayed data to be modified then enter a hexadeci mal number n A A A A A A A A A DDDDDDDDDD Ee DDDDDDDDD DJ DDDDDDDDDD U DDDDDDDDD OA DDDDDDDD D ju EE EE EE EE ETH DDDDDDDDD J DDDDDDDDDD O DDDDDDDDDDU DDDDDDDDD
103. line numbers and symbol information in the object file created after linking Capable of outputting a link map file symbol file absolute list file and a cross reference file Automatic page correction function insertion removal correction of the Idb ext imm8 branch extension instruction for branch instructions 5 2 Input Output Files from Assembler x Linker Relocatable ICE command file object file s parameter file i file cm file par Linker IK63 EN file map ils Tile abs iezi file als keen Link Symbol Absolute Cross Absolute Error file map file file object file reference file list file to Debugger Fig 5 2 1 Flow chart 5 2 1 Input Files Relocatable object file This file must always be specified in either a command line or a link command file File format Binary file in IEEE 695 format File name lt File name gt o A path can also be specified Description Object file of individual modules created by the assembler Linker command file File format Text file File name lt File name gt cm A path can also be specified Description File to specify the linker options This makes it possible to reduce typing in a command line This file is dispensable if all start up options can be input in a command line ICE parameter file This file must always be specified in either a command line or a link command file File format Binary file Fi
104. list file TEST ALS Mon jan 15 12 40 41 2001 ls b s 2s AS63 test program subroutine 31 4 global RAM BLK1 ss 6 7 RAM block 1 initialize K 8 global INIT_RAM_BLK1 ER INIT RAM BLK1 10 0000 0800 ldb Sext RAM_BLK1 h 113 0001 0a04 ldb xl RAM BLK1Gl set RAM BLK1 address to x 12 0002 1e90 ld x 0x0 554 org 0x110 56 1 BOOT 57 0110 094b ldb ba SPl1 INIT ADDR 58 0111 lfc4 ldb spl ba set SP1 59 0112 091f ldb ba SP2 INIT ADDR 60 0113 lfc6 ldb sp2 ba set SP2 61 0114 08fe ldb est fe 62 0115 02ea calr INIT RAM BLK1 initialize RAM block 1 63 LOOP 64 0116 08fe ldb est fe 65 0117 Diet calr INC_RAM_BLK1 increment RAM block 1 66 0118 00fd Ja LOOP infinity loop Contents of absolute list file The format of each line of the absolute list file is as follows Line No Absolute address Code Source statement Line No Indicates the line number from the top of the file Address Indicates the absolute address after the instruction is allocated Code Indicates the object code Source The contents of the assembly source file are delivered Results of branch optimization extension code insertion deletion correction As the result of branch optimization extension codes Idb ext imm8 may be coded without accor dance to the source part To show the result of such code optimizations clearly the following descrip tion will be made on an absolute list file When an
105. memory 0xFFC0 0xFFFF 4 k 00imm8 8 bit absolute addressing with imm8 or the contents of the specified memory 0x0000 0x00FF nidicates thie number of execution cycles FFimm8 8 bit absolute addressing with imm8 or the contents of the specified memory 0xFF00 0xFFFF Symbol immN i7 i0 n4 n3 n0 Sign8 s7 s0 addr6 a5 a0 O0addr6 FFaddr6 SP1 SP1 16 bit stack specification or the contents of the stack address SP2 SP2 4 bit stack specification or the contents of the stack address Immediate Data N bit unsigned immediate data N 2 4 6 or 8 Bit data of immN 4 bit radix specification data Bit data of n4 Signed 8 bit immediate data Bit data of sign8 6 bit absolute address Bit data of addr6 An address 0x0000 0x003F specified with addr6 An address 0xFFC0 0xFFFF specified with addr6 O Indicates that a symbol can be used for the operand instead of an 8 bit or 6 bit immediate data However the symbol value must be within the range that can be specified If a symbol mask is listed the instruction can use the symbol mask for the operand in addition to a symbol Symbol mask l Acquires the low order 8 bits of an absolute address h Acquires the high order 8 bits of an absolute address Ql X Acquires the low order 8 bits of a relative address rh Acquires the high order 8 bits of a relative address xh Acquires the inverted high order 8 bits of an absolute address Note
106. menu are recently used source Displays a dialog box for selecting paper and printer Build menu Replace Ctrl H Replaces the specified words in the active Edit window Go To Ctrl G Jumps to the specified line or label in the active Edit window and project files Exit Assemble Ctrl F7 i i Terminates the work bench Assembles the assembly source in the active Edit window Selecting one opens the file Deep Chee T Build F7 i Undo Ctrl Z Egal n Builds the currently opened project using a general make process Edit menu Rebuild All Undoes the previous executed operation in the Edit window 1 Rebuild All Edi Cut Ctrl X Simp pisse Rebuilds the currently opened project Unde Cuz Cuts the selected text in the Edit window to the clipboard Debug F5 Stop Build Ctrl Break Copy Ctrl C EU Stops the build process being executed Cut IR Ge Copies the selected text in the Edit window to the clipboard risk Get Debug F5 P d Cil Paste Ctrl V o E 2 E Invokes the debugger with the specified ICE parameter file ids i Pastes the text copied to the the Edit window EU Omer Settings Alt F7 Select All Die Select All Ctrl A Displays a dialog box for selecting tool options i Selects all text in the active Edit window ICE parameter file Find Ctrl F Replace Ctrl H Find Ctrl F Displays a dialog box for selecting an ICE parameter file
107. menu item is selected a dialog box appears for setting stack areas Stack Break To set stack areas enter start and end addresses in the text boxes then click OK S5U1C63000A MANUAL EPSON 197 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER bl break point list Function This command lists the current setting of all break conditions Format bl direct input mode Example gt b14 PC break 1 0116 2 0200 Sequential break ls 0116 2s 0120 33 pass 3 Data break data 1 R W W area 0000 000F Register break Ark Bet ek Yi BUCA eee Stack break SP1 0000 O3FF SP2 0000 OOFF 2 GUI utility Break Break List menu item When this menu item is selected the bl command is executed 198 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER bac break all clear Function This command clears all break conditions set by the bp bd br and or bs commands Format gt bac direct input mode GUI utility Break Break All Clear menu item When this menu item is selected the bac command is executed S5U1C63000A MANUAL EPSON 199 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 10 Program Display U unassemble Function This command displays a program in the Source window after unassembling it The display con tents are as follows Program memory address Object code Unass
108. next guidance so be sure to input all necessary parameters sequentially If the Enter key is pressed without entering a parameter in some guidance session of a command the system assumes the command is canceled and does not execute it 136 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER e Commands that replace existing data after confirmation The commands that rewrite memory or register contents one by one provide the option of skipping guidance do not modify the contents returning to the immediately preceding guidance or terminat ing during the input session Enter key Skips input Key s ees Returns to the immediately preceding guidance g key Terminates the input session Input example gt deJ Command to modify data memory Data enter address 04 Inputs the start address 0000 A 1 Modifies address 0x0000 to 1 0001 A J Returns to the immediately preceding address 0000 1 01 Inputs address 0x0000 back again 0001 A Skips address 0x0001 by pressing Enter alone 0002 A 0001 A g Terminates the input session gt Numeric data format of parameter For numeric values to be accepted as a parameter they must be input in hexadecimal numbers for almost all commands However some parameters accept decimal or binary numbers The following characters are valid for specifying numeric data Hexadecimal 0 9 a f A F D
109. not specified correctly the linker ends after delivering the following message concerning the usage Usage 1k63 options file names Options d Disable full branch optimization dr Disable removal branch optimization e Output error log file ERR g Add source debug information I Output absolute list file ALS m Output map file MAP o file name Specify output file name s Output symbol file SYM X Output cross reference file XRF code address Specify CODE start address data address Specify DATA start address bss address Specify BSS start address rcode file name address Specify CODE start address of the file rdata file name address Specify DATA start address of the file rbss file name address Specify BSS start address of the file defsym symbol address Define symbol address File names Relocatable object file 0 Command parameter file CM ICE parameter file PAR When error warning occurs If an error takes place an error message will appear before the end message shows up Example Error Cannot create absolute list file TEST ABS Link 1 error s 0 warning s In the case of an error the linker ends without creating an output file If a warning is issued a warning message will appear before the end message shows up Example Warning No debug information in TEST O Link 0 error s 1 warning s In the case of a warni
110. o start up option S5U1C63000A MANUAL S1C63 FAMILY ASSEM EPSON 105 BLER PACKAGE CHAPTER 6 HEX CONVERTER 6 3 Starting Method General form of command line hx63 Options Absolute object file name ICE parameter file name gt denotes a space indicates the possibility to omit The order of options and file names can be arbitrary File names Absolute object file File name gt abs ICE parameter file File name gt par The extension of an absolute object file can be omitted The ICE parameter file must be specified with its extension A long file name supported in Windows and a path name can be specified When including spaces in the file name enclose the file name with double quotation marks o file name Options The hex converter comes provided with the following four start up options b Function Conversion of existing codes only Explanation Converts and delivers only the object codes that exist in the specified absolute object file Data for unused addresses is not delivered Default If this option is not specified the hex data for the entire available memory range of the model is delivered to the output file Unused addresses are filled with Oxff e Function Output of error files Explanation Creates an err file which contains the information that the hex converter outputs to the Standard Output stdout such as error messages Default If this option is not s
111. of descending priorities S Syntax Error There is a fatal syntax error The control data is placed antecedent to the main data There is control data even though main data is not described Errors in tempo data Melody No The melody No is out of the range 0 15 or not described in ascending order Tempo No The tempo No is not 0 or 1 Tempo data The tempo data is out of the range 0 15 Errors in main data Main data No The main data No is out of the range 0 494 or not described in ascending order Control bit The control bit is out of the range 0 3 The control bit for a rest pitch data RR is not 2 or 3 The control bit at the end of a melody is not 3 Note data The note data is out of the range 0 7 Pitch data The pitch data is out of the range D4 D7 38 4kHz or C4 G6 32 768kHz Jump bit The jump bit is not 0 or 1 Tempo No The tempo No is not 0 or 1 Errors in control data Melody No The melody No is out of the range m0 m15 or not described in ascending order Melody data No The melody data No is out of the range set in the main data O ROM Overflow The definition exceeded the scale ROM capacity 17 or more pitches are defined R Range Error W Warning The definition exceeded the tempo ROM capacity 17 or more melodies are defined The definition exceeded the main ROM capacity 496 or more main data are defined The definition exceeded the control ROM capaci
112. of the three addresses While passing through all ad dresses sequentially in the order they are set the program executes the last specified address a specified number of times then breaks after fetching the instruction from that address again Format 1 gt bs lt pass gt lt address1 gt lt address2 gt lt address3 gt direct input mode 2 gt bs guidance mode Sequential break set status 1 set 2 clear wi sl 254 Command is completed when 2 is selected Number of sequential address 1 3 lt 1 2 32 1 Set address Old address lt address1 gt 1 Set address Old address lt address2 gt 1 Set address Old address lt address3 gt 1 Pass count Old count pass gt lt pass gt Pass count decimal lt address1 3 gt Program execution address hexadecimal or symbol IEEE 695 format only Condition 0 lt address1 3 lt last program memory address 0 lt pass lt 4095 Examples Format 1 gt bs 3 116 1204 Sets two sequential addresses and the pass count In this case a break will occur when the CPU fetches the instruction at address 0x0120 after the instruction at address 0x0116 is executed and the instruction at address 0x0120 is executed three times Format 2 gt bsa ls ve 2 Zi pass 1 set 2 clear 14 1 set is selected Number of segential address 1 3 24 Number of addresses is input Set address 1164 Ist address is input Se
113. on the actual IC Note The Segment Option Generator winsog is provided for only certain types of microcomputers that have set segment options 10 2 Input output Files Figure 10 2 1 shows the input output files of winsog Device information definition file Function option 22222222 dc document file Selection of mask options Segment assignment Segment option Segment option data file HEX file document file To ICE Mask data creation by debugger by mask data checker Fig 10 2 1 Input Output Files of winsog Device information definition file s1c63xxx ini This file contains option lists for various types of microcomputers and other information Always be sure to use the files presented by Seiko Epson This file is effective for only the type of microcomputer indicated by the file name Do not modify the contents of the file or use the file in other types of microcomputers Function option document file zzzzzzzz fdc This is the text format file generated by winfog and contains the selected mask options This file is required only when the segment option setup condition depends on the mask option selected with winfog Segment option document file zzzzzzzz sdc This is a text format file in which setup contents of segment options are stored You can read this file into winsog and correct the option settings This file is packed along with completed other program data files into a single file by the mas
114. option is added If the option lt a gt is added the symbol list will be sorted by address The symbol list can only be displayed when the object file in IEEE 695 format has been read The specification of keyword conforms to which defined for assembler tools GUI utility None 206 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 12 Load File If load file Function This command loads an object file in IEEE 695 format into the debugger Format 1 gt If file name gt direct input mode 2 gt If guidance mode File Name file name gt gt lt file name gt File name to be loaded path can also be specified Examples Format 1 gt lf test abs l Loading file OK gt Format 2 gt 1f4 File name test abs Loading file OK gt Notes Anerror results if the loaded file is linked with a different ICE parameter file than the one the debugger is using Error Different chip type cannot load this file e Only an IEEE 695 format object file generated by the linker can be loaded by the If command If you want to use source display and symbols when debugging a program the object file must be in IEEE 695 format that contains debug information loaded into the computer If the Source window is opened when loading a file its contents are updated The program contents are displayed from the current PC address f an e
115. relative branch operation The operators can be used with this symbol similar to labels Example jr Jumps to this address means endless loop jr 42 Jumps to two words after this address jr 10 Jumps to 10 words before this address jr 16 16 BLK gt 16 Operators and defined symbols can be used Precaution When the address referred to relatively with is in another section it should be noted if the in tended section resides at the addressed place because if the section is relocatable the absolute address is not fixed until the linking is completed 4 5 10 Optimization Branch Instructions for Old Preprocessor The old version of the S1C63 preprocessor has optimization branch instructions for optimizing the extension code Since this function is supported by the linker in the current version they are expanded without an extension code in the assembler The relative distance to the label does not affect this expan sion Optimization Branch Instruction Mnemonic after Expansion xjr LABEL gt jr LABE xjre LABEL gt jrc LABE xjrnc LABEL gt jrnc LABE xrz LABEL gt jrz LABE xjrnz LABEL gt jrnz LABE xcalr LABEL gt calr LABE 60 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 6 Section Management 4 6 1 Definition of Sections The memory configuration of the S1C63 Family microcomputer is divided into a code R
116. selected The following lists the maximum values that can be measured by the execution cycle counter Execution time mode 2 147 483 647 usec approx 36 min error 1 usec Bus cycle mode 2 147 483 647 cycles error 0 2 Displaying measurement results The measurement result is displayed in the Register window This display is cleared during program execution and is updated after completion of execution If the Register window is closed the measurement result can be displayed in the Command window using the rd command The execu tion results of single stepping are also displayed here If the counter s maximum count is exceeded the system indicates over flow 3 Hold mode and reset mode In the initial debugger settings the execution cycle counter is set to hold mode In this mode the measured values are combined until the counter is reset The reset mode can be set by the md command In this mode the counter is reset each time the program is executed In successive execution the counter is reset when the program is made to start executing by entering the g command and measurement is taken until the execution is terminated beak occurs The same applies for the gr command except that the counter is reset simultaneously when the CPU is reset Consequently the counter operates the same way in both hold and reset modes In single stepping the counter is reset when the program is made to start executing by entering the s or n
117. source will be made with all labels in upper case characters and instructions in lower case characters e Function Output of error file Explanation Creates an err file which contains the information that the disassembler outputs to the Standard Output stdout such as error messages Default If this option is not specified an error file will not be created o file name gt Function Specification of output path file name Explanation Specify an output path file name without extension or with the extension ms If no extension is specified ms will be supplemented at the end of the specified output path file name Default The input file name is used for the output file name When entering an option in the command line one or more spaces are necessary before and after the option Example c epson s1c63 bin ds63 e o c output ms 112 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 7 DISASSEMBLER 7 4 Messages The disassembler delivers all its messages via the Standard Output stdout Start up message The disassembler outputs the following message when it starts up Disassembler 63 Ver x xx Copyright C SEIKO EPSON CORP 1998 2001 End message The disassembler outputs the following messages to indicate which files have been created when it ends normally Created preprocessed source file lt FILE NAME gt MS Created error log file DS63 ERR Disassembly
118. symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xFFFF An error results if the start address is larger than the end address Error end address start address Data must be input using a hexadecimal number in the range of 4 bits 0 to Oxf An error results if the limit is exceeded Error Data out of range use 0 0xF Write operation is not performed to the read only address of the I O area When there is an unused area in the specified address range no error occurs The area other than the unused area will be filled with the specified data When the contents of the data memory is modified using the df command the displayed contents of the Data window are updated automatically GUL utility None 168 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER dm data memory move Function This command copies the contents of the specified data memory area to another area Format 1 dm lt address1 gt lt address2 gt lt address3 gt 1 direct input mode 2 dm i guidance mode Start address lt address1 gt End address lt address2 gt Destination address lt address3 gt 1 gt lt address1 gt Start address of source area to be copied from hexadecimal or symbol IEEE 695 format only lt address2 gt End address of source area to be copied from hexadecimal or symbol IEEE 695 format only lt addr
119. the flash memory in this way you can protect it against read and write 3 Erasing flash memory All contents of the flash memory are erased Table 8 8 7 1 Commands to operate on flash memory Function Command Menu Read from flash memory Ifl File Flash Memory Operation Write to flash memory sfl File Flash Memory Operation Erase flash memory efl File Flash Memory Operation Note Unless the contents of the parameter file that is specified when invoking Debugger db63 match the contents of parameters in the flash memory neither write sfl nor read Ifl to and from the flash memory can be performed After you have received the shipment of the ICE erased the flash memory or used a different parameter file designed for some other microcomputer model in the S1 63 Family be sure to write the contents of your parameter file along with other data into the flash memory using the sfl command Free run of the ICE When operating the ICE in free run mode with the program executed using only the ICE the IC uses the data written in the flash memory Therefore before the ICE can be used in free run mode the entire program data and option data must be written into the flash memory To operate the ICE in free run mode set the ICE RUN switch to the RUN position and turn on the power During free run map breaks caused by operation in the program and data areas set by a parameter file are effective Wh
120. the specified melody ROM option document file do not Dialog not match INI file match device information definition file ini A lot of parameter Too many command line parameters are specified Dialog MDT file error Contents of the read melody data is incorrect Message Details are saved with error symbols in the ELG file Can t open File xxxx File xxxx cannot be opened when executing Generate Message Making file s is not completed Can t write File xxxx File xxxx cannot be written when executing Generate Message Making file s is not completed Table 11 5 2 winmla Warning Messages Message Description Display Are you file update Overwrite confirmation message Dialog xxxx is already exist Specified file already exists S5U1C63000A MANUAL EPSON 275 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 11 6 Error Symbols When an error occurs during assembling the error symbols listed below or an error message is output to the assembly list file ELG file The error symbol is placed at the beginning of the statement in which an error occurred If two or more errors occur all the error statements have an error symbol Example S Syntax Error LISTING OF ERRORLOG zzzzzzzz elg 2000 12 22 TEMPO mO tempo 0 TEMPO 0 0 21 END MAIN adr cntl note scale jump tempo m0 For Elize 014c4 00 Error statement 214D4 00 lt Error statement 0 0 2 1 4 E4 The following lists the error symbols in the order
121. this file A different ICE parameter is used in the file Break by accessing no map program area Break caused by accessing undefined program memory area end address lt start address The start address is larger than the end address error file type extension should be CMD The specified file extension is invalid Break by accessing no map data area Break caused by accessing undefined data memory area FO address out of range use 0 0xEF FO address is invalid illegal code The input code is not available Break by accessing ROM area Break caused by writing to data ROM area illegal mnemonic The input mnemonic is invalid for S1C63000 Out of SP1 area Break caused by accessing outside SP1 stack area Incorrect number of parameters The parameter number is incorrect Out of SP2 area Break caused by accessing outside SP2 stack area Incorrect option use f u i s c il cm An invalid mode setting option was specified Break by external break ICE errors communication error Break caused by signal input to ICE BRKIN pin Communication error other than time out overrun framing or BCC error CPU is running Target is running Incorrect r w option use r w An illegal R W option was specified Incorrect register name use A B X Y F An invalid register name was specified Incorrect register name use PC A B X Y F SP1 SP2 EXT Q The spec
122. toolbars are hidden 8 ij set SP1_INIT_ADDR 8x4b SP1 init addr 6x12c behind the Edit window area is set SP2_INIT_ADDR Gx1F SP2 init addr 8x1F To return it to the normal display click enen MHL amp BOOT LOOP zeen the button that appears on the screen 17 H 1 AM descend This button can be moved anywhere in 26 D n 21 org 0x100 the screen by dragging its title bar 22 NMI A 2 meu ee EE Pressing the ESC key also returns the 25 Lee S window to the normal display 28 ldb ba SP1_INIT_ADDR 29 ldb sp1 ba set SP1 30 1db ba SP2_INIT_ADDR 31 1db p2 ba set SP2 32 calr INIT RAM BLK1 initialize RAM block 1 33 L00P 34 calr INC RAM BLK1 increment RAM block 1 35 jr Loop infinity loop LIEBSTEN E 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 SJ Cascade
123. tracing all 4 096 cycles trace information for the location 4 096 cycles before the trace trigger point may be left in the trace memory according to its capacity Trace trigger point Execution started oe ses 4 096 cycles 4 096 cycles Trace sampling range Fig 8 8 6 2 Trace range when middle is selected If the trace trigger point is set to end Trace is halted after sampling trace information at the trace trigger point In this case the trace information at the trace trigger point is the latest information stored in the trace memory If the program stops before tracing the trace trigger point the system operates in the same way as in normal mode Trace trigger point Execution started kt ae 8 192 cycles Trace sampling range Fig 8 8 6 3 Trace range when end is selected If the program is halted in the middle of single delay trigger trace bus cycles are traced from the beginning when trace is executed next S5U1C63000A MANUAL EPSON 153 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 3 Address area trace In this mode trace information is taken into the trace memory only when instructions within or outside a specified address range are executed This address range can be set in up to four locations by the tm command Whether you want trace to be performed within or outside that address range can also be specified by a command Trace trigger address The tm command sets a trace
124. warnings refer to Section 6 6 Error Warning Messages S5U1C63000A MANUAL EPSON 107 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 6 HEX CONVERTER 6 5 Output Hex Files 6 5 1 Hex File Configuration Since each 1C63000 instruction has a 13 bit code the hex converter always generates two hex files for the high order data and the low order data of the program code The low order data hex file lsa or l hex contains the low order bytes bits 7 to 0 of the object codes The high order data hex file hsa or h hex contains the high order bytes bits 12 to 8 suffixed by high order bits 0b000 4 bit data for the data ROM is output to the csa or c hex file By specifying the i option the hex converter can convert the absolute object file into Intel HEX files as well as Motorola S format However use Motorola S format format when loading the hex files to the debugger or creating the mask data by the mask data checker because the debugger and mask data checker do not support Intel HEX files 6 5 2 Motorola S Format The hex converter converts an absolute object file in the IEEE 695 format into the Motorola S2 format files by default The files are generated with an extension hsa for the high order program file lsa for the low order program file and csa for the data ROM file The following shows a sample data in Motorola S2 format length address data sum 11 II II S224000000FFFFFFFFFFFFFFFFFFFFFFFFFF
125. will all be delivered but the operation of the program cannot be guaranteed The warning messages and their contents are given below Warning message Description Cannot create file kind file FILE NAME gt The file cannot be created Cannot open file kind file FILE NAME The file cannot be opened No debug information in FILE NAME gt Debugging information is not included in the file No symbols found Symbols cannot be found Second definition of label label in The label has already been defined FILE NAME gt Second ICE parameter file FILE NAME gt ignored Two or more ICE parameter files are specified S5U1C63000A MANUAL EPSON 103 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 13 Precautions 1 Upper limits such as a maximum section count and the number of objects to be linked depend on the free memory space 2 To load the absolute object file created by the linker to the debugger the same ICE parameter file must be specified when the debugger is invoked 3 In the previous version omission of the d option enables automatic insertion and correction of the extension codes note however that deletion of the extension codes must be enabled using the er option The current version has no er option and all the insertion deletion correction functions are enabled by default To disable the deletion and insertion functions when the d option is omitted the dr opti
126. 0 38400 120 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 3 3 Start up Messages When the debugger starts up it outputs the following message in the Command window Refer to the next section for details about windows Debugger63 Ver x xx Copyright SEIKO EPSON CORP 1998 2001 Connecting COMx with xxxxx baud rate done Parameter file nam XXXXXXXX par Version i XX Chip name 63xxx CPU version DOX X PRC board version X X LCD board version X X EXT board version tOXOX ICE hardware version X X ICE software version X X DIAG test omitted EE done Tea Se ge EE ws md was eke done gt 8 3 4 Hardware Check at Start up When the debugger is invoked it first performs the tests and initializing operations described below 1 Testing connection of the ICE Debugger db63 first checks to see that the ICE is connected to your system and that communication is possible without any problems The following message is displayed in the Command window During test Connecting COMx with xxxxx baud rate When terminated normally Connecting COMx with xxxxx baud rate done When an error is encountered Connecting COMx with xxxxx baud rate failure error message The error message indicates that communication between the personal computer and the ICE is not functioning properly In this case to verify the following A standard RS 232C cable is used The
127. 0 error s 0 warning s Usage output If no file name was specified or an option was not specified correctly the disassembler ends after delivering the following message concerning the usage Usage ds63 options file name Options cl Use lower case characters UOu Use upper case characters e Output error log file DS63 ERR o file name Specify output file name File names Absolute object file ABS or CSA LSA HSA When error warning occurs If an error occurs an error message will appear before the end message shows up Example Error Cannot open file TEST ABS Disassembly 1 error s 0 warning s In the case of an error the disassembler ends without creating an output file If a warning is issued a warning message will appear before the end message shows up Example Warning Input file name extension HSA conflict Disassembly 0 error s 1 warning s In the case of a warning the disassembler ends after creating an output file For details on errors and warnings refer to Section 7 6 Error Warning Messages S5U1C63000A MANUAL EPSON 113 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 7 DISASSEMBLER 7 5 Disassembling Output The data code mnemonics are restored from the target code As for the branch instructions a label will be automatically generated such as CODEx where x denotes a hexadecimal number string Other reference symbols will also be generated as LABELx IOx and RAMx
128. 000000000 1010101010 1010101010 1010101010 1010101010 0000000000 0000000000 OOOEB 000E3 000DB 000A0 1 000EB 0009B 00084 0009B 101DB 101CB 101BA 101AB 000A5 000FA OEOE2EOE2E E4E6E8AAE Ini CEEEAA4 KE 0E401 OA8EEEOE2E o E2EOE4EGE 8AAECEE EAA4E E2F 4CAFIE ESE OE 6A822 OESE OEE I OY ESE 4EE lo OO AOF2E 4E0A6F6FE FEOEOE2F OE 2E043 OE2E o OFB FILE NAME D INE USER S NAME UT DATE E3F 7000 ELODY OPTIO 000 zzzzzzzz MDC S EIKO COMMEN X X X Opt For ionl Elize OPTION NO l selecti OPT1101 Sel 01 cted 4 kkk OPTION NO2 ox pt ion2 selecti OPT1201 EOF Sel 01 cted 0000000 DOCUM EPSON CORPORATION yyyy mm dd ENT Vx XX 000000000000F 000000000000000000FA Melody address ROM HEX data Melody tempo ROM HEX data Melody scale ROM HEX data Melody control ROM HEX data Melody main ROM HEX data lt Version lt File name specified by Generate lt User name specified by Generate lt Date of creation specified by Generate lt Comment specified by Generate lt Option number lt Option na
129. 04 SP1 aa ffi SP2 aa ffi EXT 0 J Q 0 4 When a register is modified the Register window is updated to show the contents you have input If you input q to stop entering in the middle the contents input up to that time are updated S5U1C63000A MANUAL EPSON 175 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Notes Anerror results if you input a value exceeding the register s bit width Error invalid value An error results if you input a register name other than PC A B X Y F SP1 SP2 EXT or O in direct input mode Error Incorrect register name use PC A B X Y F SP1 SP2 EXT Q In guidance mode the following keyboard inputs have special meaning ql Command is terminated finish inputting and start execution A Return to previous register J Input is skipped keep current value GUI utility Register window The Register window allows direct modification of data Click the Register window select the displayed data to be modified and enter a value then press Enter 176 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 7 Program Execution g go Function This command executes the target program from the current PC position Format gt g lt address1 gt lt address2 gt direct input mode address1 2 Temporary break addresses hexadecimal or symbol IEEE 695 format only Condition
130. 0x0001 SUB O COD 0x0007 SUB O COD 0x0008 SUB O COD A P4 Pd P4 Label INC_RAM_BLK1 at 0x0007 SUB O CODE Global 0x0117 MAIN O CODE Label NMI at 0x0100 MAIN O CODE Local Label BOOT at Ox0110 MAIN O CODE Local Label LOOP at 0x0116 MAIN O CODE Local 0x0118 MAIN O CODE Contents of cross reference file The format of each label information is as follows Label information Address File name gt lt Type gt Label information Indicates the following information Label name Defined address Object file in which the label is defined Section type Scope Address Indicates the address where the label is referred File Indicates the object file in which the label is referred Type Indicates the type of section that contains the address where the label is referred S5U1C63000A MANUAL EPSON 99 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 10 Linking Linking rules The linking process takes place in conformity with the following rules Absolute sections are mapped ahead of relocatable sections according to the absolute addresses which were defined at the time of assembling If an absolute section exceeds the available memory area an error will occur The relocatable sections in the file of which the section start address was specified with an option rcode rdata rbss are mapped from the specified address Other relocatable sections are mapped f
131. 1 The example given above is an ordinary source description method For increased visibility the elements composing each statement are aligned with tabs and spaces S5U1C63000A MANUAL EPSON 51 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER Restrictions Only one statement can be described in one line A description containing more than two instructions in one line will result in an error However a comment or a label may be described in the same line with an instruction Example OK BOOT ld f 0x4 jError BOOT ld S 0x4 ld a 0x0 One statement cannot be described in more than one line A statement that cannot complete in one line will result in an error Example word 0x0 0x1 0x2 0x3 OK word Oxa 0xb 0xc 0xd OK word 0x0 0x1 0x2 0x3 Oxa 0xb 0xc 0xd Error The maximum describable number of characters in one line is 259 ASCII characters If this number is exceeded an error will result The usable characters are limited to ASCII characters alphanumeric symbols except for use in comments Also the usable symbols have certain limitations details below The reserved words such as mnemonics and pseudo instructions are all not case sensitive while the user defined items such as labels and symbols are all case sensitive if the c option is not specified Therefore mnemonics and pseudo instructions can be written in uppercase A Z characters lower case a z characters or both Fo
132. 1 MELODY ASSEMBLER 11 3 2 Window Option list area Melody ROM option document area ML tMelody Assembler File F Tool HelpiH Bl 2 Root OPTION NO 20 option20 v selecti selecti Selected select2 OPT2001 01 No 20 optionzO No 21 Option21 OPTION NO 21 Option21 IT select2 selecti Selected OPT2101 01 selecti Making file s is completed The area can be resized by dragging the frame boundary Message area The microcomputer model name on the title bar is the file name not including the path and extension of the device information definition file that has been read The option list and the melody ROM option document vary with each type of microcomputer Fig 11 3 2 1 Window Configuration The MLA window is divided into three areas as shown above Option list area Lists melody generator mask options set in the device information definition file s1c63xxx ini Use the check boxes in this area to select each option A selected option has its check box marked by V Melody ROM option document area Displays the contents of selected options in the option document format The contents displayed in this area are output to the melody ROM option document file When you change any selected item in the option list area the display in this area is immediately updated Message area When you create a file by selecting
133. 1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 4 2 Command Window Parameter file version Program area Data ram area Data rom area LCD area External memory area The Command window is used to do the following 1 Entering debug commands When the prompt gt appears in the Command window the system will accept a command entered from the keyboard If some other window is selected click on the Command window A cursor will blink at the prompt indicating that readiness to input a command Refer to Section 8 7 1 Entering Commands from Keyboard 2 Displaying debug commands selected from menus or tool bar When a command is executed by selecting the menu item or tool bar button the executed command line is displayed in the Command window 3 Displaying command execution results The Command window displays command execution results However some command execution results are displayed in the Source Data Register or Trace windows The contents of these execution results are displayed when their corresponding windows are open If the corresponding window is closed the execution result is displayed in the Command window When writing to a log file the content of the write data is displayed in the window Refer to the description for log command Note The Command window cannot be closed 126 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER
134. 1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 12 MASK DATA CHECKER 12 3 2 Menus and Toolbar Buttons This section explains each menu item and toolbar button File menu FiletF Erd Tool menu Tool T Pack P Unpack UD Device INI Select Help menu Help H Versiont End Terminates winmdc Pack Packs the ROM data file and option document file to create a mask data file for presentation to Seiko Epson The Pack button has the same function 8 Pack button Unpack Restores files in the original format from a packed file The Unpack button has the same function di Unpack button Device INI Select Loads the device information definition file s1c63xxx ini The Device INI Select button has the same function This file must be loaded first before performing any operation with winmdc B Device INI Select button Version Displays the version of winmdc The Help button has the same function Help button The dialog box shown below appears Click OK to close this dialog box About Winmdc Winmde Ver x xx Ka Copyright C SEIKO EPSON CORP 2001 S5U1C63000A MANUAL EPSON 283 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 12 MASK DATA CHECKER 12 3 3 Operation Procedure The following shows the basic operation procedure 1 Loading the Device information definition file First select a device information definition file s1c63xxx ini and load it
135. 2 1 Commands that can be specified from menu or tool bar Command Function Menu Button If Load IEEE 695 absolute object file File Load File lo Load Motorola S file File Load Option g Execute program successively Run Go g address Execute program to address successively Run Go to Cursor gr Reset CPU and execute program successively Run Go from Reset e s Step into Run Step SE n Step over Run Next E com cmw Load and execute command file Run Command File rst Reset CPU Run Reset CPU x bp bc bpc Set clear PC breakpoint Break Breakpoint Set di bd bdc Set clear data break Break Data Break br brc Set clear register break Break Register Break bs bsc Set clear sequential break Break Sequential Break bsp Set stack break Break Stack Break bl Break list Break Break List 8 bac Clear all break conditions Break Break All Clear tm Set trace mode Trace Trace Mode Set ts Search trace information Trace Trace Search tf Save trace information to a file Trace Trace File u Unassemble display View Program Unassemble EI SC Source display View Program Source Display m Mix display View Program Mix Mode Ifl Load from flash memory File Flash Memory Operation sfl Save to flash memory File
136. 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 O New button The New dialog box appears New EPSON Assembly Source File EPSON Assembly Header File Cancel EPSON Project File if 2 Select EPSON Assembly Source File and click OK 8 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 2 SOFTWARE DEVELOPMENT PROCEDURE A new edit window appears Edit window poe Version X XX ASM1 Djzlala ei Ll 219 Pele rams m pesce zl Si test files 3 Enter source codes in the Edit window 1 main s 2 ASHM63 test program main routine 3 4 D xxxxx INITIAL SP1 amp SP2 ADDRESS DEFINITION xxxx 6 7 ifdef SMALL_RAH 8 set SP1_INIT_ADDR 8xb SP1 init addr 8x2c 9 Helse 16 set SP1_INIT_ADDR Ox4b SP1 init addr 6x12c 11 tendif 12 13 set SP2 INIT fDDR 8x1f SP2 init addr 8x1f 14 15 16 xxxxx NMI amp BOOT LOOP xxxxx 17 sl 4 Save the source in a file by selecting Save from the File menu or clicking the Save button HM Save button 5U1C63000A MANUAL EPSON 9 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 2 SOFTWARE DEVELOPMENT PROCEDURE 5 Click the Insert into project button on the Edit window e Insert into project button The creat
137. 2 gt 1 gt xdps lt address1 gt lt address2 gt for main FPGA for sub FPGA lt address1 gt Start address to display hexadecimal lt address2 gt End address to display hexadecimal Condition 0 lt address lt address2 lt FPGA end address Examples direct input mode direct input mode If only lt address1 gt is defined the debugger displays data for 256 words from lt address1 gt gt xdp 04 Addr 0 1 2 3 4 5 6 7 8 9 A B C D E F 00000 FF 84 AB EF F9 D8 FF BB FB BB BF FB BF BF FB BF 00010 BB FB BB BF BB BF FB BB BF BF FB BB FE FE E 00020 EF FE D7 FB FE EE EF EEF EE EE FE EE FB FE EF EF 000E0 FF FF FF FF FB FF FF FE BD DF FB FD DF FF FF FE 000F0 FF FF BF FF FF FF FF F9 FF FF FF FF FF FF FF FF gt If both lt address1 gt and lt address2 gt are defined the debugger displays data from lt address1 gt to lt address2 gt gt xdp 100 1004 Addr 0 1 2 3 4 5 6 7 00100 FF gt Notes 8 9 A B C D E F e Anerror results if the specified address is not a hexadecimal number Error invalid value Anerror results if the start address is larger than the end address GUI utility None Error end address lt start address S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE EPSON 235 CHAPTER 8 DEBUGGER 8 9 21 Quit Q quit Fu
138. 3 LineInfo T ADDR T ADDR LEI calr INIT_RAM_BLK1 24 LineInfo reti org 0x110 28 LineInfo ldb ba SPl1 IN 29 LineInfo ldb spl ba 30 LineInfo ldb ba SP2 IN 31 LineInfo ldb sp2 ba 32 LineInfo calr INIT RAM B 34 LineInfo calr INC RAM BL 35 LineInfo j LOOP RAM block org 0x0 bss comm RAM BLKO comm RAM BLK1 0 FileEnd 4 4 7SP1 init addr 0x2c SPl init addr Oxl2c SP2 init addr Oxlf subroutine in sub s subroutine in sub s initialize RAM block 1 in NMI watchdog timer set SP1 set SP2 initialize RAM block 1 increment RAM block 1 infinity loop CHAPTER 4 ASSEMBLER S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE EPSON 85 CHAPTER 4 ASSEMBLER Assembly list file Assembler 63 ver x xx Relocatable List File MAIN LST Mon Jan 15 12 40 41 2001 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 Error file 0 AO UD Q M P O i0 0 JO Ui 4 UND R o 10 TT 12 13 14 oO OO GO CO o T5 0000 0004 0200 1ff9 0900 1fc4 0900 1fc6 0200 0200 0000 00 00 main ASM63 test program H fk kx k x y tifdef telse endif Pk k KKK H NMI BOOT LOOP S main routine INITIAL SP1 amp SP2 ADDRESS DEFINITION SMALL RAM set SP1 INIT ADDR Oxb set SP1 INIT ADDR 0x4b
139. 3 6 4 Opening and Closing a Project 3 6 5 Files in the Work Space Folder eene 9 7 JSOHTGOEOIOE xi tiit eebe INI a IE Ua HS 3 7 1 Creating a New Source or Header File 3 7 2 Loading and Saving Files EE 347 4 Tug SUMP Functio gege ss astes t ss EEN EE AA IL PME m DEED S5U1C63000A MANUAL EPSON iii S1C63 FAMILY ASSEMBLER PACKAGE CONTENTS 3 6 Build eenegen ee ieee 36 3 84 Preparing a Reeder Eh eege dech 36 3 8 2 Building an Executable Object css asas ss ss eter 36 BESIDE Oa ae 37 3 6 4 Executing E 38 3 9 Jool Option Settings ccce Re e e ete tore e RU Eee ins 40 3 9 1 Assembler ODt0fns ec eo cte deed 40 3 9 anker ODUONS toa cce ep aida eicere em s e dr e 41 3 9 3 Debugger OPuOnssesccrevtevessavssciaseoasarvenssisvseseseoustaevent svesreinsvescuesesediancorsensers 43 3 9 4 HEX Converter ODIOHS eere rores tenian as s atsaka 43 3 10 Work Bench Options sect eese ete tuse tese so dee ev e rea d 44 BAL Short Cut EE 45 312 Error Messages ise iet Ro e ERR dE 45 S13 EE 46 CHAPTER 4 ASSEMBLER E e SM IDIOT 47 42 Input Output Files oett or RR RE RR NR tads 47 4 2 1 Input File 4 2 2 Output Files 4 3 Sarun Method ette netie as 49 4 4 MESSAGES E 50 4 5 Grammar of Assembly Source eese eene 51 4 IL Statements RETE ERE JI 4 5 2 Instructions Mnemonics and Pseudo instructions eese 53 4 3 3 Symbols L
140. 32 768KHz Selected 7 CR 60KHz OPTO101 O1 No 2 OSC3 SYSTEM CLOCK OPTION NO 2 V CR 200KHz OSC3 SYSTEM CLOCK CR Type i 8MHz CR 200KHz Selected Ceramic 4HHz OPTO201 01 7 CR external resistor OPTION NO 3 No 3 INPUT PORT PULL UP RES t INPUT PORT PULL UP RESISTOR Koo KOO With Resistor Selected i i 7 With Resistor KO1 BE Resiator Selected M KOZ With Resistor Selected Gate Direct KO3 With Resistor Selected K01 K10 With Resistor Selected 7 Vith Resistor e Kil With Resistor Selected Ki2 With Resistor Selected C Gate Direct NK13 With Resistor Selected K02 z Anani ni T M 4 b 4 gt Making file s is completed oe The area can be resized by dragging the frame boundary Message area The microcomputer model name on the title bar is the file name not including the path and extension of the device information definition file that has been read The option list and the function option document vary with each type of microcomputer Fig 9 3 2 1 Window Configuration The FOG window is divided into three areas as shown above Option list area Lists mask options set in the device information definition file s1c63xxx ini Use the check boxes in this area to select each option A selected option has its check box marked by V Function option document area Displays the contents of selected o
141. 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 MANUAL EPSON 21 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH 3 5 Menus File Edit View Insert Build Tools Window Help 3 5 1 File Menu New Ctrl N Open Ctrl 0 Close pen worksp ce Close Workspace Save Ctri S Save As Save All Print Ctrl P Print Preview Page Setup 1 sub s 2 main s 5 test epj Exit 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 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 0 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
142. 5U1C63000A MANUAL 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 M 3 Assembly S1C63xxx Development Tool file MAK file S Jor file MS source file s Make file ERECTAE CUN MOD MU NRI Assembler l Function Option T as63 Generator winfog NE i Assembly 7 a NE list file s mers jj LIES jj IMs jj oe g teFSA tile FDC T o d 1 lt __ d a H al Object p E Function option Function option i Linker file s reprocasse i HEX file document file source file s Segment Option Generator winsog file ABS 1 file ALS era l file SSA file SDC command file Symbol file file SYM list file m T H H Cn Absolte f 4Cross j Segment option Segment option Link map file file MA object file file XRF reference i HEX file document file j file od B Melody HEX converter data file hx63 E l Melody Assembler winmla Intel HEX Motorola S i i i format files format files Bod i tieMSA file MDC i
143. 5U1C63000A MANUAL EPSON 227 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 18 Map Information ma map information Function This command displays the map information that is set by a parameter file Format gt maJ Example After the command is input the system displays the chip name version of the parameter file and map information in each area When you input the Enter key here the system goes on and displays the map information in the I O area and LCD area ma l Chip name direct input mode Parameter file version Progr Data Data LCD a Exter IO ar Size Size Size Size gt IO Ar FF00 FF40 FF80 FFCO al LCD A F000 F040 F080 FOCO F100 F140 F180 FICO F200 F240 F280 gt am area ram area rom area rea nal memory area ea of FO area of SOl area of SO2 area of MLA area ea 01234567 mmmm mmm mmm mmm mmmmmmmm mmmmmmmm rea 01234567 mmmmmmmm mmmmmmmm mmmmmmmm 89ABCDEF mmrmmmm mmm mmm mrmmrmmmrmm mmmrnm 89ABCDEF mmmmmmmm mrmrmmmrmm mmmmmmmm 63A08 02 0000 0000 8000 F000 F800 FF00 32 0 256 1296 01234567 01234567 mmmmmmmm mmmmmmmm lFFF 07FF 8FFF F2BF F8FF FFFF 89ABCDEF 89ABCDEF mmmmmmmm mmmmmmmm 01234567 mmm mmm mmrmmmrmmm mmmmmrmnm 01234567 mmmmmmmm mmmmmmmm 89ABCDEF 01234567 c mmmmmmmm mmmm mmmm rummmmmmm rmmmmmmmm CIE mmmmmm
144. 63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH 3 5 4 Insert Menu File Files into project 3 5 5 Build Menu Assemble Ctrl F7 Build F7 Rebuild All Stop Build Ctrl Break Debug F5 Settings Alt F 7 ICE parameter file Output Format 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 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
145. 63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE EPSON 91 CHAPTER 5 LINKER e Function Explanation Default Function Explanation Default Function Explanation Default m Function Explanation Default o lt file name gt Function Explanation Default Function Explanation Default X Function Explanation Default code lt address gt Function Explanation Default Sample description data lt address gt Function Explanation Default Sample description Output of error file Creates an err file which contains the information that the linker outputs to the Standard Output stdout such as error messages If this option is not specified no error file will be created Addition of debugging information Creates an absolute object file containing debugging information Always specify this function when you perform source display or use the symbolic debugging facility of the debugger If this option is not specified no debugging information will be added to the absolute object file Output of absolute list file Outputs an absolute list file If this option is not specified no absolute list file will be output Output of link map file Outputs a link map file If this option is not specified no link map file will be output Specification of output path file name Specifies an output path file name without extension or with an extension
146. 63xxx SSA Sample segment option HEX file for ICE configuration WRITER 6xxxx 6Pxxx or 6Fxxx VURW2 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 MCE63UPD TM63 EXE ICE firmware updater to support standard peripheral circuit board ICE63 COM I63COM O I63 PAR FPGA C63xxx MOT FPGA data to configure standard peripheral circuit board 4 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE 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 Online manual in PDF format CHAPTER 1 GENERAL 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 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 S
147. 65 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 11 3 4 Operation Procedure The following shows the basic operation procedure 1 Loading the device information definition file First select a device information definition file s1c63xxx ini and load it Select Device INI Select from the Tool menu or click the Device INI Select button amp Device INI Select button The dialog box shown below appears Enter a file name including the path in the text box or select a file by clicking the Ref button Device INI file Select Click OK and the file is loaded If the specified file exists and there is no problem with its contents the option list and the melody ROM option document which have both been set by default are displayed in each area To stop loading the file click Cancel C S1C63 DEVE3 DEVE3xxx_V1 S1c63XXX ini Ref b file ini ET Once a device information definition file is selected the same file is automatically loaded the next time you start winmla Note When you load a device information definition file after setting up options all settings are reset to the default state 2 Selecting options Select necessary options by clicking the corresponding check boxes in the option list When you change any selection item in the option list area the display in the melody ROM option document area is updated Note that when you have loaded the device information defi
148. 6A 96 Y A lt A Y A lt A FFimm8 1 0 gt A Y A A Y Y Y 1 1 0 gt ADD B A B B A 1 0 gt B B B B B 1 0 gt B imm4 B e B imm4 LO B X B B4 X B B 00imm8 1 0 gt B X B B4 X X X 1 1 0 o lo B Y B B4 Y B B FFimm8 1 0 o lo B Y B B4 Y Y Y 1 E 1 0 o lo ADD X A X X A 00imm8 00imm8 A 2 0 jolo X B X X B 00imm8 lt 00imm8 B 2 0 e gt 9eX imm4 X X imm4 00imm8 00imm8 imm4 2 0 gt S X A X X A X X 1 2 10j ole X B X X B X X 1 2 0 gt X imm4 X X imm4 X X 1 2 0 gt ADD Y A Y Y A FFimm8 FFimm8 A 2 0 gt Y B Y Y B FFimm8 lt FFimm8 B 2 0 loo 9eY imm4 Y Y imm4 FFimm8 FFimm8 imm4 2 0 ole Y A Y Y A Y Y 1 2 0 gt Y B Y Y B Y Y 1 2 0 gt Y imm4 Y Y imm4 Y Y 1 2 0 le e Remarks Instruction List 4 1C63000 Core CPU DOC Mnemonic o y Extended function Flags Classification Gods Ouerand Basic function when LDB EXT imm8 is executed
149. 9 F 1 0005 AAAA 0000 0004 rC 00018 000A 1990 adc x 0x00 F 1 0005 AAAA 0000 0004 wD 00017 F 1 0006 AAAA 0000 0005 r5 00016 000B 1990 adc x 0x00 F 1 0006 AAAA 0000 0005 w5 00015 F 1 0007 AAAA 0000 0006 rE 00014 000C 1980 adc x 0x00 F 1 0007 AAAA 0000 0006 wE 00013 F 10007 AAAA 0000 0007 r4 00012 000D 1FF8 ret F 1 0007 AAAA 0000 0007 w4 00011 0118 00FD jr Oxfd F 1 0007 AAAA 0000 012C rAAAA 1 00010 0116 O8FE ldb ext Oxfe F 1 0007 AAAA 0000 gt 3 During log output When the command execution result is being output to a log file as specified by the log command the trace data is displayed in the Command window and its contents are also output to the log file If the Trace window is closed data is displayed in the same way as in 2 above If the Trace window is open its contents are redisplayed In this case the same number of lines are displayed in the Command window as displayed in the Trace window 4 Successive display When you execute the td command the trace data can be displayed successively by entering the Enter key only until some other command is executed When you input the Enter key the Trace window is scrolled forward one screen When displaying data in the Command window 11 lines of data preceding the previously displayed cycle are displayed in the Command window the same number of lines as displayed in the Trace window if the command is executed during log output The direction of d
150. ACKAGE CHAPTER 4 ASSEMBLER Precautions Minus numbers 1 to 32768 are handled as Oxffff to 0x8000 The assembler handles expressions as 16 bit data Pay attention to the data size when using it as 4 bit immediate data especially when it has a minus value Example ld a 2 1 NG It will be expanded as Id a Oxffff ld a 2 41 amp 0xf OK It will be expanded as Id a Oxf Expressions are calculated with a sign like a signed short in C language Pay attention to the calculation results of the gt gt and operators using hexadecimal numbers Example set NUM1 Oxfffe 2 2 2 1 Oxffff The and operators can only be used within the range of 32767 to 32768 set NUM2 Oxfffe gt gt 1 2 gt gt 1 1 Oxffff Mask as Oxfffe gt gt 1 0x7fff When using an expression in a define statement it will be expanded as is Pay attention when a number is defined using the define pseudo instruction Example define NUM1 1 1 ld a NUM1 2 This will be expanded as Id Ga 1 1 2 3 define NUM2 1 1 ld a NUM2 2 This will be expanded as Id 26a 1 1 2 74 Do not insert a space or a tab between an operator and a term 4 5 9 Location Counter Symbol The address of each instruction code is set in the 16 bit location counter when a statement is assembled It can be referred using a symbol as well as labels indicates the current location thus it can be used for
151. ADDR 314 0113 lfc6 ldb sp2 ba set SP2 321 0114 0200 calr INIT RAM BLK1 initialize RAM block 1 333 LOOP 34 0115 0200 calr INC RAM BLK1 increment RAM block 1 35 0116 0000 jr LOOP infinity loop 36 37 38 LOSSES RAM block ere 39 40 org 0x0 41 bss 42 0000 00 comm RAM BLKO 4 43 0004 00 comm RAM BLK1 4 Content of line No The source line number from top of the file will be delivered Content of address In the case of an absolute section an absolute address will be delivered in hexadecimal number In the case of a relocatable section a relative address will be delivered in hexadecimal number from top of the file Content of code CODE section The instruction machine language codes are delivered in hexadecimal numbers One address corresponds with one instruction The assembler sets the operand immediate data of the code that refers to unresolved address to 0 The immediate data will be decided by the linker DATA section The 4 bit data defined by the word pseudo instruction are delivered One address corresponds with one data BSS section Irrespective of the size of the secured area 00 is always delivered here Only the address defined for a symbol top address of the secured area is delivered as the address of the BSS section S5U1C63000A MANUAL EPSON 83 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 9 Sample Executions Command line ESA EPSON S1C63 bin as63 Assembly so
152. AMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 12 Error Warning Messages 5 12 1 Errors When an error occurs the linker will immediately terminate the processing after displaying an error message No object file will be output Other files will be delivered only in the part which was processed prior to the occurrence of the error The error messages are given below Error message Description Branch destination too far from lt address gt The branch destination address is out of range CALZ for non zero page at lt address gt The specified address is out of the range 0x0000 0x00ff Cannot create absolute object file lt FILE NAME gt The absolute object file cannot be created Cannot open file kind file FILE NAME The file cannot be opened Cannot read file kind file FILE NAME gt The file cannot be read Cannot relocate section kind section of The relocatable section cannot be allocated FILE NAME gt Cannot write file kind file lt FILE NAME gt Data cannot be written to the file Illegal address range address for a code at The address specified by TST SET CLR is out of the range lt address gt 0x0000 0x003f or OxffC0 Oxffff Illegal file name FILE NAME gt The file name is incorrect Illegal file name FILE NAME gt specified with The file name specified with the option is incorrect option option Illegal ICE parameter at
153. 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 Ki 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 format will be created Absolute Object ba Absolute biect Intel Hex Output format box Motorola S 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 U WorkBench53 Version X XX main s File Edi View Insert Build Tools Window Help Dlelgiel fel a amp s Sle S JPARG2A08 PAR m Absolute Object sek HF ee Selm C test files Le E set SP2_INIT_ADDR 6x1f SP2 init addr jxxxxx NMI amp BOOT LOOP xxx global INIT_RAM_BLK1 subroutine in sub global INC_RAM_BLK1 subroutine in sub org 6x166 dalr INIT_RAM_BLK1 initialize RAM bl reti in NHI watchdog t fissenbler 63 Uer x xx Copyright C SEIKO EPS
154. ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER tS trace search Function This command searches trace information from the trace memory under a specified condition The search condition can be selected from three available conditions 1 Search by executed address In this mode you can specify a program memory address The debugger searches the cycle in which the specified address is executed 2 Search for a specified memory read cycle In this mode you can specify a data memory address The debugger searches the cycle in which data is read from the specified address 3 Search for a specified memory write cycle In this mode you can specify a data memory address The debugger searches the cycle in which data is written to the specified address Format 1 gt ts option lt address gt direct input mode 2 gt ts guidance mode 1 pc address 2 data read address 3 data write address lt 1 2 3 gt 1 Search address lt address gt Search result is displayed gt option Condition type program address data read address or data write address pc dr dw lt address gt Search address hexadecimal or symbol IEEE 695 format only Display The search results are displayed in the Trace window if it is opened otherwise the results are displayed in the Command window in the same way as for the td command Format 1 gt ts pe 1164 Trace searching Done trace fetch fetch regist
155. ATOR EPROM Type This option is not available for S1C63 Family microcomputers User s Name Enter your company name Up to 40 characters can be entered You can use English letters numbers symbols and spaces The content entered here is recorded in the USER S NAME field of the function option document file Comment Enter a comment Up to 50 characters can be entered in one line You can enter up to 10 lines You can use English letters numbers symbols and spaces Use the Enter key to create a new line All comments should include the following information Place of business your department or section e Address telephone number and facsimile number Other Technical information etc The content entered here is recorded in the COMMENT field of the function option document file When you have finished entering the above necessary items click OK The setup contents are saved and the dialog box is closed The setup contents take effect immediately If you click Cancel current settings will not be changed and the dialog box is closed Notes File name specification is subject to the following limitations 1 The number of characters that can be used to specify a file name including the path is 2 048 2 The file name itself not including the extension can be up to 15 characters and the exten sion up to three characters 3 The file name cannot begin with a hyphen nor can the following symbols be used as part of
156. All symbol support commands Break address already exists Warning message Content of message Commands involved Attempt is made to set an already set break address bp Identical break address input Input command contains identical address round down to multiple of 4 Watch data address is invalid dw User cancel Command is aborted by the user xfer xfers xfwr xfwrs xfcp xfcps Verify error FPGA verify error xfcp xfcps S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE EPSON 239 CHAPTER 9 FUNCTION OPTION GENERATOR CHAPTER 9 FUNCTION OPTION GENERATOR 9 1 Outline of the Function Option Generator winfog The S1C63 chip allows several hardware specifications such as I O port functions to be selected as mask options This helps you to configure the hardware of your product by changing the S1C63 chip s mask patterns according to its specifications The Function Option Generator winfog is the software tool for creating the files necessary to generate mask patterns Its graphical user interface GUI ensures easy selection mask options From the files created by winfog Seiko Epson produces the mask patterns for the S1C63 chip In addition simultaneously with this file winfog can create mask option setup files Motorola S2 format data that are required when debugging programs with the ICE When using the ICE to debug a program you can download this file from the host computer
157. BLER PACKAGE CHAPTER 8 DEBUGGER Notes For the first time this command is executed no item can be skipped because no default value is set In guidance mode the following keyboard inputs have special meaning g Command is terminated finish inputting and start execution AT Return to previous item Gel Input is skipped keep current value When the command is terminated in the middle of guidance by q J the contents that have been input up to that time will be modified However these contents will not be modified if some cleared settings are left intact The addresses must be specified within the range of the data memory area available for each micro computer model An error results if the input one is not a hexadecimal number or a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xFFFF An error results if the start address in the address range is larger than the end address Error end address start address Address and R W specifications are effective even for 16 bit access push pop to and from SP1 stack However the data specification will not have any effect because data is compared with a 4 bit bus In this case specify data with When setting a break for 4 bit access be careful not to specify an address that overlaps the 16 bit access area because such specification can cause t
158. C A B X Y F SP1 SP2 EXT Q Error message Content of message Commands involved The specified register name is invalid rs Input address does not exist Attempt is made to clear a break address that has not been set bp invalid command This is an invalid command All commands invalid data pattern The input data pattern is invalid bd br invalid file name The file name extension is invalid lo invalid value The input data address or symbol is invalid All commands Maximum nesting level 5 is exceeded cannot open file Nesting of the com cmw command exceeds the limit com cmw MLA address out of range use 0 0xFFF MLA address is invalid od no such symbol There is no such symbol All symbol support commands no symbol information No symbol information is available since the ABS file has not been loaded sy Number of passes out of range use 0 4095 The specified pass count for sequential break is out of range bs Number of steps out of range use 0 65535 The specified step count is out of range s n SO address out of range use 0 0x1FFF SO address is invalid od SP1 address out of range use 0 0x3FF The specified SP1 address is out of range bsp SP2 address out of range use 0 0xFF The specified SP2 address is out of range bsp symbol type error The specified symbol type program data is incorrect
159. C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 11 4 4 Description of Melody Data 1 Tempo data 16 types of tempo data 0 to 15 are available 2 types of tempo data from them can be selected for each melody Tempo data should be described as follows EMPO Start mark of tempo data It cannot be omitted Tempo No 0 1 EMPO x 0 3 TEMPO x 1 9 i 1 1 I eres tree ee L Melody No 0 to 15 END End mark It cannot be omitted The start mark TEMPO and the end mark END must be placed at the beginning and the end of the setting respectively Tempo data for each melody should be described in one line Melody No should be described in ascending order 0 1 2 Tempo No should be ordered 0 and 1 as above Tempo No 1 can be omitted if only one tempo is used In this case tempo No 1 will be set to tempo data 0 Example EMPO 0 0 3 EMPO 10 7 TEMPO 1 1 5 Separate TEMPO and tempo No and between tempo No and melody No with one or more spaces or tabs return can also be used Either capital letters or small letters can be used for the start mark end mark and TEMPO in data Table 11 4 4 1 shows the available tempo data For example 60 0 means g 60 0 the playing of 60 crotchets per minute Table 11 4 4 1 Tempo Data Tempo data Tempo Tempo data Tempo 0 30
160. C63 Family add adc and bit calr calz clr cmp dec ex halt inc int jp jr jrc jrnc jrnz jrz ld L b nop or pop push ret retd reti rets rl rr sbc set sll slp srl sub tst xor For details on instructions refer to the S1C63000 Core CPU Manual Note The assembler is commonly used for all the 1C63 Family models so all the instructions can be accepted Be aware that no error will occur in the assembler even if instructions or operands unavail able for the model are described They will be checked in the linker Assembler pseudo instructions The assembler pseudo instructions are not converted to execution codes but they are designed to control the assembler or to set data For discrimination from other instructions all the assembler pseudo instructions begin with a sharp or a period General notation forms of pseudo instructions General forms lt Pseudo instruction gt lt Pseudo instruction gt tab or space Parameter lt Pseudo instruction gt tab or space lt Parameter1 gt tab space or comma lt Parameter2 gt Examples fdefine swi 1 org 0x100 comm BUF 4 There is no restriction as to where the description of an instruction may begin in a line An instruction containing a parameter needs to be separated into the instruction and the parameter with one or more tabs or spaces If an instruction requires multiple parameters they are separated from each other with an appropriate delimiter S5U1C63000A MANUAL
161. COM port is correct The baud rates on both sides are matched The PRC board is correctly fitted in place The ICE s power is turned on The ICE remains reset For the causes of errors refer to Section 8 10 Status Error Warning Messages S5U1C63000A MANUAL EPSON 121 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER If this test indicates that the ICE is not in ready state the debugger performs the following When the ICE is executing the target program In this case the debugger sends a forcible break command to the ICE it then retests the connection of the ICE several seconds later When the ICE is in the BUSY state In this case the debugger will try to retest the connection with the ICE several seconds later When the ICE is in a free run state In this case the debugger displays the following message Connecting COMx with xxxxx baud rate failure Error ICE is free run mode Temporarily quit the debugger and set the ICE to the ICE mode by turning the ICE RUN switch to the ICE position then restart up the debugger When the ICE is performing self diagnosis In this case the debugger waits until the ICE s self diagnosis is completed before it starts testing the connection of the ICE Note that the ICE s self diagnosis is executed simultaneously if it is activated when its DIP switch SW8 is in the up position If the SW8 switch is in the down position self diagno sis is not executed Self d
162. CONTENTS 8 8 6 Trace Functions coe a nnn o e eram 152 8 8 7 Operation of Flash Memory p SB S erg 2 0 M ave 156 8 8 9 Writing Data to the FPGA on the Standard Peripheral Circuit Board 156 EE 8 9 1 Command LASE ier kavas desas daiv s ta ger EEGEN 8 9 2 Reference for Each Command ee eee tentent tnn 8 9 3 Program Memory Operation a as assemble mnemonic pe program memory enter de pf program memory fill 1 atc reae tit pm program memory DmiOue eene ss 163 8 9 4 Data Memory Operation dd data memory dump de data memory enter a df data memory EE AM data memory MOVE weg ne ete era eii E s dw data memory E 8 9 5 Command to Display Option Information eese 172 od option data dump s 5 9 6 Repistet EE Yd register display ou isset hd et oe petitus RE E E 5 9 7 E g go op er 80 Gfier reset GPU ite nettement 179 S Step E 180 n NEN EE 182 SIS CRU RESE oi EE EE EE 183 rst reset CPU 8 9 9 Break iei bp break point set 184 bc bpe break point cleat s hein tincta 186 b daia Break sies ais saunas ss gs osis bdc data break clear br register break s brc register break clear bs sequential break tais siets sauss s nis bsc sequential break clear ceres 195 bsp break stack pointer 196 bl break point list ba
163. Cursor Executes the target program from the address indicated by the current PC to the cursor position in the Source window Go from Reset This menu item resets the CPU and then executes the target program from the program start address 0x110 Step Executes one instruction step at the address indicated by the current PC Next Executes one instruction step at the address indicated by the current PC The calr calz and int instructions and their subroutines are executed as one step Command File Reads a command file and executes the debug commands written in that file Reset CPU Resets the CPU Break menu B Breakpoint Set Data Break Register Break Sequential Break Stack Break Break List Break All Clear Breakpoint Set Displays sets or clears PC breakpoints Data Break Displays sets or clears data break conditions Register Break Displays sets or clears register break conditions Sequential Break Displays sets or clears sequential break conditions Stack Break Sets stack area for break Break List Displays all the break conditions that have been set Break All Clear Clears all break conditions Debugger db63 3 Development Tools Menus Trace menu Trace Mode Set Trace Search Trace File Trace Mode Set Sets a trace mode and conditions Trace Search Searches trace information from the trace memory Trace
164. E CHAPTER 8 DEBUGGER 3 Mix mode Mix Search Label D EI Unassenble ldb ba hb ldb ba SP1 INIT fDDR ldb sp1 ba ldb sp1 ba ldb ba 1f ldb ba SP2 INIT fiDDR ldb sp2 ba Lab sp2 ba ldb ext fe ldb ext fe calr ea calr INIT_RAM_BLK1 ldb ext fe ldb ext fe calr ef calr INC RAH BLK1 jr Fd jr LOOP In this mode both unassembled codes and sources are displayed like an absolute list This mode is available only when an absolute object file that contains source debugging information has been loaded Refer to Section 8 4 3 Source Window for details about the display contents Symbol reference When debugging a program after reading an object file in IEEE 695 format the symbols defined in the source file can be used to specify an address This feature can be used when entering a command having lt address gt in its parameter from the Command window or a dialog box 1 Referencing global symbols Follow the method below to specify a symbol that is declared to be a global symbol label by the global or comm pseudo instruction lt symbol gt Example of specification gt m BOOT gt de RAM_BLK1 2 Referencing local symbols Follow the method below to specify a local symbol label that is used in only the defined source file lt symbol gt lt file name gt The file name here is the source file name s in which the symbol is defined Example of specification gt bp SUB1 test s 3 Displayi
165. E 2 0 gt X B X X vB X X 1 2 0 gt X imm4 X X vimm4 X X 1 2 o lo OR Y A Y Y vA FFimm8 FFimm8 vA 2 lo le Y B Y Y vB FFimm8 FFimm8 vB 2 0 gt Y imm4 Y Y vimm4 FFimm8 FFimm8 vimm4 2 0 gt Y A Y Y vA Y Y 1 2 o lo Y B Y Y vB Y Y 1 2 0 gt Y imm4 Y Y vimm4 Y Y 1 R 2 o lo XOR A A A AYA E 1 lo lo A B A AYB E 1 0 lo 96A imm4 A AVimm4 1 0 lo A X A AV X A AV 00imm8 1 0 gt A X A AV X X X 1 1 0 lo A Y A lt AVIY A AV FFimm8 1 0 lo 96A 96 Y A AVIY Y Y 1 lo lo H XOR B A B BYA 1 lo lo 2 B B B BvB i 1 0 o B imm4 B Bvimm4 1 j0 o B X B Bv X B Bv 00imm8 1 0 lo B X B BVIX X X 1 1 0 lo E B Y B Bv Y B Bv FFimm8 110 o i B Y B BVIY Y Y 1 R 1 f0 lo XOR F imm4 F Fvimm4 1 lelelele XOR X A X X VA 00imm8 lt 00imm8 vA 2 0 gt X B X XIVB 00imm8 lt 00imm8 vB 2 0 gt i X imm4 X X vimm4 00imm8 lt 00imm8 vimm4 2 0 gt Remarks Instruction List 10 S1C63000 Core CPU
166. E Bi mia S5U1C63000A MANUAL EPSON 213 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 14 Trace tM trace mode display set Function This command sets and displays a trace mode It allows you to set the following three trace modes and a trace trigger point when a specified address is executed the TRGOUT pin outputs a pulse 1 Normal trace mode The data written to the trace memory is always the latest trace information 2 Single delay trigger trace mode One of the following three trace sampling areas can be specified with respect to the trace trigger point e Start Trace information is a sample beginning from the trace trigger point Middle Trace information is a sample from before and after the trace trigger point End Trace information is a sample all the way up to the trace trigger point 3 Address area trace mode The execution process is traced as instructions inside or outside a specified address range are executed This address range can be specified in up to four locations Format 1 gt tm modes trigger lt option gt lt addr1 gt lt addr2 gt lt addr7 gt lt addr8 gt direct input mode 2 tm 1 guidance mode Current type setting 1 normal 2 single delay 3 address area lt 1 2 3 gt Trigger address lt trigger gt T guidance depends on the above selection see examples gt lt mode gt Trace mode n normal s single delay
167. Emulator and a Peripheral Circuit Board S5U1C63xxxP are needed as the hardware tools The S5U1C63xxxP board is prepared for each S1C63 model S5U1C63000A MANUAL EPSON 3 S1C63 FAMILY ASSEMBLER PACKAGE 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 CD ROM 1 5 Directories and Files after Installation The installer copies the following files in the specified directory default is C EPSON S1C63 EPSON S1C63 README E TXT ReadMe document English README J TXT ReadMe document Japanese BIN 51C63 Family Assembler Package Tool WB63 EXE Work bench AS63 EXE Assembler LK63 EXE Linker HX63 EXE Hex converter DS63 EXE Disassembler DB63 EXE Debugger S1C63 CNT Help index S1C63 HLP Help contents Other related files DEV BIN S1C63 Family Development Tool for Windows WINFOG EXE Function option generator WINSOG EXE Segment option generator WINMLA EXE Melody assembler WINMDC EXE Mask data checker V63xxx Model dependent files S1C63xxx INI Device information definition file PAR63xxx PAR Parameter file C63xxx FSA Sample function option HEX file for ICE configuration C
168. Explanation Default Function Explanation Default Disable full branch optimization Disables automatic insertion deletion correction of the extension codes Idb Jo ext imm8 for branch instructions jumps and calls If this option is not specified the branch optimization function will be enabled In the previous version omission of the d option enables automatic insertion and correction of the extension codes note however that deletion of the extension codes must be enabled using the er option The current version has no er option and the deletion function is enabled by default Conversely the dr option must be specified to disable the deletion function Be aware of this difference when using a project created in the previous version in particular Disable insertion of branch extension Disables extension code insertion when the branch optimization function inser tion deletion correction is enabled If this option is not specified necessary extension codes will be inserted when the full branch optimization function is specified Disable removal branch optimization Disables extension code deletion when the branch optimization function inser tion deletion correction is enabled This will be needed when at least the existing extension codes should not be removed If this option is not specified unnecessary extension codes will be removed when the full branch optimization function is specified S5U1C
169. FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB S224000020FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDB 22400010008E000F04200420606FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF89 S804000000FB S2 1 bytes Indicates that the line is a data record S8 1 bytes Indicates that the line is an end record end of data length 1 byte Indicates the record length of address data sum The maximum length of a data record is 0x24 while the end record is fixed at 0x04 address 3 bytes Indicates the address where the head data in a record is placed data 32 bytes max The object codes are placed here This is not included in the end record sum 1 byte This is a checksum 1 s complement from length to the last data The end records are always S804000000FB 108 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 6 HEX CONVERTER 6 5 3 Intel HEX Format The hex converter converts an absolute object file in the IEEE 695 format into the Intel HEX format files when the i option is specified The files are generated with a name lt file name gt h hex for the high order program file lt file name gt 1 hex for the low order program file and lt file name gt c hex for the data ROM file The following shows a sample data in Intel HEX format data volume type address data sum 11 l l Ir 10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 10001000FFFFFFFFFFFFFFFFFFFFFFFFFFF
170. FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFOB S804000000FB For details about the Motorola S2 format refer to Section 6 5 2 Motorola S format S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE EPSON 261 CHAPTER 11 MELODY ASSEMBLER CHAPTER 11 MELODY ASSEMBLER 11 1 Outline of the Melody Assembler winmla Some S1C63 models have a built in melody generator that outputs the sound converted from the melody ROM data The Melody Assembler winmla is the software tool for converting the melody data created using an editor into the melody ROM data and melody option setup data From the file created by winmla Seiko Epson produces the mask patterns for the S1C63 chip In addition simultaneously with this file winmla can create the required HEX file when debugging programs with the ICE 11 2 Input output Files Figure 11 2 1 shows the input output files of winmla Device information definition file Melody data conversion Melody ROM option Melody ROM option HEX file document file To ICE Mask data creation by debugger by mask data checker Fig 11 2 1 Input Output Files of winmla Device information definition file s1c63xxx ini This file contains option lists for various types of microcomputers and other information Always be sure to use the files presented by Seiko Epson This file is effective for only the type of microcomputer indicated by the file name Do not modify the contents of the file or use the file in oth
171. FFFFFFO 1001000008E000F04200420606FFFFFFFFFFFFFF8E 100FF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFO1 00000001FF data volume 1 byte Indicates the data length of each record The maximum length of a data record is 0x10 while the end record is fixed at 0x00 address 2 bytes Indicates the address where the head data in a record is placed type 1 byte Indicates the type of hexadecimal format currently only 00 data 16 bytes max The object codes are placed here This is not included in the end record sum 1 byte This is a checksum 2 s complement from Data volume to the last data The end records are always 00000001FF Note When using hex files for creating the mask data do not specify Intel HEX format because the mask data checker does not support this format 6 5 4 Conversion Range By default the hex converter generates the hex files that include all the codes of the ROM area available for each model Data for unused addresses are delivered as Oxff For example if the model has a built in 2KB code ROM and the program uses the area from address 0x0 to address Ox6ff the hex converter fills the area from address 0x700 to address 0x7ff with Oxff If there are unused addresses in the range from 0x0 to Ox6ff those data are also delivered as Oxff When creating the mask data by the mask data checker the hex files must be generated in this format When the b option is specified the hex converter doe
172. File Saves the specified range of the trace information displayed in the Trace window to a file Command View menu 3 Activates the Command window Command UE Program Unassemble Source Display Mix Mode rs Opens or activates the Source window and displays the ata Dum Source Displa pube i Mix Mode aid program from the current PC address in the display mode Tacs selected from the sub menu items Data Dump v Toolbar Opens or activates the Data window and displays the data memory v Status Bar contents from the memory start address Register Opens or activates the Register window and displays the current values of the registers Trace Opens or activates the Trace window and displays the trace data sampled in the ICE trace memory Toolbar Shows or hides the toolbar Status Bar Shows or hides the status bar Option menu Log Starts or stops logging Record Log Starts or stops recording of commands executed Record Mode Setting Sets the debugger modes Mode Setting Window menu Cascade Tile v 1 Command 2 Data 3Reg ATrace 5 Mix Cascade Cascades the opened windows Tile Tiles the opened windows This menu shows the currently opened window names Selecting one activates the window Help menu Contents About Db53 Contents Displays the contents of help topics About Db63 Displays an About
173. File E Too Help H JAEL Memory Address Data bit XXXXh SEGMENT DECODE TABLE SOG Window initial screen SOGiSegment Option Generator S1C63xx File E Tool Help H Bias aal d Memory Address Data bit 00XXh SEGMENT DECODE TABLE SOG Window after reading the device information definition file S5U1C63000A MANUAL EPSON 251 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR 10 3 2 Window Option setup area SOG Segment Option Generator 51C63xx File F Tool T HelptH Slzlsiel aal el Memory Address Data bit 00 00 SEGMENT DECODE TABLE E Ech ES H e m H i d 0 Making file s is completed The area can be resized by dragging the frame boundary Message area The microcomputer model name on the title bar is the file name not including the path and extension of the device information definition file that has been read The display memory addresses and segment configuration vary with each type of microcomputer Fig 10 3 2 1 Window Configuration The SOG window is divided into two areas as shown above Option setup area Comprised of a display memory map a segment decode table and buttons to select pin specifications By clicking on cells in the display memory map and segment decode table you can assign display memory addresses and bits Message area When you create a file by selecting Generate from the Tool
174. Files in the Work Space Folder The work bench generates the following files in the work space folder lt file gt epj Project file This file contains the project information lt file gt 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 NEPSONNS1C63NDEVN63A08NPAR63A08 PAR ICE parameter file o test abs output file absolute objec linked object file s sub o main erf The contents vary according to the source files included in the project and the linker option setting lt file gt cmd Debugger startup command file This file is generated when a build task is started and is used by the debugger to execute the com mand 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 file 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 1k63 exe HEX hx63 exe ASM_FLG g LINK FLG g HEX FLG ALL test abs test abs test cm sub o main o S LINK S LINK FLG test cm sub o C EPSON S1C63 Test sub s ASM
175. Flash Memory Operation efl Erase flash memory File Flash Memory Operation dd Dump data memory View Data Dump rd Display register values View Register td Display trace information View Trace log Turn log output on or off Option Log rec Record commands to a command file Option Record md Set modes Option Mode Setting 138 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 7 3 Executing from a Command File Another method for executing commands is to use a command file that contains descriptions of a series of debug commands By reading a command file into the debugger the commands written in it can be executed Creating a command file Create a command file as a text file using an editor Although there are no specific restrictions on the extension of a file name Seiko Epson recommends using cmd Command files can also be created using the rec command The rec command creates a command file and saves the executed commands to the file Example of a command file The example below shows a command group necessary to read an object file and an option file Example File name startup cmd lf test abs lo test fsa lo test ssa A command file to write the commands that come with a guidance mode can be executed In this case be sure to break the line for each guidance input item as a command is written Reading in and executing a command file
176. G Moves to the specified location Ctrl F7 Assembles the file F7 Builds the project Ctrl Break Stops the build F5 Debugs the project Alt F7 Edits the project build and debug settings Ctrl Tab Next MDI Window Short cut key Opens the popup menu Shift F10 Opens the popup menu 3 12 Error Messages The work bench error messages are given below Error message lt filename gt is changed by another editor Reopen this file Description The currently opened file is modified by another editor Cannot create file lt filename gt The file linker command file debugger command file etc cannot be created Cannot find file lt filename gt The source file cannot be found Cannot find ICE parameter file The ICE parameter file cannot be found Cannot open file lt filename gt The source file cannot be opened You cannot close workspace while a build is in progress Select the Stop Build command before closing The project close command or work bench terminate command is specified while the build task is being processed Would you like to build it The debugger invoke command is specified when the build task has not already been completed S5U1C63000A MANUAL EPSON S1C63 FAMILY ASSEMBLER PACKAGE 45 CHAPTER 3 WORK BENCH 3 13 Precautions 1 The source file that can be displayed and edited in the work bench is limited to 16M byte size 2 The label search and c
177. Grl JR A PC PC A 1 1 0 BA PC PC BA 1 1 0 JR 00addr6 PC PC 00addr6 1 2 0 O JRC sign8 f C 1 then PC PC sign8 1 sign8 128 127 If C 1 then PC PC sign16 1 sign16 32768 32767 1 1 0 OQT JRNC sign8 f C 0 then PC PC sign8 1 sign8 128 127 If C20 then PC PC sign16 1 sign16 32768 32767 1 1 0 O r JRZ sign8 f Z 1 then PC PC sign8 1 sign8 128 127 If Z 1 then PC PC sign16 1 sign16 32768 32767 1 1 0 O JRNZ sign8 f Z 0 then PC PC sign8 1 sign8 128 127 If Z 0 then PC PC sign16 1 sign16 32768 32767 1 1 0 OGr JP K PC Y 1 0 CALZ imm8 SP1 1 4 3 SP1 1 4 PC 1 SP1 SP1 1 m 1 0 O PC imm8 CALR sign8 SP1 1 4 3 SP1 1 4 PC 1 SP1 SP1 1 SP1 1 4 3 SP1 1 4 PC 1 SP1 SP1 1 1 0 O er PC PC sign8 1 sign8 128 127 PC PC sign16 1 sign16 32768 32767 CALR 00addr6 SP1 1 4 3 SP1 1 4 PC 1 SP1 SP1 1 2 0 O PC PC 00addr6 1 INT imm6 SP2 1 F SP2 SP2 1 3 Oe em 5 SP1 1 4 3 SP1 1 4 PC 1 SP1 SP1 1 PC lt imm6 imm6 0100H 013FH RET PC lt SP1 4 3 SP1 4 SP1 SP1 1 1 o RETS PC lt SP1 4 3 SP1 4 SP1 SP1 1 PC PC 1 E 2 0 RETD imm8 PC lt SP1 4 3 SP1 4 SP1 SP1 1 3 0 O Qh Gl X i340 X1 i724
178. Instruction global 4 7 13 List Control Pseudo Instructions list nolist esses 4 7 14 Source Debugging Information Pseudo Instructions stabs stabn 61 4 7 15 Comment Adding Furction seess eet 82 4 7 16 Priority of Pseudo Instructions ss 82 iv EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CONTENTS 4 6 Relocatable List File iiie aeo RR ee ER HEURES etes 63 49 Sample Executions dne i tod rto Eh E E Etpe d i ieks 64 4 10 Error Warning Messages 87 4 10 1 Errors Bell OD EE 688 4AE dg ONS as m 88 CHAPTERS LINKER T ss 89 TEN E 69 DZ dnput Outiput Files dasererat treinta Ecke reip 69 5 2 1 Input Files sestais ienes saadi asij sv 5 2 2 Output Files 5 3 Starting Method DE MB E 23 9 Linker Command File needa a tet eee dete A ege ENE 95 2 0 Link Map Fil ss se iie oo Re e RE he p eO Re oben 96 34 Symbol TAG a dte divo ordeo eee t t oro Bede 97 I8 Absolute List Hiller as Bis ats si 98 I9 Gross E 99 EE 100 5 11 Branch Optimization Function eee eee eese eerte tentent 102 DAZ Error Warning MeSSQg6s acidi hr ee etre t Er eege eeh 103 911251 EE 5 12 2 Warning 9 19 EE CHAPTER B HEX CONVERTER sisti cesasdcisk iis ek cusssaesesasabestesscosataatibendessstdscied 105 Odh EE 105 6 2 Input Output Files 4 aside tete ENEE Eed 105 0 2 T Input Piles coste Rete 6 2 2 Output Files 0 3 St rting Method eiu ete metet
179. L source file l SEIKO EPSON Debugger db63 In Circuit Emulator Note In some S1C63 models other development software tools are provided for the part indicated as S1C63xxx Development Tool and Steps 3 and 5 For details refer to the tool manual associated with each specific model Programming Create assembly source files using the work bench or an editor Assembly and Linking 2 1 Start up the work bench 2 2 Create a project file then insert source files into the project 2 3 Execute the build process The work bench executes the assembler and linker sequentially to generate an executable object file Option Data Creation Create the option HEX document files function option segment option melody data using the option data creation tools Debugging 4 1 Start up the debugger from the work bench 4 2 Load the executable object file and option HEX files then debug the program using the debug commands Mask Data Creation When the program development has been completed create a mask data file 5 1 Create the program HEX files using the HEX converter 5 2 Convert the program and option document files into a mask data file using the mask data checker 5 3 Submit the mask data file to Seiko Epson Work Bench wb63 1 Development Tools Outline The work bench provides an integrated development environment with Windows GUI Creating editing source files selec
180. MF910 06 EPSON CMOS 4 BIT SINGLE CHIP MICROCOMPUTER S5U1C63000A Manual S1C63 Family Assembler Package o SAVING SEIKO EPSON CORPORATION 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 Ma
181. N s adjust B Y C B lt N s adjust B FFimm8 C 2 10j ole B Y n4 B N s adjust B Y C Y Y 1 2 lo eole SBC X B n4 X lt N s adjust X B C 00imm8 lt N s adjust O0imm8 B C 2 10 ole X 0 n4 X N s adjust X 0 C 00imm8 lt N s adjust OOimm8 0 C 2 10 o e X B n4 X N s adjust X B C X X 1 2 0 gt X 0 n4 X N s adjust X 0 C X X 1 2 10 ole SBC Y B n4 Y N s adjust Y B C FFimm8 lt N s adjust FFimm8 B C 2 loj lole Y 0 n4 Y N s adjust Y 0 C FFimm8 lt N s adjust FFimm8 0 C 2 o lolo Y B n4 Y lt N s adjust Y B C Y Y 1 2 0 gt Y 0 n4 Y lt N s adjust Y 0 C Y Y 1 2 10 ole INC X n4 X N s adjust X 1 00imm8 lt N s adjust DOimm8 1 2 lol lele X n4 X N s adjust X 1 X X 1 2 lo leole INC Y n4 Y N s adjust Y 1 FFimm8 lt N s adjust FFimm8 1 2 loj lole Y n4 Y N s adjust Y 1 Y Y 1 2 lo ole DEC X n4 X N s adjust X 1 00imm8 lt N s adjust DOimm8 1 2 10j ole X n4 X N s adjust X 1 X X 1 2 lo ole m DEC Y n4 Y N s adjust Y 1 FFimm8 N s adjust FFimm8 1 2 lol lele Y n4 Y N s adjust Y 1 Y Y 1 2 lo ole
182. O 20 20 FO 20 FO sol 0 1000 SO2 100 1000 MLA 510 1000 Save with the map information or guit the command 1 save Protect flash memory l yes not the same 2 gule aod 2 no c When shipped from the factory or erased by the efl command all data in the flash memory is initial ized to Oxff When part of the data such as a program is written to the flash memory by the s f command all other data in it remains unchanged Oxff In this condition the ICE cannot be oper ated in free run mode To operate the ICE in free run mode always make sure that after erasing the flash memory all the data has been written into the flash memory In the ICE furthermore the default values for all option data are 0x00 Consequently if you write to the flash memory before loading option data Io command the data you have written to the flash memory is overwritten by 0x00 GUI utility File Flash Memory Operation menu item When this menu item is selected a dialog box appears allowing selection of flash memory operations Flash Memory peration x Operation Save to flash memory Protect flash memory Contents program data fog sog mla Cancel au ait E To execute the sfl command select Save to flash memory from the Operation list box and select contents to be saved using the check boxes then clock OK The p option can be specified using the Protect flash memory check
183. OM that contains programs written and data memories such as data RAM and I O memory Moreover some models carry a data ROM that holds static data written A section refers to an area where codes are written or to be mapped and there are three types of sec tions in correspondence with the memories 1 CODE section Area located within a code ROM 2 DATA section Area located within a data ROM 3 BSS section Denotes a RAM area To allow to specify these sections in a source file the assembler comes provided with pseudo instruc tions CODE section The code pseudo instruction defines a CODE section Statements from this instruction to another section defining instruction will be regarded as program codes and will be so processed as to be mapped in the code ROM The source file will be regarded as a CODE section by default Therefore the part that goes from top of the file to another section will be processed as a CODE section Because this section is of 13 bits word 4 bit data cannot be defined DATA section The data pseudo instruction defines a DATA section Statements from this instruction to another section defining instruction will be regarded as 4 bit data and will be so processed as to be mapped in the data ROM Therefore nothing else can be described in this area other than the symbols for referring to the address of the data ROM the 4 bit data defining pseudo instruction word and comments This section is applied onl
184. ON CORP 1998 2881 Linked with the corresponding source line C SIC63 TEST MAIN S 23 Error Unknown mnemonic dalr C S1C63 TEST MAIN S 41 Warning Section activation expected use bss Created preprocessed source file MAIN HS Assembly 1 error s 1 warning s Bn For Help press F1 Ln23 Col 1 NUM 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 S Assemble button 5U1C63000A MANUAL EPSON 11 S1C63 FAMILY ASSEMBLER PACKAGE 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 S 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 i Db63 Command L 8 x File Run Break Trace View Option Window Help 98 se bot 8 Unassenble ba hb ba SP1_INIT_ADDR AAAA spi ba ldb sp1 ba AAAA ba 1f ldb ba SP2_INIT_ADDR 76668 sp2 ba ldb Sp2 ba S
185. ORATION KOREA OFFICE 50F KLI 63 Bldg 60 Yoido dong Youngdeungpo Ku Seoul 150 763 KOREA Phone 02 784 6027 Fax 02 767 3677 SEIKO EPSON CORPORATION ELECTRONIC DEVICES MARKETING DIVISION Electronic Device Marketing Department IC Marketing amp Engineering Group 421 8 Hino Hino shi Tokyo 191 8501 JAPAN Phone 81 0 42 587 5816 Fax 81 0 42 587 5624 ED International Marketing Department Europe amp U S A 421 8 Hino Hino shi Tokyo 191 8501 JAPAN Phone 81 0 42 587 5812 Fax 81 0 42 587 5564 ED International Marketing Department Asia 421 8 Hino Hino shi Tokyo 191 8501 JAPAN Phone 81 0 42 587 5814 Fax 81 0 42 587 5110 In pursuit of Saving Technology Epson electronic devices Our lineup of semiconductors liquid crystal displays and quartz devices assists in creating the products of our customers dreams Epson IS energy savings S5U1C63000A Manual S1C63 Family Assembler Package SEIKO EPSON CORPORATION ll EPSON Electronic Devices Website First issue August 1997 Printed August 2001 in Japan OB
186. P1 AA ext fe ldb ext fe SP2 AA calr ea calr INIT_RAM_BLK1 ENT zAA QUEUE AAAA ldb ext fe ldb ext fe 6666666666 cycle calr ef calr INC Bon BLK1 8888 AAAA jr fd jr LOOP 88684 AAAA 8808 AAAA Fy f Z7 H check 0000 ICE hardware version 0010 ICE software version Initialize gt com C XS1C63XTestXtest cmd gt 1f test abs Loading file 0K DDDDDDDDDDO DDDDDDDDDD DDDDDDDDDDNU DDDDDDDDDD U DDDDDDDDD D a DDDDDDDDD D G DDDDDDDDDDO DDDDDDDDDD J DDDDDDDDDDO DDDDDDDDDDU DDDDDDDDDD Po For the debugging functions and operations refer to Chapter 8 Debugger 12 EPSON S5U1C63000A MANUAL 81C63 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
187. Precautions Only files created in text file format can be inserted The include instruction can be used in the including files However nesting is limited up to 10 levels If this limit is surpassed an error will result 64 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 2 Define Instruction define Any substitute character string can be left defined as a Define name by the define instruction define and the details of that definition can be referred to from various parts of the program using the Define name Instruction format define lt Define name gt lt Substitute character string gt lt Define name gt e The first character is limited to a z A Z and e The second and the subsequent characters can use a z A Z 0 9 and _ Uppercase and lowercase characters are discriminated define itself is case insensitive When assembling with the c option all symbols are case insensitive One or more spaces or tabs are necessary between the instruction and the Define name Substitute character string When writing all characters can be used but a semicolon is interpreted as the start of a comment Uppercase and lowercase characters are discriminated One or more spaces or tabs are necessary between the Define name and the substitute character string The substitute character string can be omitted In that case NULL is defined in lieu of the substitute
188. R S step Function This command single steps the target program from the current PC position by executing one instruc tion at a time Format gt s lt step gt direct input mode lt step gt Number of steps to be executed decimal default is 1 Condition 0 lt step lt 65 535 Operation 1 Step execution If the lt step gt is omitted only the program step at the address indicated by the PC is executed other wise the specified number of program steps is executed from the address indicated by the PC gt s Executes one step at the current PC address gt s 204 Executes 20 steps from the current PC address The program execution is suspended by the following cause even before the specified number of steps is completed The Key Break button is clicked or the Esc key is pressed A map break etc occurs After each step is completed the register contents in the Register window are updated If the Register window is closed the register contents are displayed in the Command window same as executing the rd command When program execution is completed by stepping through instructions the system stands by waiting for command input If you hit the Enter key here the system single steps the program in the same way again 2 HALT and SLEEP states and interrupts When the halt or slp instruction is executed the CPU is placed in standby mode An interrupt is required to clear this mode Th
189. R sp1 ba ba SP2_INIT_ADDR sp2 ba ext fe INIT_RAH_BLK4 ext fe INC_RAM_BLK1 LOUP If lt address gt is not specified display in the Source window is changed to the mix unassemble amp source display mode If address is specified display in the Source window is changed to the mix unassemble amp source display mode At the same time code is displayed beginning with address 2 When Source window is closed The 16 lines of mix display are produced in the Command window The system then waits for a command input If lt address gt is not specified this display begins with the current PC displayed in the Register window If lt address gt is specified the display begins with address gt m 0110 094b ldb ba 4b ldb ba SPl1 INIT ADDR 0111 Lfc4 ldb spl ba ldb spl ba 0112 091f ldb ba 1f ldb ba SP2 INIT ADDR 0113 l1fc6 ldb sp2 ba ldb sp2 ba 0114 08fe ldb ext fe ldb ext fe 0115 02ea calr ea calr INIT RAM BLK1 LOOP 0116 08fe ldb ext fe ldb ext INC_RAM_BLK1 rh 0117 02ef calr ef calr INC RAM BLK1Grl ldb ext LOOPGrh 204 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 3 During log output If the command execution result is output to a log file as specified by the log command code is displayed in the Command window and its contents are output to the log file also If the Source window is closed code is displayed in the sa
190. R 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 orig x ase alela ig e Pareno PAR m Absolute Obiect mi gl Build wm 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 le 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 lo 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 d 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 ki Find button Finds the specified word in the active Edit window A dialog box will appear allowing specifica tion of the word to be found and a search condition Find Next
191. S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 11 Symbol Information SY symbol list Function This command displays a list of symbols in the Command window Format 1 gt sy Hal direct input mode 2 gt sy lt keyword gt a direct input mode 3 gt sy lt keyword gt a direct input mode lt keyword gt Search character string ASCII character Condition 0 lt length of keyword lt 32 Examples Format 1 gt syd INC_RAM_BLK1 0007 INIT_RAM_BLK1 0000 RAM_BLKO 0000 RAM_BLK1 0004 BOOT C EOC63 TEST MAIN S 0110 LOOP C EOC63 TEST MAIN S 0116 NMI C EOC63 TEST MAIN S 0100 gt In format 1 all the defined symbols are displayed in alphabetical order Global symbols are dis played first then local symbols Shown to right to each symbol is the address that is defined in it Format 2 gt sy SRJ INC RAM BLK1 0007 INIT RAM BLK1 0000 RAM BLKO 0000 RAM BLK1 0004 gt In format 2 the debugger displays global symbols that contain the character string specified by lt keyword gt Format 3 gt sy tB BOOT C EOC63 TEST MAIN S 0110 gt In format 3 the debugger displays local symbols that contain the character string specified by lt keyword gt When local symbols are displayed and the source file name in which the symbol is defined are added Notes The symbol list will be sorted by letter order if no
192. Size Opt Type File SecNbr 0 0x0000 0x000d 0x000e 0 Rel SUB S 1 1 0x000e Ox00ff 0x00f2 2 0x0100 0x0102 0x0003 1 Abs MAIN S 1 3 0x0103 Ox010f 0x000d 4 0x0110 0x0118 0x0009 2 Abs MAIN S 2 5 0x0119 Oxlfff Oxlee7 Total Oxla occupied Oxlfe6 blank BSS section map of TEST ABS Index Start End Size Type File SecNbr 0 0x0000 0x0007 Ox0008 Rel MAIN S 3 1 0x0008 Oxf2bf 2 Oxf800 Oxf8ff 3 Oxff00 Oxffff Total 0x8 occupied Oxf4b8 blank Contents of link map file Index Indicates the index number of the section Start Indicates the start address of the section End Indicates the end address of the section Size Indicates the size of the section Opt Indicates the number of extension codes that are inserted or removed Type Indicates the section type Rel relocatable section and Abs absolute section File Indicates the file names of the linked module SecNbr Indicates the section number Total Indicates the total map size and the unused area size in the Size Opt Type File and SecNbr columns indicate that no section is allocated 96 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 7 Symbol File The symbol file serves to refer to the symbols defined in all the modules and their address information It is delivered if the s start up option is specified The file format is a text file and its file name is lt File name gt sym File name gt is the same as that of the output object
193. U and then executes the target program from the program start address 0x0110 It performs the same function when the gr command is executed Step This menu item executes one instruction step at the address indicated by the current PC It performs the same function when the s command is executed Next This menu item executes one instruction step at the address indicated by the current PC If the instruction to be executed is calr calz or int it is assumed that a program section until control returns to the next address constitutes one step and all steps of their subroutines are executed This menu item performs the same function when the n command is executed S5U1C63000A MANUAL EPSON 133 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Go Go to Cursor Go from Reset Step Next Command File Reset CPU Command File This menu item reads a command file and executes the debug commands written in that file It performs the same function when the com or cmw command is executed Reset CPU This menu item resets the CPU It performs the same function when the rst com mand is executed 8 6 4 Break Menu Breakpoint Set Data Break Register Break Sequential Break Stack Break Break List Break All Clear Breakpoint Set This menu item displays sets or clears PC breakpoints using a dialog box It performs the same function as executing the bp command Data Break
194. UF 16 Warning A new bss section begins bss ld a Sb Warning A new code section begins 62 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 Assembler Pseudo Instructions The assembler pseudo instructions are not converted to execution codes but they are designed to control the assembler or to set data For discrimination from other instructions all the assembler pseudo instructions begin with a character or The instructions that begin with are preprocessed pseudo instructions and they are ex panded into forms that can be assembled The expanded results are delivered in the preprocessed file mom ms The original statements of the pseudo instructions are changed as comments by attaching a before delivering to the file The instruction that begins with are used for section and data definitions They are not converted at the preprocessing stage All the pseudo instruction characters are not case sensitive The following pseudo instructions are available in the assembler Pseudo instruction Function include Includes another source define Defines a constant string defnum Defines a constant number 1 macro endm Defines a macro ifdef else endif Defines an assemble condition ifndef else endif Defines an assemble condition abs Specifies absolute assembling 1 align Sets alignment of a section org Sets an absolute address co
195. 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 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 MANUAL EPSON 23 S1C
196. Value Value specification Only decimal binary and hexadecimal numbers can be described The values that can grammatically be specified are from 0 to 65 535 Oxffff One or more spaces tabs or a comma are necessary between the instruction and the value Sample description set DATAI 0x20 set STACK1 0x100 Function Defines a symbol for a value such as an absolute address Precaution When the defined symbol is used as an operand the defined value is referred as is Therefore if the value exceeds the valid range of the operand a warning will result Example set DATA1 Oxff00 ldb ext DATAl1Gh OK ldb xl DATA1Gl s OK ld Sa DATA Warning 78 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 10 Data Defining Pseudo Instructions codeword word codeword pseudo instruction Instruction format codeword Data Data lt Data gt Data 13 bit data Only decimal binary and hexadecimal numbers can be described e The data that can be specified are from 0 to 8 191 Ox1fff One or more spaces or tabs are necessary between the instruction and the first data A comma is necessary between one data and another Sample description code codeword Oxa 0xa40 0xff3 Function Defines 13 bit data to be written to the code ROM Precaution The codeword pseudo instruction can be used only in CODE sections word pseudo
197. Windows button a NN C sub s ASH63 test program subroutine global RAH_BLK1 xxxxx RAM block 1 initialize sex qlobal INIT RAM BLK1 16 EPSON S5U1C63000A MANUAL 81C63 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 m Tile Vertically button Goto Label d main s sub s AS63 test program main ri AS63 test program subroui global RAM_BLK1 xxxxx INITIAL SP1 amp SP2 ADI xxxxx RAM block 1 initiali ifdef SMALL_RAM set SP1 INIT ADDR global INIT RAM DU INIT RAM BLK1 set SP1_INIT_ADDR ext RAM_BLI tendif 1 RAM_BLK x 6x6 set SP2_INIT_ADDR x 8x8 amp MES H 7 To tile windows horizontally select Tile Horizontally from the Window menu or click the Tile Horizontally button 5 Tile Horizontally button 1 2 3 4 5 6 7 8 9 Helse DE A M4 main s Goto Label x main s ASH63 test program main routine xxx INITIAL SP1 amp SP2 ADDRESS DEFINITION sex sub s f SH63 test program subroutine global RAM_BLK1 S5U1C63000A MANUAL EPSON 17 S1C63 FAMILY ASSEMBLER PACKAGE 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 wi
198. X X Index register X or the contents of the register 16 bits Subtraction 96XH XH Index register XH or the contents of the register high order 8 bits of the X register X AND XL XL Index register XL or the contents of the register low order 8 bits of the X register Y Y Index register Y or the contents of the register 16 bits Me OR YH YH Index register YH or the contents of the register high order 8 bits of the Y register v XOR YL YL Index register YL or the contents of the register low order 8 bits of the Y register Flags SF F Flag register F or the contents of the register 4 bits Z Zero flag EXT EXT Extension register EXT or the contents of the register 8 bits C Carry flag SP1 SP1 Stack pointer SP1 or the contents of the stack pointer 16 bits setting data SP1 9 2 Interrupt flag SP2 SP2 Stack pointer SP2 or the contents of the stack pointer 16 bits setting data SP2 7 0 E Extension flag PC Contents of the program counter PC 16 bits E Not changed Memory Addresses Memory Data eo Set I reset 0 or not changed X X Register indirect addressing using X or the contents of the specified memory 1 Set 1 Y Y Register indirect addressing using Y or the contents of the specified memory 0 Reset 0 00addr6 6 bit absolute addressing with addr6 or the contents of the specified memory 0x0000 0x003F Clk FFaddr6 6 bit absolute addressing with addr6 or the contents of the specified
199. XOR 12 35 Bit inversion 0x1234 The logical operator returns the result of logic operation on the specified terms 58 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER Relational operators Examples Equal SW l Not equal SW 0 Less than ABC 5 lt Less than or equal ABC lt 5 gt Greater than ABC gt 5 gt Greater than or equal ABC gt 5 amp amp AND ABC amp amp Oxf OR ABC 0b1010 The relational operator returns 1 if the expression is true otherwise it returns 0 Priority The operators have the priority shown below If there are two or more operators with the same priority in an expression the assembler calculates the expression from the left 1 High priority 2 plus sign minus sign T 3 AEHL 4 5 addition subtraction 6 lt lt gt gt TA lt S5 8 amp EA 10 11 amp amp 1 12 Low priority Examples defnum BLK_HEADER_SIZE 4 defnum BLK START 0x30 BLK_HEADER_SIZE 2 defnum BLK END BLK_START 4 2 macro ADD_X ADDR ldb Sext ADDR 2 H Can be used in macros add x ADDR 2 L endm ldb ext BLK START H x BLK START ldb xl BLK START L id x 0b11 amp 0x110 ldb Sext BLK END H cmp x BLK END cmp SX BLK END L ADD X 0x1200 0x34 2 x 0x1234 2 S5U1C63000A MANUAL EPSON 59 S1C63 FAMILY ASSEMBLER P
200. Y B Y Y B Y Y 1 2 0 gt Y imm4 Y Y imm4 Y Y 1 2 0 gt SBC A Y A A A A C 1 0 gt A B A amp A B C 1 0 gt A imm4 A lt A imm4 C 1 0 gt A X A A X C A lt A 00imm8 C 1 0 gt A X A A X C X X 1 1 0 leolo A Y A A Y C A A FFimm8 C 1 0 eolo 96A v6 Y A A Y C Y Y 1 1 o lelo SBC B A B B A C 1 0 gt B B B B B C 1 0 gt B imm4 B B imm4 C LO B X Be B X C B B 00imm8 C 1 0 leole B X B B X C X X 1 1 0 Jolo B Y B B Y C B B FFimm8 C 1 o leolo B Y B B Y C Y Y 1 1 o Jolo a SBC X A X X A C 00imm8 lt 00imm8 A C 2 0 gt X B X X B C 00imm8 00imm8 B C 2 0 ole X imm4 X X imm4 C 00imm8 00imm8 imm4 C 2 0 lole X A X X A C X X 1 2 0 e e X B X X B C X X 1 2 0 ole E X imm4 X X imm4 C X X 1 B 2 0 ole Remarks Instruction List 6 S1C63000 Core CPU DC Mnemonic i Extended function Flags Classification opcode Operand Race unten when LDB EXT imm8 is executed Cik eT cz Symbol Arithmetic SBC Y A Y
201. a comparison The contents of the FPGA and specified file are compared 4 FPGA data dump The FPGA data is displayed in a hexadecimal dump format Table 8 8 9 1 FPGA commands Function Command Erase FPGA xfer xfers Write to FPGA xfwr xfwrs Compare FPGA data and file xfcp xfcps Dupm FPGA data xdp xdps Note The standard peripheral circuit board has two on board FPGAs main FPGA and sub FPGA and the different commands are provided for each FPGA suffix s indicates that the command is for the sub FPGA However it is not necessary to write data to the sub FPGA normally because the sub FPGA contains LCD DC output function 156 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE 8 9 Command Reference 8 9 1 Command List CHAPTER 8 DEBUGGER Table 8 9 1 1 lists the debug commands available with the debugger Table 8 9 1 1 Command list Classification Command Function Page Program memory a as assemble Assemble mnemonic 159 operation pe program memory enter Input program code 161 pf program memory fill Fill program area 162 pm program memory move Copy program memory 163 Data memory dd data memory dump Dump data memory 164 operation de data memory enter Input data 166 df data memory fill Fill data
202. aa 4 1 5 Directories and Files after Installation eee 4 CHAPTER 2 SOFTWARE DEVELOPMENT PROCEDURE eee eee eene eeeennnneeeeees O 21 Software Development Flow ise er essi eei Ee ges 2 2 Development Using Work Bench 2 2 1 Starting Up the Work Bench 2 2 2 Creating NeW PrOIeCt EE 2 2 3 Editing Source Files eee pite iid delere 2 2 4 Configuration of Tool Options 5 ri reet ete a 2 2 5 Building an Executable Objeci nonna neo coa genns DZD iO DD eDU GOING qM E CHAPTERS WORK B6NCHiassssdeuwes wsaesewweuwdouneeewewwdwwdwuwegasuawuiwd ele GET sievu pe rei EE AE ds in 13 3 2 Starting Up and Terminating the Work Bech 13 3 9 Work Bench WIRdOVS Gs trot tee Eege EE 14 3 2 1 Window EE 14 3 3 2 Window Manipulation ie eiie e pe to derive treni oin 15 3 4 Toolbar and Buttons iiic irr teer e ei eurer Rene ye Fiet S 19 dd Standard EE 19 KEE 20 343 TE 20 3 4 4 Toolbar Manipulation ii iim oa HERES 21 3 4 5 Insert into project Button on a Edit Wind 21 Did Eege 22 EG RRE 22 EE 23 SEET EE 23 KREE 24 3 5 5 Build Menu ENEE 25 3 9 TWIRdOWT MENW Letter ss si e E ensis 25 3 5 8 Help Menu ss eost ae ie eee OR cd FO DR 25 3 0 Project and Work Space sie st eet tau s go eno eue URN vu obe Un 3 6 1 Creating a New Project 3 6 2 Inserting Sources into a Project 3 0 3 Project Window ai ee ttr edd epa na an sa
203. abels 2 ecce tet tr ratae ce ENEE EEN dees 54 4 5 4 COMMENIS p 56 4539 Blank LANES asian e asco ro Do rr ted Gi petet aei EE 56 45 0 Reester NAMES P 57 4 5 7 Numerical Notations eesasoso ceti esiste b ea Ed qe EE 57 4 5 8 Operators 4 5 9 Location Counter Symbol Lise eter erret 60 4 5 10 Optimization Branch Instructions for Old Preprocessor 60 46 Section Managererit aos tree ER s 4 6 1 Definition of Sections esses 4 6 2 Absolute and Relocatable Sections 4 6 3 Sample Definition of Sections eee raa 62 4 7 Assembler Pseudo Instructions eee eee 4 7 1 Include Instruction include ae eterne 4 7 2 Define Instruction EE 4 7 3 Numeric Define Instruction defnum 4 7 4 Macro Instructions macro Send 4 7 5 Conditional Assembly Instructions Zifdef Helse endif ifndef Helse fendif esses 70 4 7 6 Section Defining Pseudo Instructions code data bss 72 4 7 7 Location Defining Pseudo Instructions org alten 74 4 7 8 Absolute Assembling Pseudo Instruction abs esse 77 4 7 9 Symbol Defining Pseudo Instruction set eese 78 4 7 10 Data Defining Pseudo Instructions codeword word 79 4 7 11 Area Securing Pseudo Instructions comm lcomm esses 80 4 7 12 Global Declaration Pseudo
204. abels limit number of macro label limit exceeded The number of internal branch labels has exceeded the limit Out of memory Cannot secure memory space Second definition of label label The label is already defined Second definition of symbol symbol The symbol is already defined Symbol name length limit symbol name length limit exceeded The symbol name length has exceeded the limit Token length limit token length limit exceeded The token length has exceeded the limit Unexpected character lt name gt An invalid character has been used Unknown label lt label gt Reference was made to an undefined label Unknown mnemonic lt name gt A nonexistent instruction was used Unknown register lt name gt A nonexistent register name was used Unknown symbol lt name gt A reference to an undefined symbol was made Unknown symbol mask lt name gt The symbol mask has a description error Unsupported directive lt directive gt A nonexistent pseudo instruction was used S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE EPSON 87 CHAPTER 4 ASSEMBLER 4 10 2 Warning When a warning occurs the assembler will keep on processing and terminates the processing after displaying a warning message unless an error is produced The warning message is delivered displayed in the following formats Source file name Lin
205. ach microcomputer model An error results if the input one is not a hexadecimal number or a valid symbol Error invalid value An error results if the limit is exceeded Error Address out of range no such symbol symbol type error use 0 0xXXXX An error results if you attempt to clear an address that has not been set Error Input address does not exist For direct input mode an error results if you attempt to set breakpoints at more than 16 locations at a time But for guidance mode there is no such limitation so you can specify more than 16 breakpoints before terminating the command by the Enter key You can use this command for multiple times to set new breakpoints 184 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER GUI utility Break Breakpoint Set menu item When this menu item is selected a dialog box appears for setting breakpoints To set a breakpoint select a Set button and enter an address in the text box corresponding Set Clear to the selected button C ADDR1 When setting more than four breakpoints click C e ADDR2 I lia the Next button to continue settings C e ADDR3 The Previous and Next buttons are used to 6 6 ADDRA F Wed view previous and subsequent four breakpoints To clear a breakpoint select the Clear button E Clear All Breakpoint d of the address to be cleared The Clear All Breakpoint butto
206. addr6 00addr6 1 2 0 o o O ADC B A n4 B amp N s adjust B A C 2 0 e gt B X n4 B amp N s adjust B X C B amp N s adjust B 00imm8 C 2 0 o o Remarks S1C63000 Core CPU Kate Mnemonic i y Extended function Flags Classification opcode Operand Basic functo when LDB EXT imm8 is executed Cik eT cz Symbol Arithmetic ADC B X n4 B N s adjust B X C X X 1 2 lo lele operation B Y n4 B N s adjust B Y C B N s adjust B FFimm8 C 2 o ole B Y n4 B N s adjust B Y C Y Y 1 2 lo ole ADC X B n4 X N s adjust X B C 00imm8 lt N s adjust 00imm8 B C 2 loj lole X 0 n4 X N s adjust X 0 C 00imm8 lt N s adjust 00imm8 0 C 2 10 ole X B n4 X N s adjust X B C X X 1 2 lo ole X 0 n4 X N s adjust X 0 C X X 1 2 0 gt ADC Y B n4 Y N s adjust Y B C FFimm8 N s adjust FFimm8 B C 2 loj lole Y 0 n4 Y N s adjust Y 0 C FFimm8 lt N s adjust FFimm8 0 C 2 o lolo Y B n4 Y N s adjust Y B C Y Y 1 E 2 lo ole Y 0 n4 Y N s adjust Y 0 C Y Y 1 2 10 ole SBC B A n4 B N s adjust B A C 2 10 ole B X n4 B lt N s adjust B X C B lt N s adjust B 00imm8 C 2 10 ole B X n4 B amp N s adjust B X C X X 1 2 lo leole B Y n4 B lt
207. address2 gt are specified coverage information within the specified address range is displayed if just lt address1 gt is specified the end address is treated as the maximum program address and coverage information within that range is displayed The addresses specified here must be within the range of the program memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX Anerror results if the start address is larger than the end address Error end address lt start address GUI utility None 222 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER CVC coverage clear Function This command clears the coverage information Format gt CVC direct input mode GUI utility None S5U1C63000A MANUAL EPSON 223 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 16 Command File COM execute command file Function This command reads a command file and executes the debug commands written in that file You can execute the commands successively or set an interval between each command execution Format 1 com file name gt lt interval gt direct input mode 2 gt com guidance mode Filename file name gt Execut
208. adecimal numbers Oxnnnn in the preprocessing stage ASCII to HEX conversion One or two ASCII characters enclosed with can be described in source files unless converting into numbers The numeric operators can also be used The described characters are converted into ASCII codes and delivered to the output relocatable object file Examples retd 1 gt retd 0x31 retd 23 gt retd 0x3233 retd 4 1 A retd 0x35 Note Three or more characters and the following characters cannot be described Control codes 0x0 to 0x1f space 4 5 8 Operators An expression that consists of operators numbers and or defined symbols including labels can be used for specifying a number or defining a Define name only for number definition The preprocess in the assembler handles expressions in signed 16 bit data and expands them as hexadeci mal numbers Types of operators Arithmetic operators Examples Addition Plus sign Oxff 1 2 Subtraction Minus sign 142 Oxff 0b111 kd Multiplication Oxf 5 Division 0x123 0x56 96 Residue 0x123 0x56 is also be supported gt gt Shifting to right 1 gt gt 2 lt lt Shifting to left 0x113 3 H Acquires upper 8 bits 0x1234 H GE Acquires lower 8 bits 0x1234 L Parenthesis 1 1 2 5 The arithmetic operator returns the result of arithmetic operation on the specified terms Logical operators Examples amp Bit AND 0b110180b111 Bit OR 0b123 0xff Bit
209. ady exists Segment Option Generator winsog 1 Development Tools Outline The segment option generator winsog is the software tool for creating the file necessary to generate mask patterns of LCD output specifications and LCD output pin assignments In addition simultaneously with this file winsog can create a mask option setup file that are required when debugging programs with the ICE Windows egment Option G File F Tool Help H S m 5 aal Option setup area Comprised of a display memory map a segment decode table and buttons to select pin specifications By clicking on cells in the display memory map and segment decode table you can assign display memory addresses and bits Memory Address Data bit 00XXh SEGMENT DECODE TABLE ac St L 61 coms spzc OUTPUT Option SEH Seg Selects LCD segment output Comp Selects DC complementary output Pch Selects DC Pch open drain output Nch Selects DC Nch open drain output Selects segment common shared output Delete Clears selected segment assignments E EG Message area When you create a file by selecting Generate from the Tool menu or clicking the Generate button this area displays a message showing the result of the selected operation Making file s is completed Segment Option Generator winsog 2 Development Tools ab pes w i a Open button Opens a se
210. age shows up Example TEST S 6 Warning Expression out of range Assembly 0 error s 1 warning s In the case of a warning the assembler ends after creating an output file The source file name that was specified in the command line will appear at the beginning of the error and warning messages For details on errors and warnings refer to Section 4 10 Error Warning Messages 50 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 5 Grammar of Assembly Source Assembly source files should be created on a general purpose editor or the source editor of the work bench Save sources as standard text files For the file name a long file name supported in Windows can be specified This section explains the rules and grammar involved with the creation of assembly source files 4 5 1 Statements Each individual instruction or definition of an assembly source is called a statement The basic composi tion of a statement is as follows Syntax pattern 1 Mnemonic Operand comment 2 Assembler pseudo instruction Parameter comment 3 Label comment 4 comment Example lt Statement gt lt Syntax Pattern gt include define h 2 set IO1 Oxfffl 2 TEXT SECTION ROM 13bit width 4 org 0x100 2 NMI 3 reti 1 nop 1 nop 1 jr NMI 1 org 0x110 2 BOOT 3 ld f 0x4 1 ld Sa 0 1 ld Sa 0 1 ldb ext 0 clear memory 0 to 3
211. align pseudo instruction can be taken as a loosely absolute section in the sense that its location is partially defined Precautions When the align pseudo instruction appears in a section a new absolute section starts at that point The section type does not change The align pseudo instruction keeps its effect only in that section until the next section definer code data or bss or the next location definer org or align appears Example code The latest relocatable section definition align 32 Starts new loosely absolute CODE section from the next 32 word boundary address bss This section is relocatable not affected by the align pseudo instruction code This section is also relocatable not affected by the align pseudo instruction If the align pseudo instruction is defined immediately after a section definer code data or bss the section definer does not start a new section But align starts a new section with the attribute of the section definer Example code This does not start a new CODE section align 32 This starts a loosely absolute CODE section If the align pseudo instruction is defined immediately before a section definer code data or bss it does not start a new section and makes no effect to the following sections Example code The latest relocatable section definition align 32 This does not start a new absolute section and makes no effe
212. alog box and the segment option Selection example HEX file if specified are created When winsog has finished creating the files normally it displays the message Making file s is completed in the message area If an error occurs an error message is displayed 8 Saving uncompleted segment option data You can save the segment option settings that have not been completed as a segment assignment data file To save data select Record Save from the File menu or click the Save button D Save button The dialog box shown below appears so enter a file name including the path in the text box or select a file by clicking the Ref button Segment assignment data file save x Save file c xs1063ADEV63ADEV63xxx_V1zzzzzzzz sad net Clicking OK saves the current assignment data to the specified file To stop saving click Cancel You can read an existing segment option document file into winsog and correct it as necessary To load a segment assignment data file select Record Load from the File menu or click the Load button E Load button The dialog box shown below appears so enter a file name including the path in the text box or select a file by clicking the Ref button Segment assignment data file load x Load file C S1C63 DEV6S DEV63xxx_V1 zzzzzzzz sad Click OK and the file is loaded If the specified file exists and there is no problem with its c
213. an 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 win dow 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 Floating and docking the Project and Output window The Project window and the Output window can be made a floating window by double clicking 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 WorkBench63 Version X XX sub s Eie Edi View Inset Build Tools Window Help MEEI nies F alel ale Sis pem Reve as se e E AS63 test program subroutine global RAM BLK1 px RAM block 1 initialize see global INIT RAM BLK1 INIT RAM BLK1 8 H Xext RAM BLK1Gh ldb Xxl RAM BLK1Gl set RAM BLK1 addre 1d 2x 0x8 z Linker 63 Uer x xx rad Created absolute object file Link 8 error s 8 warning 5 Build Done 1
214. and recording file Current Command File If the recording function has been activated a dialog box eee appears allowing selection of either record off mode or poses record on mode A new recording file can also be specified C Record On New using the New button Record Off 226 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 17 log log log WB Function This command saves the input commands and the execution results to a file Format 1 log file name gt direct input mode 2 gt log guidance mode See Examples for guidance file name Log file name path can also be specified Examples 1 First log execution after debugger starts up log File name debugl logJ 1 append 2 clear and open wee 2 Displayed If the file is already exists gt 2 log command input in the second and following sessions log Set to log off mode Logging function toggles when log is input gt log4 Set to log on mode Notes In log on mode the contents displayed in the Command window are written as displayed directly to the log file The commands executed by selecting from a menu or with a tool bar button are displayed in the Command window However the Help menu and button commands are not displayed Ifyou modify the register value or data memory contents by direct editing in the Register or Data window or set breakpoin
215. ar Status Bar View menu New Dh Opens a document source header or project v Standard Bar Shows or hides the status bar Open Ctri 0 Close v Status Bar Output Window Close Closes the active Edit window v Dutput Window Opens or closes the Output window Open Workspace v Project Window Project Window Open Workspace Chee Wak Opens a project v Build Bar Opens or closes the Project window GE Close Workspace v Window Bar Build Bar Save Clap Closes the currently opened project Shows or hides the build toolbar Caan Save Ctrl S Full Screen Window Bar Gave All Saves the document in the active Edit window to the file Shows or hides the window toolbar Save As Full Screen Print Ctrl P Saves the document in the active Edit window with another file Maximizes the Edit window area to the full screen size Print Preview name Page Setup Save All er Saves the documents of all Edit windows and the project Insert menu File Su Ms information to the respective files Inserts the specified file to the text in the Edit window 2 main s Print Ctrl P Files into project EE Prints the document in the active Edit window File Adds the specified source file in the currently opened project Gel Print Preview Files into project Exit Displays a print image of the document in the active Edit window Page Setup The file names listed in this A e
216. arch trace information ts Trace Trace Search Saving trace information After the trace information is displayed in the Trace window using the td or ts commands the trace information within the specified range can be saved to a file Table 8 8 6 4 Command menu item to save trace information Function Command Menu Save trace information tf Trace Trace File 154 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 8 7 Operation of Flash Memory The ICE in circuit emulator contains flash memory This memory is designed to allow data to be transferred to and from the ICE s emulation memory and the target memory by a command The flash memory retains data even when the ICE is turned off By writing the program and or data under debug into the flash memory before turning off the power you can call it up and continue debug ging next time Also even when operating the ICE in free run mode in which a program is executed using only the ICE you may need to write the program into the flash memory The following operations can be performed on the flash memory 1 Read from flash memory Data is loaded from the flash memory into the emulation and or target memory 2 Write to flash memory Data in the emulation and or target memory is saved to the flash memory Also the contents of the parameter file can be written to the flash memory as necessary After writing to
217. are created and the dialog box is closed When winmla has finished creating the files normally it displays the message Making file s is completed in the message area If an error occurs an error message is displayed If you click Cancel current settings will not be changed and the dialog box is closed Notes File name specification is subject to the following limitations 1 The number of characters that can be used to specify a file name including the path is 2 048 2 The file name itself not including the extension can be up to 15 characters and the exten sion up to three characters 3 The file name cannot begin with a hyphen nor can the following symbols be used as part of directory names folder names file names and extensions 1 The symbols shown below cannot be used in the User s Name and Comment S5U1C63000A MANUAL EPSON 267 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 4 Correcting an existing document file You can read an existing melody ROM option document file into winmla and correct it as necessary To read a file select Open from the File menu or click the Open button g Open button The dialog box shown below appears so enter a file name including the path in the text box or select a file by clicking the Ref button Function Option Document file Open r Function Option Document file fe SLC63 DEV63 DEV63xxx_V1l zzzzzzzz mdc Ref
218. are from 0 to 65 535 Oxffff One or more spaces or tabs are necessary between the instruction and the address Sample description code org 0x0100 Function Specifies an absolute address location of a CODE DATA or BSS section in an assembly source file The section with the org pseudo instruction is taken as an absolute section Precautions If an overlap occurs as the result of specifying absolute locations with the org pseudo instruction an error will result Examples bss org 0x00 comm RAMO 4 RAM secured area 0x00 0x03 org 0x01 comm RAM1 4 Error because the area of 0x01 0x03 is overlapped When the org pseudo instruction appears in a section a new absolute section starts at that point The section type does not change The org pseudo instruction keeps its effect only in that section until the next section definer code data or bss or the next location definer org or align appears Example code The latest relocatable section definition org si 00 Starts new absolute CODE section from address 0x100 bss This section is relocatable not affected by the org pseudo instruction code This section is also relocatable not affected by the org pseudo instruction If the org pseudo instruction is defined immediately after a section definer code data or bss the section definer does not start a new section But org starts a new section with the attribute of the se
219. are modified by rewriting code those of source display remain unchanged GUI utility None S5U1C63000A MANUAL EPSON 161 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER pf program memory fill Function This command rewrites the contents of the specified program memory area with the specified code Format 1 gt pf lt address1 gt lt address2 gt lt code gt direct input mode 2 pf i guidance mode Start address lt address1 gt 1 End address lt address2 gt Fill code lt code gt gt lt addressl gt Start address of specified range hexadecimal or symbol IEEE 695 format only lt address2 gt End address of specified range hexadecimal or symbol IEEE 695 format only lt code gt Write code hexadecimal valid operation code of S1C63000 Condition 0 address lt address2 lt last program memory address 0 code lt Ox 1fff Examples Format 1 gt pf 200 20f 1ffed Fills the area from address 0x200 to address 0x20f with Ox1ffe nop Format 2 gt pfJ Start address 2004 Start address is input End address 20fH End address is input Fill code 1fffJ Code is input gt Command execution can be canceled by entering only the Enter key and nothing else Notes The addresses specified here must be within the range of the program memory area available with each microcomputer model An error results if the input one is not a hexadecima
220. ark CHROM lt Data ROM HEX data start mark S1C63xxxyyy CHARACTER ROM Master slice model name 224000000 EE 804000000FB ZZZZZZZZ CSa NEND lt Data ROM HEX data end mark FOPTION lt Function option start mark S1C63xxx FUNCTION OPTION DOCUMENT Vx xx lt Model name version FILE NAME zzzzzzzz FDC USER S NAME INPUT DATE 2000 06 27 COMMENT ZZZZZZZZ fdc Z OPTION NO 1 OSC1 SYSTEM CLOCK CR 60KHz Special Reset Selected OPTO101 03 OPTiiOl 02 EOF NEND lt Function option end mark NAROM lt Melody address ROM HEX data start mark S1C63xxxyyy MELODY ADDRESS ROM lt Master slice model name S214000000 t iix ek teal ee od E EE ES azoozzzzdndc S804000000FB END lt Melody address ROM HEX data end mark TROM lt Melody tempo ROM HEX data start mark S1C63xxxyyy MELODY TEMPO ROM lt Master slice model name E een e le EE 8214000010 532 etx RR Uy Ra RR Urn ras dee es Br t ac ZZZZZZZZ mdc S804000000FB NEND lt Melody tempo ROM HEX data end mark NSROM lt Melody scale ROM HEX data start mark S1C63xxxyyy MELODY SCALE ROM lt Master slice model name S214000000 EE 5804000000FB ZZZZZZZZ mdc NEND lt Melody scale ROM HEX data end mark CROM lt Melody control ROM HEX data start mark S1C63xxxyyy MELODY CONTROL ROM lt Master slice model name S234000000 EE S804000000FB ZZZZZZZZ mdc KE e e le EE S804000000FB END lt Melody control ROM HEX data end mark MROM
221. arting Method General form of command line as63 options source file name gt denotes a space indicates the possibility to omit Source file name In the command line only one assembly source file can be specified at a time Therefore you will have to process multiple files by executing the assembler the number of times equal to the number of files to be processed A long file name supported in Windows and a path name can be specified When including spaces in the file name enclose the file name with double quotation marks Options The assembler comes provided with the following six start up options d define name Function Definition of Define name Explanation Works in the same manner as you describe define define name gt at top of the source It is an option to control the conditional assembly at the start up One or more spaces are necessary between d and the define name gt To define two or more Define names repeat the specification of d define name gt g Function Addition of debugging information Explanation Creates an output file containing symbolic source debugging information e Always specify this function when you perform symbolic source debugging If this option is not specified no debugging information will be added to the relocatable object file Default 0 file name gt Function Explanation Specification of output path file name e Specifies
222. ata Pitch data HEX data Pitch data HEX data Pitch data HEX data D4 12 AS B5 C4 18 F5 A6 E4 20 BS B8 D4 27 F5 AD F4 2F C6 BC D4 33 G5 BO F4 3B C6 C0 E4 3F G5 B7 G4 44 D6 C4 F4 48 AS BA G4 51 Dot C8 F4 55 AS BE A4 5B E6 CD G4 5F B5 C2 A4 65 F6 CE G4 66 C6 C7 B4 6C Fo D3 A4 71 C6 CB C5 74 G6 D4 A4 79 D6 CC C5 TC G6 D9 B4 81 D6 D1 D5 84 A6 DB C5 89 E6 D2 D5 8D Ap DC C5s 8E F6 D7 E5 92 B6 DE D5 94 F6 D8 F5 98 C7 E0 D5 9D G6 DA F5 9E C7 E2 G5 A4 D7 E4 G5 AB D7 E6 AU of the half tones should be described using pitches with a The pitch data consists of a letter that indicates a scale code and a number that indicates an octave number RR should be described for rests When specifying RR the control bit must be set to 2 for the middle of the melody or 3 for the end of the melody 2 5 Jump bit The jump bit controls the melody flow It should be set to 1 to repeat a phrase or to jump to another part of the same melody or another melody It must be set to 1 at the end of a melody if a rest is set there 0 Not jumped Jump is enabled Set also when changing tempo and specifying a rest at the end of a melody 2 6 Tempo No Tempo can be selected by a number 0 or 1 from two types set at the tempo data field However set tempo No 0 at the beginning of a melody Furthermore it is necessary to set the jump bit to 1 when changing tempo in the middle of the
223. ata error Illegal end mark End mark is incorrect Message Table 12 4 4 List of Segment Option Data Error Messages Message Description Display LCD segment data error Illegal model name Model name is incorrect Message LCD segment data error Illegal version Version is incorrect Message LCD segment data error Illegal segment No Segment No is incorrect Message LCD segment data error Illegal segment area Display memory address is out of range Message LCD segment data error Illegal segment output Specified output mode is incorrect Message specification LCD segment data error Illegal data in this line Data written here is not hexadecimal number or output mode Message LCD segment data error Data is not enough Segment data is insufficient Message LCD segment data error Illegal start mark Start mark is incorrect Message LCD segment data error Illegal end mark End mark is incorrect Message S5U1C63000A MANUAL EPSON 287 CHAPTER 12 MASK DATA CHECKER 12 5 Example Output File Note The configuration and contents of data vary with each type of microcomputer Example of a pack file mask data file S1C63xxx MASK DATA VER x xx lt Version PROM lt Code ROM HEX data start mark S1C63xxxyyy PROGRAM ROM lt Master slice model name S22 400000 Ore 5s tes ocak eel eae eke EA S804000000FB zzzzzzzz hsa zzzzzzzz lsa e e le EE S804000000FB END lt Code ROM HEX data end m
224. ata is displayed in the Command window in the same way as in 2 above If the Data window is open it is redisplayed to show data in the same way as in 1 above In this case the same number of lines is displayed in the Command window as are displayed in the Data window 4 Successive display Once you execute the dd command data can be displayed successively with the Enter key only until some other command is executed When you hit the Enter key the Data window is scrolled one full screen When displaying data in the Command window data is displayed for the 16 lines following the previously displayed address same number of lines as displayed in the Data window during log output gt ddd 01234567 89 ABCDEF 0000 AAAAAAAA AAAAAAAA 0010 AAAAAAAA AAAAAAAA OOFO AA AAA AAA AAAAAAAA gt 01234567 89 ABCDEF 0100 AAAAAAAA AAAAAAAA 0110 AAAAAAAA AAAAAAAA O1FO AA AAA AAA AAAAAAAA gt When the line at address Oxfff0 is displayed the system stands by waiting for command input If you hit the Enter key here data is displayed beginning with address 0x0000 Notes Both the start and end addresses specified here must be within the range of the data memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or not a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Addr
225. ayed 5 Click the Cancel button to close the dialog box Alternatively you can click the Cancel button to quit winmdc before it executes packing S5U1C63000A MANUAL EPSON 285 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 12 MASK DATA CHECKER 3 Unpacking 1 Select Unpack from the Tool menu or click the Unpack button on the tool bar to bring up the Unpack dialog box Unpack button UnPack C S1C63 DEVE3 DEVE3xxx_V1 C63xxxTST PAO 2 SLC63 DEV63 DEV63xxx_Vl uzzzzzzz DXASICG6SADEV6GADEV63xxx VlYuzzzzzzz 2 S1LC63 DEVE63 DEV63xxx_Vl uzzzzzzz 2 SLC63 DEV63 DEV63xxx_Vl uzzzzzzz 2 SLC63 DEVE63 DEV63xxx_Vl uzzzzzzz DXASICG6SADEV6GADEV63xxx VlYiuzzzzzzz 2 Select the file you want to unpack In the Packed Input File text box specify the pack file name you want to enter Use the names displayed by default to specify this file name after changing one or select another file using the Ref button 3 Set the output file name Unpack Output Files lists the files of the type specified in the device information definition file by their default file names Modify the file name displayed by the following procedure a Click in the list box to select the file name to be modified b Click the Ref button to select another folder and then enter a file name Modify all the listed file names The extensions cannot be changed 4 Click the Unpack button to execute unpacking When winmdc has completed unpacking it
226. b5s exe Parameter file nemo estertup OptiOnss are registered on the tool bar minimizing the necessary keyboard grub NT A 4 command file Specifies a command file operations Moreover sources registers and command execution com X 1 4 Lg pott GEES comi results can be displayed in multiple windows with resultant b baud rate 2400 4800 9600 default 19200 38400 increased efficiency in the debugging tasks Windows SS Db63 Data _ 5 x File Run Break Trace View Option Window Help Source window je uu El al 6 tb di l 0 S Displays programs with unassemble codes source codes or disassemble and source codes Mix ioj xj RR PC 8888 a SCENE EI A E Add Code Unassenble Sourc B 1 gt 23 8888 6a04 ldb xl ldb x1 RAM_BLK1G1 X 8067 Register window 24 0009 1911 add x 1 add x 1 Y AAAA Displays register values and monitor data 25 888a 1996 adc x 8 adc x 8 EICZ 1001 p ays reg 26 880b 1998 adc x 8 adc x 8 sP1 wg cs SE s i6 28 gg L2 ell Ext og 29 fetch register flag data trace QUEUE 8118 38 code disasm AB X Y EIC2 addr data SP in 8888890CF8 cycle Trace window au F 1 8887 AAAA 8888 8886 rF 8890 ARAA 32 1988 adc x 0x00 F 1 0007 AAAA 0000 0806 vF 0004 1DF8 Displays traced data as tt F 1 8887 AAAA 8881 8887 r8 8888 AAAA 4 1FF8 ret F 1 8887 AAAA 8881 0887 u8 4 B8FD jr 8xfd F 1 8887 AAAA 8881 Ze 88FE ldb ext xfe F 1 8887 AAAA 8881 Pr
227. be described in any order However control data must be placed after main data it is not necessary to continue Data parameters must be separated with one or more spaces or tabs eg 0 1 7 G5 0 0 274 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 11 5 Error Messages The error messages of winmla are listed below The Dialog in the Display column means that messages are displayed in the dialog box and Message means that messages are displayed in the MLA window message area Table 11 5 1 List of winmla Error Messages Message Description Display File name error Number of characters in the file name or extension exceeds the limit Dialog Illegal character Prohibited characters have been entered Dialog Please input file name File name has not been entered Dialog Can t open File xxxx File xxxx cannot be opened Dialog INI file is not found Specified device information definition file ini does not exist Dialog INI file does not include MLA information Specified device information definition file ini does not contain Dialog melody ROM option information Melody Data file is not found Specified melody data file does not exist Dialog Melody ROM Option document file is not Specified melody ROM option document file does not exist Dialog found Melody ROM Option document file does Contents of
228. be opened Cannot read file kind file FILE NAME gt The specified file cannot be read Cannot write file kind file FILE NAME gt Data cannot be written to the file Directory path length limit directory path length limit exceeded The path name length has exceeded the limit Division by zero The divisor in the expression is 0 File name length limit file name length limit exceeded The file name length has exceeded the limit Illegal macro label label The internal branch label in macro definition is incorrect Illegal macro parameter parameter The macro parameter is illegal Illegal syntax The statement has a syntax error Line length limit line length limit exceeded The number of characters in one line has exceeded the limit Macro parameter range macro parameter range exceeded The number of macro parameters has exceeded the limit Memory mapping conflict The address is already used Multiple statements on the same line Two or more statements were described on one line Nesting level limit nesting level limit exceeded Nesting of include has exceeded the limit Number of macro labels limit number of macro label limit exceeded The number of internal branch labels has exceeded the limit Out of memory Cannot secure memory space Second definition of label label The label is already define
229. ble BSS3 absolute Oxff00 BSS2 absolute Oxf000 org is used BSS4 relocatable Fig 5 10 1 Structure of sample relocatable files Sample linker command file code 0x0000 Relocatable CODE section start address rcode test2 0 0x0110 CODE section start address of test2 o data 0x8000 Relocatable DATA section start address bss 0x0000 Relocatable BSS section start address rbss test2 0 0x0400 BSS section start address of test2 o o test abs Output file name testl o Input file 1 test2 o Input file 2 When linking is executed with the commands defined above the linker maps the sections of each module in the manner graphically presented in Figure 5 10 2 100 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER test1 o test abs CODE1_ relocatable Ge Ox00ff CODE absolute 0x0100 Nie CODE2 0x010f DATA1 relocatable j BSS1 relocatable GOES BSS2 absolute Oxf000 CODE4 Code ROM area test2 0 CODES relocatable CODE1 CODE4 _ relocatable DATA2 absolute 0x8400 Ox1 fff BSS3 absolute Oxff00 BSS4 relocatable 0x8000 DATA1 Ox83ff N 0x8400 DATAZ Data ROM area 0x87ff 0x0000 BSS1 1 Ox03ff 0x0400 BSS4 RAM area 0x07ff Oxf000 BSS4 7 bas Display memory Oxff00 BSS3 I O memory area Oxtfff Fig 5 10 2 Example of linking The absolute sections CODE2 BSS2 DATA2 and BSS3
230. bols defined in all the modules and their address information are delivered to this file This file is delivered when the s start up option is specified Cross reference file File format File name Output destination Description Absolute list file File format File name Output destination Description Error file File format File name Output destination Description Text file File name gt xrf Current directory Labels defined in all the modules and their defined and referred addresses are delivered in this file This file is delivered when the x start up option is specified Text file File name gt als Current directory File delivered when the 1 start up option is specified The file contents are similar to the relocatable list file output by the assembler except that the location addresses are absolute and takes the form of an integrated single file Text file IK63 err Current directory The file is created if the e start up option is specified It records the information which the linker outputs to the Standard Output stdout such as error messages The file name is 1k63 err by default but it can be changed using the o start up option 90 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 3 Starting Method General form of command line Ik63 Options lt Relocatable object files gt lt Linker command file gt ICE parameter f
231. box b Click the Ref button and select the data file to be entered Do this for all files listed When replacing files take care not to mistake one file for another If the input file is erroneous an error will result during file packing 3 Setting output file names In the Pack Output File text box specify a pack file name in which you want the mask data to be output The file name displayed by default can be modified You can use the Ref button to look at other folders Make sure the extension of the output file name is pa0 If after presenting data to Seiko Epson you present new data due to program bugs or any other reason increase the number in the last digit of the extension in increments of one For example the extension of the second file presented should be c63xxx yyy pal Note File name specification is subject to the following limitations 1 The number of characters that can be used to specify a file name including the path is 2 048 2 The file name itself not including the extension can be up to 15 characters and the extension up to three characters 3 The file name cannot begin with a hyphen nor can the following symbols be used as part of directory names folder names file names and extensions ist t 4 Click the Pack button to execute packing When winmdc has completed packing it dsiplays a message Packing completed in the Pack message text box If an error has occurred an error message is displ
232. bp bc bs tm ts cv Address out of range use 0 0xFFFF The specified data memory address is out of range dd de df dm dw bd ts Cannot load program ROM data check ABS file Failed to load program ROM data some file other than IEEE 695 executable format was specified If Cannot open file The file cannot be opened If lo com cmw log rec xfwr xfwrs xfcp xfcps Data out of range use 0 0xF The specified number is out of the data range de df Different chip type cannot load this file A different ICE parameter is used in the file If end address start address The start address is larger than the end address pf pm df dm bd cv xdp xdps error file type extension should be CMD The specified file extension is invalid com cmw FO address out of range use 0 0xEF FO address is invalid od illegal code The input code is not available pe pf illegal mnemonic The input mnemonic is invalid for S1C63000 a as Incorrect number of parameters The parameter number is incorrect All commands Incorrect option use f u i s c il cm An invalid mode setting option was specified md Incorrect r w option use r w An illegal R W option was specified bd Incorrect register name use A B X Y F An invalid register name was specified br 238 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Incorrect register name use P
233. c break all clear es 8 910 Program Display aee eren te teer nre eee edo coeno ss ea dp ts 200 uU uhassenible s zust na RO so IRE ss 200 sc source code a 202 8 9 11 Symbol Information si SY Symbol Ist asa ones Eege ge inre 5 9 2 LOOd Mil ties et situ as ato dare ss If lpad EE ninm 8 9 13 Flash Memory Operation sas Ifl load from flash memory esee 209 sfl save to flash memory tre eee 211 eft erase flash memory Jussit erri etes tein ue 213 8 9 14 Trace S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE vii CONTENTS 9 1 9 2 9 3 9 4 9 5 8 9 15 e cv coverage cvc coverage clear 6 9 16 Command File com execute command file cessere 224 cmw execute command file with wait 225 rec record commands to a Biel 226 8 0 17 108 P EE log log 5 9 18 Map TN OV IMAM OM duit n err RO Hee C then 228 na map information ees odes kieecc tire te ir P RR ne 228 6 9 19 Mode Setting 5i oss eere tasasoc iari X dre Dio Ex Er edes 229 md mode eco einer OE Oe 229 6 9 20 FPGA Operation xfer xfers xilinx fpga data erase eese 232 xfwr xfwrs xilinx fpga data write sss 233 xfcp xfcps Xilinx fpga data compare sese 234 xdp xdps xilinx fpga data dump cene 235 8 9 21 Quit
234. ce frequency 38 4 kHz or 32 768 kHz d Jump bit Used to repeat a phrase and to change the flow e Tempo Either one of the tempo data 1 can be selected 3 Control data The jump destinations main data numbers from the main data in which the jump bit is set are described here 4 Option data The hardware option specifications for melody output are set 11 4 2 Melody Data Creation Procedure The following flowchart shows the melody data creation procedure START Write a score Create a melody data from the score Execute the melody assembler to generate melody ROM option HEX and document data Execute the function option generator winfog to create a function option HEX data Create the program for controlling the melody generator Start up the db63 and the ICE and then load the program function option HEX data and melody ROM option HEX data to the ICE Evaluation and debugging i w Yes END Fig 11 4 2 1 Melody Data Creation Procedure S5U1C63000A MANUAL EPSON 269 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 11 4 3 Method of Creating Melody Data The following shows the method of creating melody data according to the creation procedure 1 Writing score Describe music to be played with the S1C63xxx in the form of a score as shown below Example of score 4540
235. ces 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 MANUAL 81C63 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
236. character string It can be used for the conditional assembly instruction Sample definitions define TYPE1 define L1 LABEL 01 define Xreg SX define CONST DATA1 DATA2 2 Expansion rule If a Define name defined appears in the source the assembler substitutes a defined character string for that Define name Sample expansion define INT_F1 Oxfff0 define INT F1 1 0 set INT F1 INT F1 1 Expanded to set Oxfff0 0 S5U1C63000A MANUAL EPSON 65 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER Precautions The assembler only permits backward reference of a Define name Therefore the name definition must precede the use of it Once a Define name is defined it cannot be canceled However redefinition can be made using another Define name Example define XL Sxl define Xlow XL ldb Xlow ba Expanded to Idb x1 ba When the same Define name is defined duplicatedly a warning message will appear Until it is redefined it is expanded with the original content and once it is redefined it is expanded with the new content No other characters than delimiters space tab line feed and comma can be added before and after a Define name in the source unless they are enclosed in or However an operator or a symbol mask can be added to a Define name string without delimiters Examples define INT_F Oxfff tst INT F1 0 tst 0Oxfff1 0 Specification like
237. chines Corporation U S A NEC 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 The information of the product number change Starting April 1 2001 the product number will be changed as listed below To order from April 1 2001 please use the new product number For further information please contact Epson sales representative Configuration of product number Devices S1 C 63158 F 0A01 00 Packing specification 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 specification Version 1 Version 1 2 Tool type A1 Assembler Package 1 Corresponding model number 63000 common to S1C63 Family Tool classification C microcomputer use Product classification S5U1 development tool for semiconductor products 1 For details about tool types see the tables below In some manuals tool types are represented by one digit 2 Actual versions are not written in the manuals Comparison table between new and previous number S1C63 Family processors S1C63 Family peripheral products Previous No New No Previous No New
238. ck the Delete button to clear its assignment and reselect from 1 Two or more cells selected by dragging an area can also be deleted using the Delete button Before selecting a cell in SEGMENT DECODE TABLE always select a cell in Memory Address Data bit 3 Click the SPEC cell for the segment selected in 2 and then the Seg button The cell shows the letter S and changes color to red This means that the segment has been set for a LCD segment output pin If your chip requires selecting segment output and DC output every two pins the other pin that comprises a pair is set in the same way bY MMB n Selection example _2 01 4 Repeat steps 1 to 2 for all segments used for LCD output Specification selection in 3 may be performed later If any COM cell in one SEG pin is unused leave it blank 4 Setting DC outputs When using SEG pins for general purpose DC output assign segments according to steps 1 and 2 described in Item 3 Setting segment outputs However output control works in such a way that the display memory assigned to COMO is enabled while the display memory assigned to COM1 through COMG are disabled Therefore set a memory address data bit for only COMO cell and leave memory address data bits for COMI through COMS cells blank For DC output you may select an output mode between complementary output and Nch or Pch open drain output Select your desired output in SPEC cell using the buttons listed bel
239. code ROM 0x1fff data ROM Oxf Initializing option data cleared to 0 Initializing break conditions all break conditions are cleared Initializing trace conditions normal trace is set and the trace trigger point is set to 0 Setting execution cycles counter to 0 Initial setting of watch data addresses addresses 0 4 8 and C Initializing CPU registers When initialization is terminated normally MER 2 og eg RR ue UENIRE UR ER SEU done E Mell RE RD rm done gt MAD NEE done Lnddaddque 3 SEN Nee NEE ga A Error Please quit db63 and restart gt If an error occurs in the above initialization process temporarily quit the debugger Check the cause of the error and repair it before restarting the debugger After initialization the state of the screen including the position and size of the windows will return the same as the last time the debugger was terminated The contents displayed in each window if it is opened are as follows Window Display contents Command window Initialization information and waits for command input Data window Data memory contents starting from data memory address 0 Register window Current register values Source window Irace window Blank 8 3 5 Method of Termination To terminate the debugger select Exit from the File menu You can also input the 4 command in the Command window to terminate the debugger gt q Program memory contents starti
240. command code is displayed in the Command window and its contents are also output to the log file If the Source window is closed the result is displayed in the same way as in 2 above If the Source window is opened the window is redisplayed In this case the same number of lines is displayed in the Command window as displayed in the Source window 4 Successive display If you execute the u command after entering it from the keyboard code can be displayed successively by entering the Enter key only until some other command is executed When you press the Enter key the Source window is scrolled forward one screen When displaying code in the Command window 16 lines of code following the previously displayed address are displayed the same number of lines as displayed in the Source window if the u com mand is executed during log output Note The display start address you specified must be within the range of the program memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or not a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX GUI utility View Program Unassemble menu item Unassemble button When this menu item or button is selected the Source window opens or activates and displays the program from the current PC address
241. ct bss The another kind BSS of section which is not affected by the previous align pseudo instruction in the CODE section code This will be an relocatable CODE section not affected by the previous align pseudo instruction 76 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 8 Absolute Assembling Pseudo Instruction abs Instruction format abs Function The abs pseudo instruction is provided for compatibility with the older assembler In the older assembler this pseudo instruction is required to specify that a source file uses absolute sections as opposed to relocatable sections It is not necessary to use this instruction in the new assembler because the new assembler allows the use of absolute and relocatable sections in one source file Use the org or align pseudo instruction for defining absolute sections S5U1C63000A MANUAL EPSON 7T S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 9 Symbol Defining Pseudo Instruction set Instruction format Set lt Symbol gt lt Value gt lt Symbol gt Symbols for value reference e The 1st character is limited to a z A Z and The 2nd and the subsequent character can use a z A Z 0 9 and _ Uppercase and lowercase are discriminated When assembling with the c option all symbols are case insensitive One or more spaces or tabs are necessary between the instruction and the symbol
242. ction definer Example code This does not start a new CODE section org 0x100 This starts an absolute CODE section 74 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER If the org pseudo instruction is defined immediately before a section definer code data or bss it does not start a new section and makes no effect to the following sections Example code The latest relocatable section definition org 0x100 This does not start a new absolute section and makes no effect bss The another kind BSS of section which is not affected by the previous org pseudo instruction in the CODE section code This will be an relocatable CODE section not affected by the previous org pseudo instruction S5U1C63000A MANUAL EPSON 75 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER align pseudo instruction Instruction format align Alignment number gt Alignment number Word alignment in 2 value Only decimal binary and hexadecimal numbers can be described The alignment that can be specified is a 2 value One or more spaces or tabs are necessary between the instruction and the alignment number Sample description code align 32 Sets the location to the next 32 word boundary address Function Specifies location alignment in words of a CODE DATA or BSS section in an assembly source file The section with the
243. custom code of each customer Enter the code from Seiko Epson here For the ZZZZZZZZ and uzzzzzzZ parts any given file name can be specified 12 3 Using winmdc 12 3 1 Starting Up Startup from Explorer T Double click on the winmdc exe icon or select winmdc from the start menu M If the device information definition file s1c63xxx ini was loaded into your computer i during a previous execution winmdc automatically reads the same file as it starts Alternatively drag the device information definition file icon into the winmdc exe icon to start winmdc which will then read the device information definition file Wmd exe Startup by command input You can also start winmdc from the MS DOS prompt by entering the command shown below gt winmdc s1c63xxx ini J d denotes entering the return key You can specify the device information definition file s1c63xxx ini as a command option You can also specify a path When you specify the Device information definition file here winmdc reads it as it starts This specification can be omitted When winmdc starts it displays the MDC window MDC Window initial screen The microcomputer model name on the title bar is the file name not including the path and extension of the device information definition file that has been read The Pack and Unpack buttons on the tool bar are enabled when the device information definition file is read 282 EPSON S5U
244. d Second definition of symbol symbol The symbol is already defined Symbol name length limit symbol name length limit exceeded The symbol name length has exceeded the limit Token length limit token length limit exceeded The token length has exceeded the limit Unexpected character name An invalid character has been used Unknown label lt label gt Reference was made to an undefined label Unknown mnemonic lt name gt A nonexistent instruction was used Unknown register lt name gt A nonexistent register name was used Unknown symbol lt name gt A reference to an undefined symbol was made Unknown symbol mask lt name gt The symbol mask has a description error Unsupported directive lt directive gt Warning Message A nonexistent pseudo instruction was used Expression out of range The result of the expression is out of the effective range Invalid symbol mask The symbol mask is not defined correctly Second definition of define symbol lt symbol gt The symbol is already defined Section activation expected use lt code bss gt There is no section definition Linker Ik63 Development Tools Outline Links the relocatable objects created by the assembler by fixing the memory locations and creates executable absolute object codes The linker also provides a branch automatically inserts deletes or cor
245. ddress1 2 Ox03ff 0 lt address3 4 lt OxOOff Examples as Format 1 gt bsp 0 3ff 0 ff Sets SP1 area to 0x0 0x3FF and SP2 area to 0x0 0xFF Format 2 gt bspa SP1 0000 03FF SP2 0000 OOFF SP1 start address 04 Address is input SP1 end address 1ffJ SP2 start address 0J SP2 end address ff gt bspa SP1 0000 DIER SP2 0000 OOFF SP1 start address 4 Terminated by Enter key gt If you press only Enter in the middle of a guidance the command is canceled Notes The stack area that is set by this command will not affect the stack operation performed in the pro gram e Specify the SP1 address in the range of 0 to 0x3ff and the SP2 address in the range of 0 to Oxff Entering an address exceeding this limit will result in an error Error SP1 address out of range use 0 0x3FF Error SP2 address out of range use 0 0xFF Specify the SP1 address in units of 4 words start address multiple of 4 end address multiple of 4 3 e Due to the 1C63000 CPU s prefetch function SP1 can access the top end of the actually used stack 4 words Depending on your system configuration add 4 to the end address when you set it The program stops one to two instructions after the break condition has been met 196 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER GUI utility Break Stack Break menu item When this
246. de Declares a CODE section mapping to the built in code ROM data Declares a DATA section mapping to the built in data ROM bss Declares a BSS section mapping to the built in RAM codeword Defines data in the CODE section word Defines data in the DATA section comm Secures a global area in the BSS section comm Secures a local area in the BSS section global Defines an external reference symbol set Defines an absolute address symbol list Controls assembly list output nolist Controls assembly list output stabs Debugging information source name stabn Debugging information line number 1 Maintained only for compatibility with the older assembler S5U1C63000A MANUAL EPSON 63 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 1 Include Instruction include The include instruction inserts the contents of a file in any location of a source file It is useful when the same source is shared in common among several source files Instruction format include lt File name gt e A drive name or path name can as well be specified as the file name One or more spaces are necessary between the instruction and the File name gt Character case is ignored for both include itself and File name gt Sample descriptions include sample def include c EPSON S1C63 header common h Expansion rule The specified file is inserted in the location where include was described
247. dialog box for the debugger Debugger db63 4 Development Tools Debug Commands Program memory operation Program display dd lt addr1 gt lt addr2 gt Dump data memory de lt addr gt lt data1 gt lt data16 gt Input data df lt addr1 gt lt addr2 gt lt data gt Fill data area Load file If lt file name gt a as lt addr gt lt mnemonic gt lt file name gt Assemble mnemonic u lt addr gt Unassemble display pe lt addr gt lt code1 gt lt code8 gt Input program code sc lt addr gt Source display pf lt addr1 gt lt addr2 gt lt code gt Fill program area m lt addr gt Mix display pm lt addr1 gt lt addr2 gt lt addr3 gt Copy program memory Symbol information Data memory operation Sy lt keyword gt lt keyword gt fa List symbols Load IEEE 695 format absolute object file dm addri lt addr2 gt lt addr3 gt Copy data area dw lt addr1 gt lt addr4 gt Option information od fog sog mla lt addr1 gt lt addr2 gt Register operation rd Set data watch address lo lt file name gt Flash memory FPGA operation Ifl pldlflslm pidif simiT Load Motorola S format file Load data from Flash memory Dump option data sfl pldifls m pldlflslm p Save data to Flash memory efl Erase Flash memory xfer s Erase FPGA Display regist
248. dified date 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 Look in S Test D f cl SE Files of type Project Files epi Cancel 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 includ ing sources tool settings and window configuration will be saved 28 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH 3 6 5
249. directory names folder names file names and extensions The symbols shown below cannot be used in the User s Name and Comment 3 Selecting options Select necessary options by clicking the corresponding check boxes in the option list When you change any selection item in the option list area the display in the function option document area is updated Note that when you have loaded the device information definition file the option list is placed in its default selection state For details about option specifications refer to the Technical Manual available for each type of microcomputer 4 Creating files After selecting options select Generate from the Tool menu or click the Generate button to create the files el Generate button The function option document file you specified from the Setup dialog box and the function option HEX file if specified are created When winfog has finished creating the files normally it displays the message Making file s is completed in the message area If an error occurs an error message is displayed S5U1C63000A MANUAL EPSON 245 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 9 FUNCTION OPTION GENERATOR 5 Correcting an existing document file You can read an existing function option document file into winfog and correct it as necessary To read a file select Open from the File menu or click the Open button g Open button The dialog box shown b
250. display or symbolic debugging but can be used to check the operation of final program data Data file for data ROM File format File name Description HEX file in Motorola S format file name gt csa This is a load image file of the data ROM and is read into the debugger by the lo com mand This file is generated for the purpose of creating mask data from an object file in the IEEE 695 format by the Hex convertor When an absolute object file in the IEEE 695 format is loaded it is not necessary to load this file Option data file File format File name Description HEX file in Motorola S format file name gt fsa file name gt ssa file name gt msa Varies with the type of microcomputer These data files are used to set up hardware options for each microcomputer model and is read by the lo command These files are generated by a development tool available for each microcomputer model Command file File format File name Description Text file file name gt cmd An extension other than cmd can also be used This file contains a description of debug commands to be executed successively By writing a series of frequently used commands in this file the time and labor required for entering commands from the keyboard can be saved The command described in the file are read and executed using the com or cmw command 8 2 2 Output Files Log file File format File name Description Record file File
251. dow 264 11 3 3 Menus and Toolbar Buttons i269 11 3 4 Operation Procedure sess 206 Melody Ee iiec ere O Ee 269 11 4 T Outline of Melody Da i e oen emm 269 11 4 2 Melody Data Creation Procedure eee 269 11 4 3 Method of Creating Melody Data etienne 270 11 4 4 Description of Melody Data ap 11 4 5 Precautions sssini e 274 Error legen 275 Error Symbols 4er te ied pee dais is 276 Eege t todo toi ote t e UR onore inel 277 CHAPTER 12 MASK DATA CHECKER escccccccccccessececsccccccccansccscsceccccccesccssscecsssccssecessscecs DOL 12 1 12 2 12 3 12 4 12 5 Outline of the Mask Data Checker winmdc Input Output Files Using winmdc 12 3 1 St rting Up emen ie 12 3 2 Menus and Toolbar Buttons eee stein ak 12 3 3 Operation Procedure i eco ten etia tet IETTOTMESS SES tva dain s a i E Example Output File APPENDIX QUICK REFERENCE S5U1C63000A MANUAL EPSON ix S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 1 GENERAL CHAPTER GENERAL 1 1 Features The S1C63 Family Assembler Package contains software development tools that are common to all the models of the 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 mad
252. dow refer to each command description 140 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 8 Debug Functions This section outlines the debug features of the debugger classified by function Refer to Section 8 9 Command Reference for details about each debug command 8 8 1 Loading Program and Data Files Loading files The debugger can read a file in IEEE 695 format or Motorola S format in the debugging process Table 8 8 1 1 lists the files that can be read by the debugger and the load commands Table 8 8 1 1 Files and load commands File type Data type Ext Generation tool Com Menu Button IEEE 695 Program data abs Linker If File Load File DS Motorola S Program 5 high order bits hsa HEX convertor lo File Load Option Program 8 low order bits lsa HEX convertor Function option fsa_ Function option generator Segment option ssa Segment option generator Melody data msa Melody assembler Ext Extension Com Command Debugging a program with source display To debug a program using the source display and symbols the object file must be in IEEE 695 format read into the debugger If any other program file is read only the unassemble display is produced S5U1C63000A MANUAL EPSON 141 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 8 2 Source Display and Symbolic Debugging Function The d
253. e Output destination Description Error file File format File name Output destination Description Binary file in relocatable IEEE 695 format lt file name gt o The lt file name gt is the same as that of the input file unless otherwise specified with the o option Current directory File in which machine language codes are stored in a relocatable form available for the linker to link with other modules and to generate an executable absolute object Text file file name gt lst The file name gt is the same as that of the input file unless other wise specified with the o option Current directory File in which offset locations machine language codes and source codes are stored in plain text Text file lt file name gt ms The lt file name gt is the same as that of the input file unless other wise specified with the o option Current directory File in which instructions for preprocessing e g conditional assembly and macro instructions are expanded into an assembling format Text file file name gt err The file name gt is the same as that of the input file unless other wise specified with the o option Current directory The file is created if the e option is specified It records error messages and other information which the assembler delivers via the Standard Output stdout 48 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 3 St
254. e address line where a breakpoint is set is indicated by a red mark at the beginning of the line Address 0x0117 in the diagram 4 Trace trigger point The address line where a trace trigger point is set is indicated by the letter T at the beginning of the line Address 0x0115 in the diagram 5 Break setting at the cursor position Place the cursor at an address line where a breakpoint is to be set not available for a source only line f Then click on the Break button A PC breakpoint will be set at that address If the same is done at the address line where a PC breakpoint has been set the EK breakpoint will be cleared If the Go to Cursor button is clicked the program will execute beginning with the current PC position and program execution breaks at the line where the cursor is located Go to Cursor button 6 Finding labels and words Any labels and words can be found using the Search Label pull down list box or the Find button on the Source window Search Label ba BOOT INC_RAM_BLK1 INIT RAM BLK1 Search Label pull down list box ET Find button 128 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 4 4 Data Window 1 Displaying data memory contents ADDR 0 1234567 89ABCDEF The Data window displays the memory dump EM 0083 0002 661020 results in hexadecimal numbers FFIO s s s s s 3 3 X X HH HH X X z FF20 FF 8FF eee ee HH T
255. e commands 1 successively 2 with wait 1 25 1 Interval 0 256 seconds lt interval gt appears only when 2 With wait is selected gt Display execution progress file name Command file name path can also be specified interval Interval wait seconds between each command decimal 0 256 Examples Format 1 gt com batchl cmd4 EE Commands in batchl com are executed successively Format 2 gt com File name test cmd Execute commands 1 successively 2 with wait elias el Wait time 0 256 seconds 24 E 2 sec of interval is inserted after each command execution Notes e Any contents other than commands cannot be written in the command file Anerror results if the file you specified does not exist Error Cannot open file Another command file can be read from a command file However the nesting of command files is limited to a maximum of 5 levels An error results if a com or cmw command at the sixth level is encountered the commands in the file specified by that com or cmw command will not be executed but the subsequent execution of the commands in upper level files will be executed continuously Error Maximum nesting level 5 is exceeded cannot open file If you specify an interval more than 256 seconds it is set to 256 by default Use the hot key CTRL Q to stop executing a command file GUI utility Run Command File menu it
256. e debugger Load Option It performs the same function when the If command is executed Load Option This menu item reads a program file data file for the data ROM or an optional HEX file in Motorola S format into the debugger It performs the same function when the lo command is executed Flash Memory Operation Exit Flash Memory Operation This menu item reads writes data from to the Flash memory or erases the Flash memory contents It performs the same function when the Ifl sfl or efl command is executed Exit This menu item quits the debugger It performs the same function when the q command is executed 6 6 3 Run Menu Go Go This menu item executes the target program from the address indicated by the B GE current PC It performs the same function when the g command is executed Step Go to Cursor Next This menu item executes the target program from the address indicated by the Command File current PC to the cursor position in the Source window the address of that Reset CPU line It performs the same function when the g lt address gt command is executed Before this menu item can be selected the Source window must be open and the address line where the program is to break must be clicked Selecting a break address by clicking on the address line is valid for only the lines that have actual code and is invalid for the source only lines Go from Reset This menu item resets the CP
257. e debugger has a mode to enable or disable an external interrupt for use in a single step operation Enable mode Disable mode External interrupt Interrupt is processed Interrupt is not processed halt and slp instructions Executed as the halt instruction The halt and slp instructions are Processing is continued by an replaced with a nop instruction as external interrupt or clicking on the instruction is executed the Key Break button In the initial settings the debugger is set to the interrupt disable mode The interrupt enable mode can also be set by using the md command 3 Execution cycle counter The execution cycle counter displayed in the Register window indicates the number of cycles executed or the execution time of the target program In the initial debugger settings the execution cycle counter is set to hold mode so that execution time is added up until the CPU is reset If this mode is changed to reset mode by the md command the execution cycle counter is cleared to 0 each time the s command is executed The counter is also reset simultaneously when execution is restarted by hitting the Enter key 180 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 4 During log mode If the program is single stepped after turning on the log mode the same contents as when executing the rd command are displayed in the Command window after each step is completed Notes
258. e name Description Binary file in IEEE 695 format File name gt abs A path can also be specified Absolute object file created by the linker This file must always be specified Binary file File name gt par A path can also be specified File to specify the memory mapping information of each S1C63 Family model This file is provided for each model and is commonly used with the linker and debugger 6 2 2 Output Files Hex file File format File name Output destination Text file in Motorola S format or Intel HEX format Motorola S format File name gt hsa File name gt lsa and File name gt csa Intel HEX format File name h hex File name gt l hex and File name gt c hex Current directory Description Three hex files are generated hsa or h hex that contains the five high order bits of the object codes with 0b000 extended lsa or l hex that contains the eight low order bits and csa or c hex that contains four bit data for the data ROM Motorola S format files are delivered by default Intel HEX format files can be specified using the i option Error file File format Text file File name hx63 err Output destination Current directory Description The file is created if the e start up option is specified It records information that the hex converter outputs to the Standard Output stdout such as error messages The file name is hx63 err by default but it can be changed using the
259. e number Warning Warning message Example TEST S 41 Warning Expression out of range The warning messages are given below Warning message Description Expression out of range The result of the expression is out of the effective range Invalid symbol mask The symbol mask is not defined correctly Second definition of define symbol symbol The symbol is already defined Section activation expected use lt code bss gt There is no section definition 4 11 Precautions 1 Nesting of the include pseudo instruction is limited to a maximum 10 levels If this limit is sur passed an error will result 2 A maximum of 64 internal branch labels can be specified per macro and maximum 9999 internal branch labels can be expanded within one source file If these limits are exceeded an error will result 3 Other limitations such as the number of sections depend on the free memory space 88 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER CHAPTER 5 LINKER This chapter describes the functions of the linker 1k63 5 1 Functions The linker 1k63 is a software that generates executable object files It provides the following functions Puts together multiple object modules to create one executable object file Resolves external reference from one module to another Relocates relative addresses to absolute addresses Delivers debugging information such as
260. e on the fly function Addresses 0 4 8 and C are made the watch data addresses by default Operating registers Reg AAAA AAAA 8888 AA op AA SP1 SP2 EXT QUEUE AAAA 86088028898 cycle 0888 8885 8888 888 AAAA C963 AAAA AAAA Wow w ow The following operations can be performed on registers Table 8 8 3 3 Commands menu items to operate registers Function Command Menu Displaying registers rd View Register Modifying register values rs window SP1 SP2 EXT QUEUE AAAA 860808828898 cycle 0888 8885 8868 996c AAAA Displaying option data 1 Displaying registers Register contents can be displayed in the Register or Command 2 Modifying register values The contents of the above registers can be set to any desired value The register values can be directly modified on the Register window CHAPTER 8 DEBUGGER The memory content displayed at the left indicates data at a specified address and the one displayed at the right indicates 4 word data at the high order address Monitor data Registers PC A B X and X Y and Y F SP1 SP2 EXT and QUEUE While the program is being executed the PC address and F register are updated in real time every 0 5 seconds by the on the fly function Option data in the ICE option areas function option data segment option data or melody data Data is displayed in the Com
261. e same function when the u command is executed Mix button This button switches the display of the Source window to the mix mode unassemble amp source The Source window opens if it is closed This button performs the same function when the m command is executed 8 5 5 Go Go to Cursor Go from Reset Step Next and Reset Buttons Go button This button executes the target program from the address indicated by the current PC It performs the same function when the g command is executed Go to Cursor button This button executes the target program from the address indicated by the current PC to the cursor position in the Source window the address of that line It performs the same function when the g lt address gt command is executed Before this button can be selected the Source window must be open and the address line where the program is to break must be clicked Selecting a break address by clicking on the address line is valid for only the lines that have actual code and is invalid for the source only lines S5U1C63000A MANUAL EPSON 131 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER e Kai Go from Reset button This button resets the CPU and then executes the target program from the program start address 0x110 It performs the same function when the gr command is executed Step button This button executes one instruction step at the address indicated by the current PC It per
262. e trace information on all bus cycles is taken into the trace memory during program execution Therefore until a break occurs the trace memory always contains the latest information on bus cycles up to the one that is executed immediately beforehand 2 Single delay trigger trace mode In this mode as in other modes trace is initiated by a start of program execution When the address trace trigger point that is set by the tm command is executed trace is performed beginning from that point before being halted according to the next setting which is also set by the command f the trace trigger point is set to start Trance is halted after sampling trace information for 8 192 cycles beginning from the trace trigger point In this case the trace information at the trace trigger point is the oldest information stored in the trace memory If the program stops before tracing all 8 192 cycles trace information on some cycles preceding the trace trigger point may be left in the trace memory within its capacity Trace trigger point Execution started 8 192 cycles Trace sampling range Fig 8 8 6 1 Trace range when start is selected If the trace trigger point is set to middle Trace is halted after sampling trace information for 4 096 cycles beginning from the trace trigger point In this case the trace information of 4 096 cycles before and after the trace trigger point are sampled into the trace memory If the program stops before
263. e with minimal tools Integrated working environment A Windows based integrated environment allows the tool chain to be used on its Windows GUI interface Workbench wb63 gt 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 chips The tools included in this package are common to all S1C63 Family models except for several chip dependent masking tools Dev tools The chip dependent information is read from the ICE param eter 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 MANUAL EPSON 1 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 1 GENERAL 1 2 Tool Composition 1 2 1 Composition of Package The 1C63 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 E One each in English and Japanese 3 Registrationicard EE One each in English and Japanese 1 2 2 Outline of Software Tools T
264. ea Table 10 4 1 List of winsog Error Messages Message Description Display File name error Number of characters in the file name or extension exceeds the limit Dialog Illegal character Prohibited characters have been entered Dialog Please input file name File name has not been entered Dialog Can t open File xxxx File xxxx cannot be opened Dialog INI file is not found Specified device information definition file ini does not exist Dialog INI file does not include SOG information Specified device information definition file ini does not contain Dialog segment option information Function Option document file is not found Specified function option document file does not exist Dialog Function Option document file does not Contents of the specified function option document file do not match Dialog match INI file device information definition file ini Segment Option document file is not found Specified segment option document file does not exist Dialog Segment Option document file does not Contents of the specified segment option document file do not match Dialog match INI file device information definition file ini Segment assignment data file is not found __ Specified segment assignment data file does not exist Dialog Segment assignment data file does not Contents of the specified segment assignment data file do not match Dialog match INI file device information defi
265. ebugger allows program debugging while displaying the assembly source statements Address specification using a symbol name is also possible Displaying program code The Source window displays the program in the specified display mode The display mode can be selected from among the three modes Unassemble mode Source mode Mix mode Table 8 8 2 1 Commands tool bar buttons to switch display mode Display mode Command Menu Button Unassemble u View Program Unassemble a Source sc View Program Source Display Mix m View Program Mix Mode 1 Unassemble mode Unasm SeachLabet 5 ldb ldb sp1 ba ldb ba 6x1f ldb sp2 ba ldb ext Oxfe calr 6xea ldb ext Gxfe calr Gxef jr xfd xnop xnop In this mode the debugger displays the program codes after unassembling into mnemonics 2 Source mode mi Source Display Search Labet EI Source Lab ba SP1_INIT_ADDR ldb sp1 ba set SP1 ldb ba SP2 INIT ADDR ldb sp2 ba set SP2 calr INIT RAH BLK1 initialize RAM block 1 calr INC_RAM_BLK1 increment RAM block 1 jr LOOP infinity loop xxxxx RAM block xxxx nrn AxA In this mode the source that contains the code at the current PC address is displayed like an editor screen This mode is available only when an absolute object file that contains source debugging information has been loaded 142 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAG
266. ecimal 0 9 Binary 0 1 is used to mask bits when specifying a data pattern Specification with a symbol For address specifications symbols defined in the source can also be used However it is necessary to load an absolute object file that contains debug information Symbols should be used as follows Global symbol lt symbol name gt e g GRAM BLK1 Local symbol 9 symbol name 2 source file name e g LOOP main s Successive execution using the Enter key The commands listed below can be executed successively by using only the Enter key after execut ing once Successive execution here means repeating the previous operation or continuous display of the previous contents Execution commands g go s step n next com execute command file Display commands sc source m mix u unassemble dd data memory dump od option data dump td trace data display cv coverage sy symbol list ma map information The successive execution function is terminated when some other command is executed S5U1C63000A MANUAL EPSON 137 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 7 2 Executing from Menu or Tool Bar The menu and tool bar are assigned frequently used commands as described in Sections 8 5 and 8 6 A command can be executed simply by selecting desired menu command or clicking on the tool bar button Table 8 7 2 1 lists the commands assigned to the menu and tool bar Table 8 7
267. ecimal number or a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xFFFF The watch data addresses are set in units of 4 words A warning results if you specify an address that is outside the 4 word boundary with your specified address rounded down to a multiple of 4 Example dw J Address1 Address2 Address3 Address4 Warning Addressl Address2 Address3 gt 0000 04 0004 104 0008 154 Illegal address 000c 194 Illegal address round down to multiple of 4 0 10 14 170 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Be aware that a value is displayed as the watch data even if the invalid address which is displayed as an in the dd command is registered The value in this case is indeterminate The value displayed to the left shows the content of the start address and that displayed to the right is the content of an address that is equal to the start address 3 GUI utility None S5U1C63000A MANUAL EPSON 171 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 5 Command to Display Option Information od option data dump Function This command displays option data in the Command window in a hexadecimal dump format after reading it from the ICE Option data Target memory address range Funct
268. ed Second ICE parameter file lt FILE NAME gt ignored Two or more ICE parameter files are specified HEX Converter hx63 Development Tools Outline Converts an absolute object in IEEE 695 format output from the linker into ROM image data in Intel HEX format or Motorola S format This conversion is needed when making the ROM or when creating mask data using the development tools provided with each model Flowchart from Linker ICE Absolute 3 file par parameter file object file file abs Hex Converter hx63 Intel HEX file hex file hsa Motorola S hx63 err format files fileLhex or Deg format files Lhx63 err ex Error file filec h file csa ROM or Mask data creation Start up Command Usage Usage hx63 options file names Options b e Output error log file HX63 ERR a Use Intel Hex format o lt file name gt Specify output file name File names Absolute object file ABS ICE parameter file PAR Do not fill unused memory with Oxff Error Messages Cannot create lt file kind gt file lt FILE NAME gt The file cannot be created Cannot open lt file kind gt file lt FILE NAME gt The file cannot be opened Cannot read lt file kind gt file lt FILE NAME gt The file cannot be read Cannot write lt file kind gt file lt FILE NAME gt Data cannot be written to the file Illegal file name lt
269. ed gt lt cycle gt Start cycle number of trace data decimal from 0 to 8 191 Display The following lists the contents of trace information trace cycle Trace cycle decimal The last information taken into the trace memory becomes 00001 fetch addr Fetch address hexadecimal fetch code disasm Fetch code hexadecimal and disassembled content register Values of A B X and Y registers after cycle execution hexadecimal flag States of E I C and Z flags after cycle execution binary data Accessed data memory address hexadecimal read write denoted by r or w at the beginning of data and data 1 digit hexadecimal for 4 bit access 4 digit hexadecimal for 16 bit access SP Stack access 1 for SP1 access 2 for SP2 access trace in Input to TRCIN pin denoted by L when low level signal is input 1 When Trace window is opened When the td command is input without lt cycle gt the Trace window redisplays the latest data when the td command is input with lt cycle gt the trace data starting from lt cycle gt is displayed in the Trace window The display contents of the Trace window is updated after an execution of the target program All trace data can be displayed by scrolling the window fetch fetch addr code disasm 606A adc x 6x66 666C register flag data trace 4 B X Y EIC2 addr data SP in 1 8885 AAAA 8868 8885 vC 1 6666 AAAA 8888 8685 r9 1 8886 AAAA 8688 6885 w9 1 6661
270. ed commands and the execution results can be saved to a file in text format that is called a log file This file allows verification of the debug procedures and contents The contents displayed in the Command window are saved to this file Command example gt log tst log After the debugger is set to the log mode by the log command after it starts outputting to a log file the log command toggles output turned on in log mode output turned off in normal mode Therefore you can output only the portions needed can be output to the log file Display of Command window in log mode The contents displayed in the Command window during log mode differ from those appearing in normal mode 1 When executing a command when each window is open When the window that displays the command execution result is opened Normal mode The contents of the relevant display window are updated The execution results are not displayed in the Command window Log mode The same contents as those displayed in the relevant window are also displayed in the Command window However changes made to the relevant window by scrolling or opening it are not reflected in the Command window 2 When executing a command while each window is closed When the relevant display window is closed the execution results are always displayed in the Command window regardless of whether operation is in log mode or normal mode For the display format in the Command win
271. ed file already exists S5U1C63000A MANUAL EPSON 247 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 9 FUNCTION OPTION GENERATOR 9 5 Example Output Files Note Option and other configurations vary with each type of microcomputer Example of a function option document file S1C63xxx FUNCTION OPTION DOCUMENT Vx xx FILE NAME ZZZZZZZz FDC USER S NAME SEIKO EPSON CORPORATION INPUT DATE yyyy mm dd COMMENT SAMPLE DATA cek OPTION NO 1 OSCI SYSTEM CLOCK Crystal 32 768KHz Selected OPTO101 01 OPTION NO 2 OSC3 SYSTEM CLOCK CR 200KHz Selected OPT0201 01 OPTION NO 3 INPUT PORT PULL UP RESISTOR KOO With Resistor Selected K01 With Resistor Selected K02 With Resistor Selected K03 With Resistor Selected K10 With Resistor Selected K11 With Resistor Selected K12 With Resistor Selected K13 With Resistor Selected OPT0301 01 OPT0302 01 OPT0303 01 OPT0304 01 OPT0305 01 OPT0306 01 OPT0307 01 OPT0308 01 4 4 4 Ft FH HH OPTION NO 4 OUTPUT PORT OUTPUT SPECIFICATION R00 Complementary Selected R01 Complementary Selected R02 Complementary Selected R03 Complementary Selected OPT0401 01 OPT0402 01 OPT0403 01 OPT0404 01 4 X o OPTION NO 8 SOUND GENERATOR POLARITY NEGATIVE Selected OPT0801 01 EOF 4 lt Versio
272. ed 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 test files E Sample list in the Project window Suz 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 Settings x Assembler Linker Debugger Hex Converter Enorfile Debug info_ Listfile Defines Default sub s main s Cancel Apply Help 2 Configure options if necessary Check box items can be selected by clicking Items in the list can be toggled or entered by double clicking Settings x Assembler Linker Debugger Hex Converter Default main s No No No Refer to Chapter 3 Work Bench for details of the Settings dialog box 10 EPSON S5U1C63000A MANUAL S1C63 FAMILY
273. educe 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 El Rebuild All button The build task can be suspended by selecting Stop Build from the Build menu or clicking the Stop Build button c Stop Build button 36 EPSON S5U1C63000A MANUAL 81C63 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 S 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
274. efinition file after setting up options all settings are reset to the default state 2 Setup Select Setup from the Tool menu or click the Setup button to bring up the Setup dialog box From this dialog box select items and enter data Sl Setup button Function Option File Generate Setup Date 2000 408 7 iz r Function Option Document file fe S1C63 DEVE3 DEVESxxx_V1 zzzzzz2z FDC Ref r Function Option HEX rDo you make hex file Displays the current date Change it as necessary Function Option Document file Specify the function option document file name you want to create The file name displayed by default can be modified You can use the Ref button to look at other folders G Yes C No Function Option HEX file fe S1LC63 DEV63 DEV63xxx_V1l zzzzzzz2z FSA Ref EPEGH Type C 27064 C zyciz8 C 270256 C 2vcsiz User s Nana S S S S S Comment Function Option HEX Do you make hex file Select whether to create a function option HEX file You need to create one when you use the ICE to debug programs Function Option HEX file When you create a function option HEX file specify its file name here The file name displayed by default can be modified You can use the Ref button to look at other folders 244 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 9 FUNCTION OPTION GENER
275. eft blank when executing Generate ERROR SEGMENT DECODE TABLE is not set Making file s is not completed Warning Message Are you file update xxxx is already exist Selected memory address data bit has not been assigned to SEG COM terminal cells when executing Generate Overwrite confirmation message Specified file already exists Melody Assembler winmla 1 Development Tools Outline Some S1C63 models have a built in melody generator that outputs the sound converted from the melody ROM data The Melody Assembler winmla is the software tool for converting the melody data created using an editor into the melody ROM data and melody option setup data In addition simultaneously with this file winmla can create a HEX file that is required when debugging programs with the ICE Windows FiletF Tool D HelptH Bl 5 sl Option list area Lists melody generator mask options set in the device information definition file s1c63xxx ini Use the check boxes in this area to select each option A selected option has its OPTION NO 20 No 20 option O EE check box marked by V V selecti selecti Selected C select2 OPT2001 O1 D No 21 Option2i i OPTION NO 21 selecti Option21 i select2 selecti Selected Melody ROM option document area OPT2101 01 Displays the contents of selected options in the option documen
276. egments Therefore all segments must be assigned different addresses and data bits For details about the display memory map and segment assignment refer to the Technical Manual for each type of microcomputer In the explanation below the chip is assumed to have four common pins COMO to COM3 Follow the procedure below to assign segments 1 From the Memory Address Data bit table select the memory address data bit you want to assign by clicking the appropriate cell The cell changes color to blue If you select an incorrect cell select a correct cell The horizontal rows of the table correspond to display memory addresses The hexadecimal number shown to the right of the Memory Address Data bit title is the base address of display memory with only the lower byte of address being displayed in each row of the table The vertical columns of the table correspond to data bits 256 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR 2 From SEGMENT DECODE TABLE select the SEG pin COM pin to which you want to assign the memory address data bit selected in 1 by clicking the appropriate cell A 3 digit numeric value is displayed in the cell showing the selected address 2 high order digits and data bit 1 low order digit and the cell changes color to yellow 2 i 0 como com comz coms spzc a Selection example Lo SEGO IS 01 SEGL If you select an incorrect cell cli
277. eite ebrii tei ee 106 UL MEE TUNI 107 OD Ou iput Hex Files ie toi pta e ar Re ORE Ue caves IER SENSERI ERR 108 6 5 1 Hex File Cone ral ON cedar tire Ras 108 6 5 2 Motorola S Format 6 5 3 Intel HEX E 6 3 4 Conversion Range siete EEE RNE 6 6 Error Warning Messages aae EEE nennen nennen 110 OOD EONS esis asee 110 66 2 WAITING iid tace OO ae A E TO OB EE 110 6 7 EE 110 CHAPTER 7 DISASSEMBLER soi stscscastosssusdevessnesacesnnsssiudencestesensceveauussacsstuavatesunsisenstnnsetye Zd IUSTI 7 4 Jnput Output Files eter is te p ER Oe iota Zad Input Piles eie e ni ei ieksaa E ET S5U1C63000A MANUAL EPSON v S1C63 FAMILY ASSEMBLER PACKAGE CONTENTS 7 9 Starin Method EG 112 EE 113 7D Disassembling Output ciet ette tote nta herd eeu Eech 114 46 Errot Warning Messages dei ceci ri p a 117 7 6 L RER 7 6 2 Warning CHAPTER S DEBUGGER iiic iccetestiees Gis is stas bye seek deeg eege EE Gd E rrr ERE ERU REL ERE e dE e ERES Vo uote E Eee Venet U Ve DE RENS 65 2 Input Output Files sac eerte eerte ir e e tee ERR SEN 8 2 1 Input Files 6 2 2 Outp t Files esee nonet EES et EHE ERE SES 6 3 Starting Method 8 3 1 Start up Format 5 3 2 Start up ODUIONS seti entrenar Re EE r erre ER ERES 120 5 23 34 EE 121 8 34 Hardware Check at Start up cusa itii i tient ert ts 121 8 3 5 Method of Termination 6 4 Windo
278. elow appears so enter a file name including the path in the text box or select a file by clicking the Ref button Function Option Document file Open Function Option Document file Click OK and the file is loaded If the specified file exists and there is no problem with its contents the option list and the function option document areas are updated according to the contents of the file To stop loading the file click Cancel Perform steps 2 to 4 to update the file If you select Generate without changing the file name the message shown below is displayed asking you whether or not to overwrite the file Click Yes to overwrite or No or Cancel to stop overwrit ing Use the Setup dialog box to change the file name WARNING ES 9 Are you file update 22222222 FDC is already exist E No Cancel Note The function option document file can be read only when the device information definition file has been loaded 6 Quitting To terminate winfog select End from the File menu 246 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 9 FUNCTION OPTION GENERATOR 9 4 Error Messages The error messages of winfog are listed below The Dialog in the Display column means that messages are displayed in the dialog box and Message means that messages are displayed in the FOG window message area Table 9 4 1 List of winfog Error Messages
279. em When this menu item is selected a dialog box appears allowing selection of a command file Com x Enter an interval and a file name then click OK The file name can be selected using a standard file Executing Wait Time o selection dialog box that appears by clicking Browse Command File Path Browse 224 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER CMW execute command file with wait Function This command reads a command file and executes the debug commands written in that file at prede termined time intervals The execution interval of each command can be set in a range of 1 to 256 seconds in 1 second incre ments using the md command In the initial debugger settings the execution interval is 1 second Format 1 gt cmw file name gt direct input mode 2 gt cmw guidance mode Filename file name gt gt Display execution progress lt file name gt Command file name path can also be specified Examples Format 1 gt cmw batchl cmd Format 2 cmw l File name test cmd Notes e Any contents other than commands cannot be written in the command file An error results if the file you specified does not exist Error Cannot open file Another command file can be read from a command file However the nesting of command files is limited to a maximum of 5 levels An error results if a cmw or com command at the s
280. embled contents of the program Format gt u address direct input mode address Start address for display hexadecimal or symbol IEEE 695 format only Condition 0 lt address last program memory address Display 1 When Source window is opened Unasm Unassenble ldb ba 6x4b ldb sp1 ba ldb ba 6x1f ldb sp2 ba ldb ext 6xfe calr Oxea ldb ext Oxfe calr 8xef jr xfd xnop nop If lt address gt is not specified display in the Source window is changed to the unassemble display mode If lt address gt is specified display in the Source window is changed to the unassemble display mode At the same time code is displayed beginning with lt address gt 2 When Source window is closed The 16 lines of unassembled result are displayed in the Command window The system then waits for a command input If lt address gt is not specified this display begins with the current PC displayed in the Register window If lt address gt is specified the display begins with lt address gt gt udl ADDR CODE UNASSEMBLE 0110 094B ldb ba 0x4b 0111 1IFC4 ldb spl ba 0112 O91F idb ba 0xlf 0113 1FC6 ldb sp2 ba 011E 1FFF nop OllF 1FFF nop 200 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 3 During log output If the command execution result is being output to a log file as specified by the log
281. en a map break occurs the PC LED on the ICE stops and the EMU LED turns off All other break settings are invalid because they cannot be written into the flash memory S5U1C63000A MANUAL EPSON 155 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 8 8 Coverage The ICE retains coverage information i e information on addresses at which a program is executed and it can be displayed in the Command window Because the executed address range is displayed as shown below it is possible to know which areas have not been executed Coverage Information 0 0110 0118 1 0200 020f Table 8 8 8 1 Coverage commands Function Command Display coverage information cv Clear coverage information cvc 8 8 9 Writing Data to the FPGA on the Standard Peripheral Circuit Board The standard peripheral circuit board is configured for the supported model by writing the peripheral function data to the on board FPGA This writing is necessary the first time the standard peripheral circuit board is used or before beginning development of another model The debugger supports the following FPGA data handling functions 1 Erasing FPGA All contents of the FPGA are erased 2 Writing data to FPGA Data in the specified file is written to the FPGA Also the write command supports erasing the FPGA Data for the supported models are provided as c63xxx mot files in the epson s1c63 ice fpga directory default 3 FPGA dat
282. ename gt The source file cannot be opened You cannot close workspace while a build is in progress The project close command or work bench terminate command is specified while the build Select the Stop Build command before closing task is being processed Would you like to build it The debugger invoke command is specified when the build task has not already been completed Assembler as63 Development Tools Outline Converts the mnemonic of the source files into object codes machine language of the 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 Flowchart Assembly source file Assembler as63 d filelst fileo file ms file err Relocatable Object file Preprocessed Error file list file E source file to Linker SE Start up Command Usage Usage as63 options lt file name gt Options d lt symbol gt Add preprocess definition e Output error log file ERR ed Add source debug information in object sl Output relocatable list file LST c Ignore character case of symbols o file name Specify output file name File name Source file name S or MS Pseudo instructions include file name gt Inserts other file in the source file define lt define name gt lt string gt
283. er commands that can be written in either uppercase or lower case characters are annotated in lowercase characters in this manual except for user specified sym bols 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 Oxffff Binary numbers Accompanied by the prefix Ob 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 To click 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 6 Key operations The operation of press
284. er display in the Edit window Color selection list box These list boxes allow selection of colors used to display the document in the Edit window Text mnemonics comments assembler pseudo instructions preprocessor pseudo instructions labels and line numbers are displayed with different colors selected here Note The contents selected in this dialog box will be effective after restarting the work bench 44 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH 3 11 Short Cut Key List Key operation Function Ctrl N Creates a new document Ctrl O Opens an existing document Ctrl F12 Opens an existing document Ctrl S Saves the document Ctrl P Print the active document Ctrl Shift F12 Print the active document Ctrl Z Undoes the last action Alt BackSpace Undoes the last action Ctrl X Cuts the selection and puts it on the clipboard Shift Delete Cuts the selection and puts it on the clipboard Ctrl C Copies the selection to the clipboard Ctrl Insert Copies the selection to the clipboard Ctrl V Inserts the clipboard contents at the insertion point Shift Insert Inserts the clipboard contents at the insertion point Ctrl A Selects the entire document Ctrl F Finds the specified text F3 Finds next Shift F3 Finds previous Ctrl H Replaces the specified text with different text Ctrl
285. er flag data trace cycle addr code disasm AB X Y EICZ addr data SP in 00010 0116 O8FE ldb ext 0Oxfe F 1 0007 AAAA 0000 gt Format 2 gt tsd l pc address 2 data read address 3 data write address 14 Search address 1164 Trace searching Done trace fetch fetch register flag data trace cycle addr code disasm AB X Y EICZ addr data SP in 00010 0116 O8FE ldb ext 0Oxfe F 1 0007 AAAA 0000 gt When command execution results are being output to a log file by the log command the search results are displayed in the Command window as well as output to the log file even when the Trace window is opened S5U1C63000A MANUAL EPSON 219 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Note The address specified for search must be within the range of the program data memory area available for each microcomputer model An error results if the input one is not a hexadecimal number or not a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded for program memory address Error Address out of range use 0 0xXXXX An error results if the limit is exceeded for data memory address Error Address out of range use 0 0xFFFF GUI utility Trace Trace Search menu item When this menu item is selected a dialog appears for setting a search condition Select a option using the radio button and enter an address in the text box then cl
286. er types of microcomputers Nelody data file zzzzzzzz mdt This is a test format file in which the score data is written Use an editor to create this file Refer to Section 11 4 Melody Data for details Melody ROM option document file zzzzzzzz mdc This is a text format file in which the contents of selected mask options and the mask data created from the melody data are stored You can read this file into winmla and correct the already selected option settings This file is packed along with completed other program data files into a single file by the mask data checker winmdc which we would like to have presented to Seiko Epson as the mask data file From this file Seiko Epson will create the mask patterns for the IC Melody ROM option HEX file zzzzzzzz msa This is the Motorola S2 format file necessary to set the selected mask options in the ICE When you debug programs with the ICE download this file into the ICE using debugger commands 1 The xxx in the file name denotes the model name of a microcomputer For the zzzzzzzz part any given file name can be specified 2 For details on how to download mask options into the ICE refer to Chapter 8 Debugger 262 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 11 3 Using winmla 11 3 1 Starting Up Startup from Explorer Double click on the winmla exe icon or select winmla from the start menu P If the device information defin
287. er values xfwr s file name H S N Write to FPGA rs reg value lt reg gt lt value gt Program execution g addri lt addr2 Modify register values reg pc a blxlylflsp1 sp2lext a Execute successively gr lt addr1 gt lt addr2 Reset CPU and execute successively xfcp s file name gt H S Compare FPGA data xdp s lt addr1 gt lt addr2 gt Trace Dump FPGA data tm n s a trigger a m e i o lt addr1 gt lt addr2 gt addr7 lt addr8 gt s lt step gt Step into Set trace mode n lt step gt Step over td lt cycle gt Display trace information ts pc dr dw lt addr gt Search trace information CPU reset tf lt cycle1 gt lt cycle2 gt file name gt Save trace information into file rst Reset CPU Others Break cv lt addr1 gt lt addr2 gt Display coverage information bp lt addr1 gt lt addr16 gt Set PC breakpoint cve Clear coverage information bc bpc lt addr1 gt lt addr16 gt Clear PC breakpoint com lt file name gt lt interval gt Load amp execute command file bd lt data gt r w lt addr1 gt lt addr2 gt Set data break cmw lt file name gt Load amp execute command file with intervals bdc Clear data break rec file name gt Record commands to a command file br reg value reg lt value g
288. ers Enter a start cycle number end cycle number and a file name then click OK Start Point feist Decimal max 8 191 To save all the trace information leave the Start cycle End Point o Decimal min 0 number and End cycle number boxes blank The file name can be selected using a standard file selec File Name lead Browse M Se tion dialog box that appears by clicking Browse o Ge S5U1C63000A MANUAL EPSON 221 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 15 Coverage CV coverage Function This command displays coverage information addresses where the program is executed The coverage information is displayed in the Command window Format gt cv lt address1 gt lt address2 gt direct input mode lt address1 gt Start address hexadecimal or symbol IEEE 695 format only lt address2 gt End address hexadecimal or symbol IEEE 695 format only Condition 0 lt address lt address2 lt last program memory address Examples cv 100 1ffJ Displays the executed addresses within the range from 0x100 to Ox 1ff Coverage Infomation 1 0100 0102 2 0110 0118 gt cvel Displays all the executed addresses Coverage Infomation 1 0000 000d 2 0100 0102 3 0110 0118 gt Notes If the co command is input without lt address1 gt and lt address2 gt coverage information in all address is displayed if both lt address1 gt and lt
289. ersion of winmla Error Messages File name error Number of characters in the file name or extension exceeds the limit Illegal character Prohibited characters have been entered Please input file name File name has not been entered Can t open File xxxx File xxxx cannot be opened INI file is not found Specified device information definition file ini does not exist INI file does not include MLA information Specified device information definition file ini does not contain melody ROM option information Melody Data file is not found Specified melody data file does not exist Melody ROM Option document file is not found Specified melody ROM option document file does not exist Melody ROM Option document file does not match INI file Contents of the specified melody ROM option document file do not match device information definition file ini A lot of parameter Too many command line parameters are specified MDT file error Contents of the read melody data is incorrect Details are saved with error symbols in the ELG file Can t open File xxxx Making file s is not completed File xxxx cannot be opened when executing Generate Can t write File xxxx Making file s is not completed Warning Message Are you file update xxxx is already exist Error Symbols S Syntax Error File xxxx cannot be written when executing Generate O
290. esized as needed by dragging the boundary of the window with the mouse The Minimize and Maximize buttons work in the same way as in general Windows applications Each window can be moved to the desired display position by dragging the window s title bar with the mouse However windows can only be resized and moved within the range of the application window 3 Scrolling a window All windows can be scrolled The Register window can be scrolled only when its size is reduced Use one of the following three methods to scroll a window 1 Click on an arrow button or enter an arrow key cursor movement to scroll a window one line at a time 2 Click on the scroll bar of a window to scroll it one page current window size at a time 3 Drag the scroll bar handle of a window to move it to the desired area 4 Other The opened windows can be cascaded or tiled using the Window menu Note for display The windows may display incorrect contents caused by incompatibility between the OS and the video card or driver If there is any problem try the following methods to fix it e Update the driver to the latest version if an older version has been installed Please inquire about the version to the distributor e If the driver allows selection of extended function such as acceleration turn the functions off e Ifthe problem is not fixed using the above try the standard driver supplied with Windows95 98 NT S5U1C63000A MANUAL EPSON 125 S
291. ess out of range use 0 0xFFFF e An error results if the start address is larger than the end address Error end address start address GUI utility View Data Dump menu item When this menu item is selected the Data window opens or becomes active and displays the current data memory contents S5U1C63000A MANUAL EPSON 165 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER de data memory enter Function This command rewrites the contents of the data memory with the input hexadecimal data Data can be written to continuous memory locations beginning with a specified address Format 1 gt de address lt data1 gt lt data2 gt lt data16 gt direct input mode 2 gt de guidance mode Data enter address lt address gt Address Original data data 1 address Start address from which to write data hexadecimal or symbol IEEE 695 format only lt data 1 16 gt Write data hexadecimal Condition 0 lt address lt Oxffff 0 lt data Oxf Examples Format 1 gt de 100 0 Rewrites data at address 0x100 with 0 Format 2 deJ Data enter address 100 Address is input 0100 0 ad Data is input 0101 0 4 Skipped 0102 0 qd Command is terminated gt Notes The start address specified here must be within the range of the data memory area available with each microcomputer model An error results if the input one is not a
292. ess3 gt Address of destination area to be copied to hexadecimal or symbol IEEE 695 format only Condition 0 lt address lt address2 lt Oxffff 0 lt address3 lt Oxffff Examples Format 1 gt dm 200 2ff 2804 Copies data within the range from address 0x200 to address Ox2ff to the area from address 0x280 Format 2 gt dm Start address 200 1 Source area start address is input End address 2ffJ Source area end address is input Destination address 2804 Destination area start address is input gt Command execution can be canceled by entering only the Enter key and nothing else Notes All the addresses specified here must be within the range of the data memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xFFFF Write operation is not performed to the read only address of the I O area Data in the write only area cannot be read If the source area contains write only address 0 is written to the corresponding destination If the destination area contains read only address the data of that address can not be rewritten If the source and destination areas contain I O address of mixed read only bits and write only bits either read or write operation can be exec
293. ettings direct input mode guidance mode On the fly interval 0 5times sec H Current setting lt 0 5 gt 1 Counter unit 1 time 2 cycle Current setting 1 22 1 Interrupt at step 1 allowed 2 not allowed Current setting 1 22 1 Step display mode 1 each 2 last 2 Current setting 1 22 1 Counter mode 1 reset 2 hold Current setting 1 22 1 Illegal instruction 1 check 2 nocheck Current setting 1 2 Cmw wait time 1 256s 2 Current setting 1 2562 1 gt lt option gt lt num gt f on the fly interval 0 5 times sec u couter unit 1 Time 2 Cycle i interrupt at step 1 Allowed 2 Not allowed s step display mode 1 Each 2 Last c counter mode 1 Reset 2 Hold il illegal instruction 1 Check 2 No check cm cmw wait time 1 256 sec Examples gt md u 14 Sets the execution cycle counter in time measurement mode md On the fly interval 2 times sec Counter unit time Interrupt at step not allowed Step display mode each Counter mode hold Illegal instruction check Cmw wait time Ls On the fly interval 5 times sec Counter unit Interrupt at step allowed 2 not allowed 2 last Counter mode reset 2 hold Illegal instruction 1 check 2 no check 0 1 1 Step display mode l each 1 1 1 Cmw wait time 256 s gt Notes time 2 cycle 2 times sec time not allowed each hold check 1
294. ever those tools cannot be invoked from the Tools menu S5U1C63000A MANUAL EPSON 39 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH 3 9 Tool Option Settings The development tools have startup options that can be specified when invoking them These settings can be made in the Settings dialog box that appears by selecting Settings from the Build menu Assembler Linker Debugger Hex Converter Defines No Default sub s main s Cancel Apply Help Click the tool name tab to view option settings of each tool Clicking the OK button updates option setting information in the project and then closes the dialog box To continue to select other tool options click the Apply button This does not close the dialog box Clicking the Cancel button closes the dialog box 3 9 1 Assembler Options Assembler Linker Debugger Hex Converter Emorfle Debuginfo_ Listfile Defines Default No No sub s No No main s No No Cancel Apply Help In this dialog the following four assembler options can be selected Error file Output of an error file No Not output Yes Output Debug info Addition of debugging information to the relocatable object No Not added Yes Added List file Output of the relocatable list file No Not output Yes Output Defines Name definition for conditional assembly Enter a define name
295. ewrites the code at address 0x200 with 0x1972 add Ya 96b Format 2 gt pe Program enter address 2004 Address is input 0200 1fff 19724 Code is input 0201 1fff 4 Address 0x201 is skipped 0202 1fff qH Command is terminated gt Notes The start address you specified must be within the range of the program memory area available with each microcomputer model An error results if the input one is not hexadecimal number or not a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX Code must be input using a hexadecimal number in the range of 13 bits 0 to Ox1fff An error results if the input one is not a hexadecimal number Error invalid value An error results if the input code exceeds the limit or it is invalidated in the PAR file Error illegal code n guidance mode the following keyboard inputs have special meaning qa Command is terminated finish inputting and start execution T l Return to previous address SIT Input is skipped keep current value If the maximum address of program memory is reached and gets a valid input other than J the command is terminated When the contents of the program memory are modified using the pe command the unassemble contents of the Source window are updated immediately Although the contents of the unassemble display
296. extension code is inserted is placed to the right of the code part There is no original source for the code but the disas sembled Idb exe imm8 is delivered at the source part When an extension code is deleted is placed to the left of the original source part The original statement appears at the source part in the list file but no code is delivered When the operand of an extension code is corrected is placed to the left of the source statement Instructions preprocessed in the assembler The instructions expanded in the assembler macros and include sources are listed with a 98 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 9 Cross Reference File The cross reference file enumerates all the address labels with their absolute addresses and all the ad dresses where the address labels are referred to It is delivered only when the x option is specified Its file format is a text file and the file name is lt file name gt xrf The lt file name gt is the same as that of the output object file Sample cross reference file Linker 63 ver x xx Cross reference file TEST XRF Mon Jan 15 12 40 41 2001 Label INIT RAM BLK1 at 0x0000 SUB O CODE Global 0x0101 MAIN O CODE 0x0115 MAIN O CODE E EI Label RAM BLKO at 0x000 MAIN O BSS Global 0x0101 MAIN O CODE 0x0115 MAIN O CODE E D Label RAM BLK1 at 0x004 MAIN O BSS Global 0x0000 SUB O COD
297. f the program with the macro name Unlike a subroutine the part that is invoking a macro is replaced with the content of the definition Instruction format macro Macro name gt lt Dummy parameters Dummy parameters lt Statement string gt endm lt Macro name gt The first character is limited to a z A Z and _ e The second and the subsequent characters can use a z A Z 0 9 and _ Uppercase and lowercase characters are discriminated macro itself is case insensitive When assembling with the c option all symbols are case insensitive One or more spaces or tabs are necessary between the instruction and the macro name Dummy parameter Dummy parameter symbols for macro definition They are described when a macro to be defined needs parameters One or more spaces or tabs are necessary between the macro name and the first parameter symbol When describing multiple parameters a comma is necessary between one parameter and another The same symbols as for a macro name are available The number of parameters are limited according to the free memory space Statement string The following statements can be described Basic instruction mnemonic and operand Conditional assembly instruction Internal branch label Comments The following statements cannot be described Assembler pseudo instructions excluding conditional assembly instruction Other labels than internal branc
298. fied with the org pseudo instruc tion or more loosely with the align pseudo instruction 72 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER bss pseudo instruction Instruction format bss Function Declares the start of a BSS section Statements following this instruction are assembled as those to be mapped in the RAM until another section is declared Precautions n a BSS section nothing else other than the comm lcomm and omg pseudo instructions symbols and comments can be described A BSS section can be divided among multiple locations of a source file for purpose of definition describing the bss pseudo instruction in the respective start positions A BSS section is relocatable by default unless its location is specified with the org pseudo instruction or more loosely with the align pseudo instruction S5U1C63000A MANUAL EPSON 73 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 7 Location Defining Pseudo Instructions org align The absolute addressing pseudo instructions align and org work to specify absolute location of a section in different precision such as 2 words alignment level and complete absolute address level org pseudo instruction Instruction format org lt Address gt lt Address gt Absolute address specification Only decimal binary and hexadecimal numbers can be described The addresses that can be specified
299. formation on each microcomputer model and is indispensable for starting the debugger This file is provided for each microcomputer model The following files are read by the debugger according to command specification Object file File format Binary file in the IEEE 695 format File name lt file name gt abs An extension other than abs can also be used Description This is an object file generated by the linker This file is read into the debugger by the If command By reading a file in the IEEE 695 format that contains debug information source display and symbolic debugging can be performed 118 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE Source file File format File name Description Program file File format File name Description CHAPTER 8 DEBUGGER Text file lt file name gt s This is the source file of the above object file It is read when the debugger performs source display HEX file in Motorola S format lt file name gt hsa lt file name gt lsa This is a load image file of the program ROM and is read into the debugger by the lo command The file hsa corresponds to the 5 high order bits of the program code and the file Isa corresponds to the 8 low order bits of the program code These files are generated for the purpose of creating mask data from an object file in the IEEE 695 format by the Hex convertor Unlike files in the IEEE 695 format these files cannot be used for source
300. forms the same function when the s command is executed Next button This button executes one instruction step at the address indicated by the current PC If the instruc tion to be executed is calr calz or int it is assumed that a program section until control returns to the next address constitutes one step and all steps of their subroutines are executed This button performs the same function when the n command is executed Reset button This button resets the CPU It performs the same function when the rst command is executed 8 5 6 Break Button S Use this button to set and clear a breakpoint at the address where the cursor is located in the Source window This function is valid only when the Source window is open Note that select ing a break address by clicking on the address line is valid for only the lines that have actual code and is invalid for the source only lines 8 5 7 Help Button i By clicking on this button a help window appears on the screen displaying the contents of help topics 132 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 6 Menu This section outlines the menu bar available with the debugger 8 6 1 Menu Structure The menu bar has eight menus each including frequently used commands File Run Break Trace View Option Window Help 8 6 2 File Menu Load File Load File This menu item reads an object file in the IEEE 695 format into th
301. from the boot address after resetting the CPU Format gt gr lt address1 gt lt address2 gt direct input mode address1 2 Temporary break addresses hexadecimal or symbol IEEE 695 format only Condition 0 address1 2 last program memory address Operation This command resets the CPU before executing the program This causes the PC to be set at address 0x0110 from which the command starts executing the program Once the program starts executing the command operates in the same way as the g command except that the gr command does not support the function for restarting execution by hitting the Enter key Refer to the explanation of the g command for more information Notes If a break condition is met program execution is suspended and the PC will be set to the program address at the breakpoint The address you specified must be within the range of the program memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX GUI utility Run Go from Reset menu item Go from Reset button When this menu item or button is selected the gr command is executed Go from Reset button S5U1C63000A MANUAL EPSON 179 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGE
302. get program is made to stop executing by one of the following causes Break command conditions are satisfied The Key Break button is activated The ICE BRKIN pin is pulled low A map break or similar break occurs Break by command The debugger has five types of break functions that allow the break conditions to be set by a com mand When the set conditions in one of these break functions are met the program under execution is made to break 1 Break by PC This function causes the program to break when the PC matches the set address The program is made to break before executing the instruction at that address The PC breakpoints can be set for multiple addresses Table 8 8 5 1 Commands menu items tool bar button to set breakpoints Function Command Menu Button Set breakpoints bp Break Breakpoint Set di Clear breakpoints bc bpc Break Breakpoint Get di The addresses that are set as PC breakpoints are marked with a as they are displayed in the Source window Using the Break button easily allows the setting and canceling of breakpoints Click on the address line in the Source window at where the program break is desired after moving the cursor to that position and then click on the Break button A 6 mark will be placed at the beginning of the line indicating that a breakpoint has been set there and the address is registered in the breakpoint list Clicking on the li
303. gment option document file Save button Saves the current option settings to a file segment assignment data file Load button Loads a segment assignment data file Generate button Creates a file according to the contents of segment options set Setup button Sets the date of creation or output file name or a comment included in the segment option document file Device INI Select button Loads the device information definition file s1c63xxx ini Help button Displays the version of winsog Saves the current option settings to a file segment assignment Menus File menu Open Filet Opens a segment option document file 5 Record Save Gen data file Record Load Loads a segment assignment data file End Terminates winsog Save S Load D Tool menu Generate Took Creates a file according to the contents of segment options set Setup Generate G Sets the date of creation or output file name or a comment Setup S included in the segment option document file Device INI Select Help menu HelptH Device INI Select Loads the device information definition file s1c63xxx ini Version Displays the version of winsog Versiont Error Messages File name error Number of characters in the file name or extension exceeds the limit Illegal character Prohibited characters have been entered Please input file name File name has not been e
304. gt gt sc ldb ba SP1 INIT ADDR ldb spl ba set SP1 ldb ba SP2 INIT ADDR ldb sp2 ba set SP2 calr INIT RAM BLK1 initialize RAM block 1 LOOP ldb ext INC RAM BLKlGrh calr INC RAM BLK1lGrl increment RAM block 1 ldb ext LOOP6rh jr LOOP6r1 infinity loop gt 202 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 3 During log output If the command execution result is output to a log file as specified by the log command code is displayed in the Command window and its contents are also output to the log file If the Source window is closed code is displayed in the same way as in 2 above If the Source window is open the window is redisplayed In this case the same number of lines is displayed in the Command window as displayed in the Source window 4 Successive display If you execute the sc command after entering it from the keyboard code can be displayed successively by entering the Enter key only until some other command is executed When you press the Enter key the Source window is scrolled forward one screen When displaying code in the Command window 16 lines of code following the previously displayed address are displayed the same number of lines as displayed in the Source window if the sc com mand is executed during log output Notes Source codes can be displayed only when an absolute object file that contains source debug informa
305. h is specified When the control bit is set to 0 or 1 for a rest an error will occur even if the pitch is set to RR rest 3 Indicates the end of a melody The control bit in the last data of each melody must be set to 3 When two or more control bits that are set to 3 are described the first control bit is effective and the melody ends at that point 2 3 Note data Note data sets duration of notes or rests Eight types of notes or rests are available as shown in Table 11 4 4 3 To specify a note that is not available tie two or more available notes by setting the control bit to 0 For a rest tie two or more rests by setting control bit to 2 Table 11 4 4 3 Notes Note data 1 2 4 5 6 7 e IIIJ LA day all gy 272 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE o CHAPTER 11 MELODY ASSEMBLER 2 4 Pitch data The range for selecting pitches differs according to the reference frequency that can be selected from the Generate dialog box of winmla The frequency should be selected according to the the OSC1 oscillation circuit Table 11 4 4 4 shows the correspondence between pitches and HEX codes example for each reference frequency In melody data pitch data should be described Table 11 4 4 4 Pitch Data example Reference frequenc 38 4 kHz Reference frequenc 32 768 kHz Pitch data HEX d
306. h labels Macro invocation Internal branch label A macro is spread over to several locations in the source Therefore if you describe a label in a macro a double definition will result with an error issued So use internal branch labels which are only valid within a macro The number of internal branch labels are limited according to the free memory space The same symbols as for a macro name are available Sample definition define C RESET 051101 macro WAIT COUNT id a COUNT and f C RESET LOOP nop jr LOOP endm 68 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER Expansion rules When a defined macro name appears in the source the assembler inserts a statement string defined in that location If there are actual parameters described in that process the dummy parameters will be replaced with the actual parameters in the same order as the latter are arranged The internal branch labels are replaced respectively with __L0001 from top of the source in the same order as they appear Sample expansion When the macro WAIT shown above is defined Macro invocation WAIT 15 After expansion WAIT 15 ld a 15 and f 0b1101 __L0001 nop jr __L0001 __L0001 denotes the case where an internal branch label is expanded for the first time in the source Precautions The assembler only permits backward reference of a macro invocation Therefo
307. he Command window if the Register window is closed If the Source window is open the displayed lines are marked with an arrow as they are executed according to the setting of this mode Mode of execution cycle counter This can be selected from hold mode or reset mode In reset mode the counter value is reset to 0 each time you enter a program execution command including execution by the Enter key The value of the execution cycle counter is also reset when you execute a gr command switch this mode or the counter measurement mode or execute an rst command Illegal instruction check mode When loading a program file into the computer using the If or lo command you can choose whether or not you want illegal instructions to be checked This check is disabled when rewriting the program memory with a pe or pf command cmw command wait time A cmw command wait time can be set in the range of 1 to 256 seconds in 1 second increments Default values of debugger modes Mode Default setting On the fly function Twice per second Counter measurement mode Bus cycle Interrupt at stepping Not allowed Step display Each step Execution cycle counter reset Hold Illegal instruction check Checked cmw wait time 1 second S5U1C63000A MANUAL EPSON 229 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Format 1 gt md lt option gt lt num gt option lt num gt 2 md i Current s
308. he display area is the entire 64K word data memory Ge E p F E F 4 z iu hi bi space RAM data ROM I O The contents of all 5 FF50 EE k j ar sec eet ae NON ae addresses from 0x0000 to Oxffff can be displayed by FF60 O4D xx xx 260606 x x scrolling the window The contents of unmapped FF70 66868660x xxx 86060 6 6 6 z ge FFB FFFFFFFF FFFFFFFF addresses in each microcomputer model are indicated FF9O FFFFFFFF FFFFFFFF by an ai bs Updating of display The display contents of the Data window are updated automatically when memory contents are modified with a command de df or dm command or by direct modification After executing the program g gr s n or rst command the display contents are also updated To refresh the Data window manually execute the dd command or click the vertical scroll bar 2 Direct modification of data memory contents The Data window allows direct modification of data memory contents To modify data on the Data window place the cursor at the front of the data to be modified or double click the data and then type a hexadecimal character 0 9 a f Data in the address will be modified with the entered number and the cursor will move to the next address This allows successive modification of a series of addresses 6 4 5 Register Window mi Reg I Impx 1 Displaying register contents PC 8118 The Register window displays the contents of the PC A regi
309. he 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 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 Ik63 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 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 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 sour
310. he main FPGA must be erased before hand Notes Use the file provided by Seiko Epson as the data to be written without modifying the contents Also the file extension cannot be changed as it is mot Motorola S or mcs Intel HEX Specifying an illegal file results in an error and data cannot be written Error cannot open file The N option can be specified when the FPGA has been erased completely using the xfer xfers command When writing data to the FPGA that has not been erased do not specify the N option A dialog box appears to show the progress while executing To abort execution click the Cancel button on the dialog box or press the ESC key When the execution stops the warning message shown below is displayed Warning User cancel In this case the standard peripheral circuit board cannot be used until the FPGA is erased and reprogrammed Process time including erase is about 8 minutes max when the transfer rate between the ICE and PC is 38400 bps Do not write data to the sub FPGA unless otherwise specified as it normally contains some LCD functions S5U1C63000A MANUAL EPSON 233 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Xfcp XfCps xilinx fpga data compare Function This command compares the contents between the FPGA and the specified file Format gt xfcp file name gt H S for main FPGA direct input mode gt xfcps lt file name gt H S for sub FPGA direc
311. he same function as executing the tf com mand 134 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 6 6 View Menu Command Command This menu item activates the Command window Program Data Dump Program Register Unassemble This menu item opens or activates the Source Traca Data Dump Source Display window and displays the program from the current v Toolbar Register Monah PC address in the display mode selected from the v Status Bar sub menu items These sub menu items perform the same functions as executing the u sc and m com mand respectively Data Dump This menu item opens or activates the Data window and displays the data memory contents from the memory start address Register This menu item opens or activates the Register window and displays the current values of the registers Trace This menu item opens or activates the Trace window and displays the trace data sampled in the ICE trace memory Toolbar This menu item shows or hides the toolbar Status Bar This menu item shows or hides the status bar 8 6 7 Option Menu Log Log This menu item starts or stops logging using a dialog box It performs the same Reed function as executing the log command Record This menu item starts or stops recording of a command execution using a dialog box It performs the same function as executing the rec command Mode Setting
312. he system to operate erratically The data value can be input as a binary number with or without mask bits in the range of 4 bits 0 to Oxf An error results if the limit is exceeded Error invalid data pattern nn An error results if you input the R W option other than r w or s Error Incorrect r w option use r w The program stops one to two instructions after the break condition has been met GUI utility Break Data Break menu item When this menu item is selected a dialog box appears for setting a data break condition Data Break E To set a data break condition enter an address and a data pattern in the text box and select R W condition from Break Option Hex or Bin a it e radio buttons Then clic Ade Cine Adder H data break condition clic ear om om 188 EPSON 5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER bdc data break clear Function This command clears the data break condition that has been set Format bdc J direct input mode GUI utility Break Data Break menu item When this menu item is selected a dialog box appears for clearing the set data break condition See the bd command S5U1C63000A MANUAL EPSON 189 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER br register break Function This command sets or clears register break This command allows you to specify data or a ma
313. iagnosis from start to finish requires about 5 minutes Wait until it is com pleted You will then see the following message Connecting COMx with xxxxx baud rate DIAG test please wait 5 min done If an error is found in self diagnosis an error message will be displayed on the screen instead of done above 2 Version check When the connection test terminates normally the debugger checks the contents of the parameter file the version of the ICE and the versions of the peripheral boards inserted in the ICE Parameter file nam XXXXXXXX par Version XX Chip name 63xxx CPU version OX X PRC board version X X LCD board version X X EXT board version X X ICE hardware version X X ICE software version X X DIAG test omitted Here the debugger checks to see if the ICE s system configuration including extension boards such as a PRC board Peripheral Circuit Board and an LCD board and their versions are matched to the setup contents of the parameter file If the ICE does not have a necessary board or contains an unnecessary board or a board of different version a warning message appears on the screen 122 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 3 ICE initialization When the above tests are finished the debugger initializes the ICE as follows Mapping memory configuration is set according to the parameter file Initializing mapped memory RAM 0xa
314. ick OK Option PC Address C Data Read Address C Data Write Address Address oot 18 Hexadecimal or Symbol Cancel 220 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER tf trace file Function This command saves the specified range of the trace information displayed in the Trace window by the td or ts command to a file Format 1 gt tf lt cycle1 gt lt cycle2 gt file name gt direct input mode 2 gt tf J guidance mode Start cycle number max 8191 cycle12 J End cycle number min 0 lt cycle2 gt File Name file name gt gt lt cyclel gt Start cycle number decimal max 8 191 lt cycle2 gt End cycle number decimal min 0 lt file name gt Output file name path can also be specified Examples Format 1 gt tf trace trcJ Saves all trace information extracted by the td command 8191 8000 8000 7000 1000 1 OK gt Format 2 gt tf J Start cycle number max 8191 1000 End cycle number min 0 gia File name test trc 1000 i OK gt Notes e If an existing file is specified the file is overwritten with the new data e The default value of lt cyclel gt is the last location and the default value of lt cycle2 gt is 1 GUI utility Trace Trace File menu item When this menu item is selected a dialog box appears allowing specification of the paramet
315. idance mode Data break set status 1 set 2 clear wi lt 1 254 Command is completed when 2 is selected data Old data lt data gt R W R W Old option options Start address Old address lt address1 gt End address Old address lt address2 gt gt lt data gt Data pattern binary can be input for the bits to be masked lt option gt Memory read write option r w or address1 2 The specified address hexadecimal or symbol IEEE 695 format only Condition 0 lt address lt address2 lt Oxffff 0 data Ob1111 Examples Format 1 bd 1000 WO fJ Sets a data break condition so that the program breaks when 0x8 is written to the address range from 0x0 to Oxf The direct input mode cannot clear the set condition Format 2 gt bd4 data R W area 1 set 2 clear 14 a 1 set is selected data See 4 gpl Data pattern is set to 0b1 R W R W wel R W condition is set for write access Start address 04 Break address range is set to 0x0 0xf End address i f bdJ data 1 R W W area 0000 000F Currently set condition 1 set 2 clear 24 2 clear is selected bdJ data R W area 1 set 2 clear 4 Terminated by Enter key gt nn in the binary data pattern specifies that the bit will not be compared with the actual read write data S5U1C63000A MANUAL EPSON 187 S1C63 FAMILY ASSEM
316. ied Disassembler 63 Ver x xx Assembly source file TEST MS Mon Jan 15 13 10 20 2001 set labell 0x4 set label2 0x4 set label3 0x4b set label4 Ox1f code org 0x0 codel db ext labe b xl label code2 db ext labe db xl label add x 0x1 adc x 0x0 11 h 181 12 h 2 1 S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE EPSON 115 CHAPTER 7 DISASSEMBLER code3 org ldb calr reti cod Org ldb ldb ldb ldb ldb calr ldb calr jr e 0x100 sext codel rh codel rl e 0x110 ba label301 spl ba sba label4 1 sp2 ba sext codel rh codel8rl sext code2 rh code28rl ode3 rl Output source file test ms when cu is specified Disassembler 63 Ver x xx Assembly source file TEST MS Mon Jan 15 13 10 20 2001 CODE1 CODE2 CODE3 SET SET SET SET COD ORG LDB LDB ADC ADC ADC RET COD ORG LDB CALR RETI COD ORG LDB LDB LDB LDB LDB CALR LDB CALR JR C LABEL1 0X4 LABEL2 0X4 LABEL3 0X4B LABEL4 OXIF E 0x0 SEXT LABEL1 H XL LABEL1GL X 0X0 X 0X0 X 0X0 X 0X0 oo SEXT LABEL2 H SXL LABEL2 L X 0X1 X 0X0 X 0X0 X 0X0 oo g S E 0X100 SEXT CODE16RH CODE1 RL E 0X110 ZBA LABEL3 L SP1 BA ZBA LABEL4 L SP2 BA SEXT CODE1 RH CODE1 RL SEXT CODE26RH CODE2 RL ODE3 RL 116 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 7 DISASSEMBLER
317. ified register name is invalid Input address does not exist Attempt is made to clear a break address that has not been set ICE is busy ICE is busy processing a job invalid command This is an invalid command ICE is free run mode ICE is operating in free run mode invalid data pattern The input data pattern is invalid ICE is maintenance mode ICE is placed in maintenance mode invalid file name The file name extension is invalid no map area XXXX No map area is specified for accessing invalid value The input data address or symbol is invalid not defined ID XXXX ICE respond ID is invalid on tracing System is tracing execution data Maximum nesting level 5 is exceeded cannot open file Nesting of the com cmw command exceeds the limit reset time out CPU cannot be reset for more than 1 second MLA address out of range use 0 0xFFF MLA address is invalid target down Peripheral Circuit Board does not operate correctly or remains reset Time Out Flash memory errors flash memory error XXXX Communication time out no such symbol There is no such symbol no symbol information No symbol information is available since the ABS file has not been loaded Number of passes out of range use 0 4095 The specified pass count for sequential break is out of range Writing or erasing flash memory has failed at XXXX
318. ild button Stops the build process being executed K Build tool bar 44 HEX Convert button HEX Invokes the HEX converter Ms Disassemble button tt Invokes the disassembler BYG Debug button Invokes the debugger with the specified ICE parameter file PAR63408 P4R m PARG3408 PAR 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 PARB3B07 PAR Absolute Object Absolute Obiect Output Format pull down list box Selects an executable object file format The build process will generate an executable object in the format selected here Intel Hex Motorola S Window tool bar SS Cascade button Cascades the opened Edit windows m Tile Horizontally button Tiles the opened Edit window horizontally Tile Vertically button Tiles the opened Edit window vertically Controls on Edit window Insert Into project button Inserts the source file being edited into the current opened project BOOT LOOP NMI Goto Label pull down list box Goto Label See Goes to the selected label position Work Bench wb63 3 Development Tools Menus File menu New Ctrl N Creates a new document source header or project Open Ctrl 0 IEW Standard Bar Shows or hides the standard toolb
319. ile gt denotes a space indicates the possibility to omit The order of options and file names can be arbitrary File names Files are identified with their extensions Therefore an appropriate extension should be included in each file name However the extension o of the relocatable object file can be omitted Relocatable object files File name o gt Linker command file ICE parameter file File name cm gt File name par When using a linker command file options relocatable object file names an ICE parameter file name and an output file name can be described in the linker command file If all the items to be specified are entered in a command line the linker command file is not necessary When linking multiple relocatable object files from a command line one or more spaces should be placed between the file names For the output file name specify an absolute object file name abs The file name will be used for other output files If no absolute object file name is specified the same name as that of the relocatable object file to be linked first is used as the output file name The ICE parameter file cannot be omitted A long file name supported in Windows and a path name can be specified When including spaces in the file name enclose the file name with double quotation marks Options The linker comes with the following options d Function Explanation Default Note Function
320. ile name displayed by default can be modified You can use the Ref button to look at other Eeer Si Olders cree EE EE EE Segment Option HEX Do you make hex file Select whether to create a segment option HEX file You need to create one when you use the ICE to debug programs Segment Options HEX file When you create a segment option HEX file specify its file name here The file name displayed by default can be modified You can use the Ref button to look at other folders 5U1C63000A MANUAL EPSON 255 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR EPROM Type This option is not available for S1C63 Family microcomputers User s Name Enter your company name Up to 40 characters can be entered You can use English letters numbers symbols and spaces The content entered here is recorded in the USER S NAME field of the segment option document file Comment Enter a comment Up to 50 characters can be entered in one line You can enter up to 10 lines You can use English letters numbers symbols and spaces Use the Enter key to create a new line All comments should include the following information Place of business your department or section e Address telephone number and facsimile number Other Technical information etc The content entered here is recorded in the COMMENT field of the segment option document file When you have finished entering the above necessary items
321. in a file with a symbol defined converts that symbol to a global symbol which can be referred to from other modules Prior to making refer ence declaration has to be made by this instruction on the side of the file that is going to make the reference 4 7 13 List Control Pseudo Instructions list nolist Instruction format list nolist Function Controls output to the relocatable list file The nolist pseudo instruction stops output to the relocatable list file after it is issued The list pseudo instruction resumes from there the output which was stopped by the nolist pseudo instruction Precaution The assembler delivers relocatable list files only when it is started up with the l option specified Therefore these instructions are invalid if the 1 option was not specified 4 7 14 Source Debugging Information Pseudo Instructions stabs stabn Instruction formats 1 stabs File name gt FileName 2 stabn 0 FileEnd 3 stabn Line numbers Linelnfo Function The assembler outputs object files in IEEE 695 format including source debugging information conforming to these instructions This debugging information is necessary to perform debugging by Debugger db63 with the assembly source displayed Format 1 delivers information on the start position of a file Format 2 delivers information on the end position of a file Format 3 delivers information on the line No of an instruction in a source file
322. ing 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 I 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 lt gt indicates that a specific name should be placed here For example file name 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 SSU1C63000H1 S1C63 Family In Circuit Emulator ii EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CONTENTS Contents CHAPTER EL GENERAL EG Tel E 1 T2 Jool EE 2 1 2 1 Composition Of Package ete teet AS E 2 1 2 2 Outline E 2 13 Working Environment sie aa REN bere ee e ri tere EUROS 3 L4 ANSTO GION oes esc ote iita t D rti i ei pad ttu e
323. inline assemble dd data dump de data enter df data fill dm data move dw data watch od option dump rd register display rs register set Type lt command gt to get usage of the command gt pel pe program enter change program memory usage pe address change program with guidance pe address codel code8 change program with specified code gt GUI utility Help Contents menu item Help button When this menu item or button is selected the Help window opens to show help topics 9 Help button S5U1C63000A MANUAL EPSON 237 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 10 Status Error Warning Messages 1 ICE status messages Status message Content of message Break by PC break Break caused by PC breakpoint Break by data break Break caused by data break condition Break by register break Break caused by register break condition Break by sequential break Break caused by sequential break condition Key Break Break caused by pressing ESC key or Key break button Break by accessing no map program area Break caused by accessing undefined program memory area Break by accessing no map data area Break caused by accessing undefined data memory area Break by accessing ROM area Break caused by writing to data ROM area Out of SP1 area Break caused by accessing outside SP1 stack area Out of SP2 area Break caused by accessing outside SP2 stack area
324. instruction Instruction format word lt Data gt lt Data gt lt Data gt lt Data gt 4 bit data Only decimal binary and hexadecimal numbers can be described The data that can be specified are from 0 to 15 Oxf One or more spaces or tabs are necessary between the instruction and the first data A comma is necessary between one data and another Sample description data word Oxa 0xb Oxc 0xd Function Defines 4 bit data to be written to the data ROM Precaution The word pseudo instruction can be used only in DATA sections S5U1C63000A MANUAL EPSON 79 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 11 Area Securing Pseudo Instructions comm lcomm Instruction format Gomm lt Symbol gt Size comm lt Symbol gt Size Symbol Symbols for data memory access address reference e The 1st character is limited to a z A Z and _ e The 2nd and the subsequent character can use a z A Z 0 9 and _ Uppercase and lowercase are discriminated When assembling with the c option all symbols are case insensitive One or more spaces or tabs are necessary between instruction and symbol Size Number of words of the area to be secured 4 bits word Only decimal binary and hexadecimal numbers can be described The size that can grammatically be specified is from 0 to 65 534 One or more spaces tabs or a comma are necessary between symbo
325. ion Version is incorrect LCD segment data error Illegal segment No Segment No is incorrect LCD segment data error Illegal segment area Display memory address is out of range LCD segment data error Illegal segment Specified output mode is incorrect output specification LCD segment data error Illegal data in this line Data is not hex number or output mode LCD segment data error Data is not enough Segment data is insufficient LCD segment data error Illegal start mark Start mark is incorrect LCD segment data error Illegal end mark End mark is incorrect EPSON International Sales Operations AMERICA ASIA EPSON ELECTRONICS AMERICA INC EPSON CHINA CO LTD HEADQUARTERS 23F Beijing Silver Tower 2 North RD DongSanHuan 150 River Oaks Parkway San Jose CA 95134 U S A Phone 1 408 922 0200 Fax 1 408 922 0238 SALES OFFICES West 1960 E Grand Avenue El Segundo CA 90245 U S A Phone 1 310 955 5300 Fax 1 310 955 5400 Central 101 Virginia Street Suite 290 Crystal Lake IL 60014 U S A Phone 1 815 455 7630 Fax 1 815 455 7633 Northeast 301 Edgewater Place Suite 120 Wakefield MA 01880 U S A Phone 1 781 246 3600 Fax 1 781 246 5443 Southeast 3010 Royal Blvd South Suite 170 Alpharetta GA 30005 U S A Phone 1 877 EEA 0020 Fax 1 770 777 2637 EUROPE EPSON EUROPE ELECTRONICS GmbH HEADQUARTERS Ries
326. ion of global symbols will be an error at the link stage Example File in which global symbol is defined file1 global SYMBOL Global declaration of a symbol which is to be defined in this file SYMBOL LABEL Local symbol Can be referenced to only in this file File in which a global symbol is referenced to file2 global SYMBOL Global declaration of a symbol defined in other source file call SYMBOL Symbol externally referenced to LABEL Local symbol Treated as a different symbol from LABEL of file1 The assembler regards those symbols as those of undefined addresses in the assembling and includes that information in the object file it delivers Those addresses are finally determined by the processing of the linker When a symbol is defined by the comm pseudo instruction that symbol will be a global symbol Therefore in a defined file no global declaration needs to be made using the global pseudo instruc tion On the contrary in a file to be referenced the global declaration is necessary prior to the refer ence Symbol masks Symbol masks are designed to acquire the upper 8 bit address and the lower 8 bit address from a symbol representing a 16 bit address The following 5 types of symbol masks can be used Ol or L Acquires the lower 8 bits of an absolute address h or H Acquires the upper 8 bits of an absolute address rl or RL Acquires the lower 8 bits of a relative address rh
327. ion option data fog 0 to Oxef Segment option data sog 0 to Ox1 fff Melody data mla 0 to Oxfff Format 1 gt od lt type gt lt address1 gt lt address2 gt direct input mode 2 gt odl guidance mode 1 fog 2 sog 3 mla lt type gt Start address lt address1 gt 1 End address lt address2 gt 1 Option data display gt lt type gt Option type fog sog or mla lt address1 gt Start address of specified range hexadecimal lt address2 gt End address of specified range hexadecimal Condition 0 S address lt address2 lt Oxef fog Ox1fff sog or Oxfff mla Examples Format 1 od fog 0 fH Displays function option data within the range of 0 to Oxf 0 12 3 4 5 6 7 8 9 A B C D E F 0000 00 00 00 00 00 00 00 00 000000 00 00 00 00 00 Format 2 gt od lofog 2 80g Simla ass 1d Function option is selected Start address 104 Start address is input End address 1f End address is input D 1 2 3 4 5 6 7 8 9 A B C D E P 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 gt Notes The start and end addresses can be omitted by entering the Enter key only If the start address is omitted data is displayed beginning with address 0 If the end address is omitted data is displayed for up to 16 lines within the range of the option area Data in unused areas is marked by an as it is displayed in the window The maximum number
328. isplay is such that each time you input the Enter key data on older execution cycles is displayed FORWARD This direction can be reversed BACKWARD by entering the B key To return the display direction to FORWARD input the F key If the Trace window is open the direction in which the window is scrolled is also changed S5U1C63000A MANUAL EPSON 217 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER gt td 1004 Started display in FORWARD Data on cycle Nos 110 to 100 is displayed gt b Changed to BACKWARD Data on cycle Nos 99 to 89 is displayed gt Continued display in BACKWARD Data on cycle Nos 88 to 78 is displayed 2f Changed back to FORWARD Data on cycle Nos 99 to 89 is displayed gt Notes Specify the trace cycle No within the range of 0 to 8 191 An error results if this limit is exceeded Error Address out of range use 0 8191 The trace memory receives new data until a break occurs When the trace memory is filled old data is overwritten by new data For reasons of the ICE operation timing the trace data at the boundary of operations such as in the fetch cycle at which trace starts or the execution cycle at which trace ends will not always be stored in memory GUI utility View Trace menu item When this menu item is selected the Trace window opens and displays the latest trace data 218 EPSON S5U1C63000A MANUAL 81C63 FAMILY
329. ite to flash memory 211 efl erase flash memory Erase flash memory 213 Trace tm trace mode Set trace mode 214 td trace data display Display trace information 216 ts trace search Search trace information 219 tf trace file Save trace information into a file 221 Coverage cv coverage Display coverage information 222 cvc coverage clear Clear coverage information 223 Command file com execute command file Load amp execute command file 224 cmw execute command file with wait Load execute command file with execution intervals 225 rec record commands to file Record commands to a command file 226 Log log log Turn log output on or off 227 Map information ma map information Display map information 228 Mode setting md mode Set mode 229 FPGA operation xfer xfers xlinx fpga data erase Erase FPGA 232 xfwr xfwrs xlinx fpga data write Write to FPGA 233 xfcp xfcps xlinx fpga data compare Compare FPGA data and file 234 xdp xdps xlinx fpga data dump Dump FPGA data 235 Quit q quit Quit debugger 236 Help help Display command usage 237 S5U1C63000A MANUAL EPSON 157 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 2 Reference for Each Command The following sections explain all the commands by functions The explanations contain the following items Function Indicates the functions of the command Format Indicates the keyboard input format and parameters required for execution
330. ition file s1c63xxx ini was loaded into your computer during previous execution winmla automatically reads the same file as it starts Alternatively drag the Device information definition file icon into the winmla exe icon to start winmla which will then read the Device information definition file winmla exe Startup by command input You can also start winmla from the MS DOS prompt by entering the command shown below gt winmla s1c63xxx ini J denotes entering the return key You can specify the device information definition file s1c63xxx ini as a command option You can also specify a path When you specify the device information definition file here winmla reads it as it starts This specification can be omitted When winmla starts it displays the MLA window The following diagrams show a MLA window when the device information definition file has been loaded and when it has not MLA Melody Assembler File E TooKD Help H si 2 MLA Window initial screen File Tool D i Heb B 3 2 Root OPTION NO 20 option20 V select1 selecti Selected seiect2 OPT2001 01 No 21 Option2i 2 OPTION NO 21 IZ selecti Option2i select2 selecti Selected OPT2101 01 No 20 option20 MLA Window after reading the device information definition file S5U1C63000A MANUAL EPSON 263 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 1
331. ixth level is encountered the commands in the file specified by that cmw or com command will not be executed but the subsequent execution of the commands in upper level files will be executed continuously Error Maximum nesting level 5 is exceeded cannot open file If the cmw command is written in the command file that you want to be read by the com command all other commands following that command in the file even when a com command is included will be executed at predetermined time intervals Use the hot key CTRL Q to stop executing a command file GUI utility None However the same function as the cmw can be executed using Command File in the Run menu see the com command S5U1C63000A MANUAL EPSON 225 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER rec record commands to a file Function This command records all debug commands following this command to a specified command file Format 1 gt rec file name gt direct input mode 2 rec 1 guidance mode See Examples for guidance lt file name gt Command file name path can also be specified Examples 1 First rec execution after debugger starts up gt rece File name sample cmd 1 append 2 clear and open es P 2 Displayed If the file is already exists gt 2 rec command input in the second and following sessions gt rece Set to record off mode Record function toggles when rec is in
332. k data checker winmdc which will be presented to Seiko Epson as the mask data file From this file Seiko Epson will create the mask patterns for the IC S5U1C63000A MANUAL EPSON 249 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR Segment option HEX file zzzzzzzz ssa This is the Motorola S2 format file necessary to set the selected segment options in the ICE When you debug programs with the ICE download this file into the ICE using debugger db63 commands Segment assignment data file zzzzzzzz sad This is a text format file in which segment assignment data is stored Create this file when terminating winsog before finishing segment assignment You can continue option setting next time by loading this file to winsog 1 The xxx in the file name denotes the model name of a microcomputer For the zzzzzzzz part any given file name can be specified 2 For details on how to download mask options into the ICE refer to Chapter 8 Debugger 10 3 Using winsog 10 3 1 Starting Up Startup from Explorer Double click on the winsog exe icon or select winsog from the start menu V If the device information definition file s1c63xxx ini was loaded into your computer during previous execution winsog automatically reads the same file as it starts Alternatively drag the device information definition file icon into the winsog exe icon to start winsog which will then read the device information definition file If a
333. kBench63 from the program menu File Edi View Insert Build Tools Help ogsaa meae exem ziel g FAR63408 PAR x Absolute Object ell Selz For Help press F1 No document OVR NUM 5U1C63000A MANUAL EPSON 7 S1C63 FAMILY ASSEMBLER PACKAGE 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 al New button The New dialog box appears Cn E New ok EPSON Assembly Source File Lal EPSON Assembly Header File Cancel Help 2 Select EPSON Project File and click OK The Project dialog box appears Project ICE parameter file fesi PARG3A08 PAR CES ancel Location CAS1CB3Vest Bl 4 n 3 Enter a project name select an ICE parameter file and select a WorkBench63 Version X xx directory then click OK File Edit View Insert Build Tools Hel The ICE parameter file box lists the parameter files that exist Dae en GES in the dev63 directory PAR63408 PAR 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 N and other files Created project Project window test files 2
334. ker Both types of sections can be included in one source S5U1C63000A MANUAL EPSON 61 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 6 3 Sample Definition of Sections CODEI Relocatable program data DATA1 Relocatable data definition bss Essi Relocatable RAM area definition code org 0x0 If this specification is omitted a CODE section begins from the address following CODEI CODE2 Absolute program bss org 0x0 If this specification is omitted a BSS section begins from the address following BSS1 BSS2 Absolute RAM area definition code cone Relocatable program data org 0x8000 If this specification is omitted a DATA section begins from the address following DATA1 DATA2 Absolute data definition In the section definition shown above absolute sections and relocatable sections are mixed in one source Absolute sections are sections whose absolute addresses are specified with the org pseudo instructions CODE2 BSS2 and DATA2 are absolute sections Absolute sections will be located at the place specified Other sections are relocatable in the sense that the absolute location addresses are not fixed at the assem bly stage and will be fixed later at the linking stage Precautions When there appears in a section a statement which is designed for other section a warning will be issued and a new section will be started according to the statement Examples code comm B
335. l and size Sample description bss comm RAMO 4 lcomm BUF 1 Function Sets an area of the specified size in the BSS section RAM and other data memory and creates a symbol indicating its top address with the specified name By using this symbol you can describe an instruction to access the RAM Difference between comm and lcomm The comm pseudo instruction and the lcomm pseudo instruction are exactly the same in function but they do differ from each other in the scope of the symbols they create The symbols created by the comm pseudo instruction become global symbols which can be referred to externally from other modules however the file to be referred to needs to be specified by the global pseudo instruction The symbols created by the lcomm pseudo instruction are local symbols which cannot be referred to from other modules Precaution The comm and lcomm pseudo instructions can only be described in BSS sections 80 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 12 Global Declaration Pseudo Instruction global Instruction format global lt Symbol gt lt Symbol gt Symbol to be defined in the current file or symbol already defined in other module One or more spaces or tabs are necessary between the instruction and the symbol Sample description global GENERAL SUB1 Function Makes global declaration of a symbol The declaration made
336. l number or not a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX An error results if the start address is larger than the end address Error end address start address When the contents of the program memory is modified using the pf command the contents of the Source window are updated automatically Although the contents of the unassemble display are modified by rewriting code those of source display remain unchanged GUI utility None 162 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER pm program memory move Function This command copies the content of a specified program memory area to another area Format 1 gt pm lt address1 gt lt address2 gt lt address3 gt direct input mode 2 gt pm t guidance mode Start address lt address1 gt End address lt address2 gt Destination address lt address3 gt 1 gt lt address1 gt Start address of source area to be copied from hexadecimal or symbol IEEE 695 format only lt address2 gt End address of source area to be copied from hexadecimal or symbol IEEE 695 format only lt address3 gt Address of destination area to be copied to hexadecimal or symbol IEEE 695 format only Condition 0 lt address lt address2 lt last program memory address 0 S address3 lt last p
337. le SRL 96A A 02D35D25D1 D00O 1 O lolo B B 0 gt 5D3 gt D2 gt D1 D0 gt 0C m 110 o o K X 0 D3 D2 D1 D0 gt C 00imm8 02D3 D2D1 D0 0O 2 0 o o oX X 0D3 D2 D1 D0 C X X41 2 0 e6 o SY Y 0 gt 5D3 gt D2 gt D1 gt D0 gt 0C FFimm8 02D3 D2D1 D0 0C 2 0 e gt Y Y 05D3 gt D2 gt D1 gt D0 gt 0C Y Y 1 2 0 o o RL 96A A C D3 D2c D1 D0c C 1 0 gt B B C D3 D2 D1 c D0 C 3 110 o eo X X C D3 lt D2 D1 lt D0 lt C 00imm8 C D3 lt D2 lt D1 lt D0 lt C 2 0 ole X X C D3 D2 D1 D0 O X X 1 2 0 SY Y C D3 lt D2 _D1 lt D0 lt C FFimm8 C D3 lt D2 lt D1 lt D0 lt C 2 0 o6 o Y Y C D3 lt D2 D1 lt D0 lt C Y Y 1 2 0 each RR 96A A C gt D3 gt D2 gt D1 D0 gt C 1 10 o eo B B C gt D3 lt D2 lt D1 D0 0C 1 0 gt X X C gt 5D3 gt D2 gt D1 D0 0C 00imm8 C2D3 D2D1 D0 C 2 0 eo o oX X C2D35D25D1 D00C X X 1 2 0 je gt SY Y C gt D3 gt D2 gt D1 D0 gt C FFimm8 C gt D3 gt D2 gt D1 D0 gt C 2 0 gt Y Y C2D32D25D1 D0 6C Y Y 1 2 0 o o 8 16 bit LDB BA XL BA XL 1 0 transfer and BA XH BA XH 1 0 operation BA YL BA YL 1 0 BA YH BA YH 1 0 BA EXT BA EXT 1 0 BA SP1 BA SP1 1 0 BA
338. le name File name gt par A path can also be specified Description File to specify the memory mapping and unsupported instruction information of each 51C63 Family model This file is provided for each model and commonly used with the debugger and HEX converter S5U1C63000A MANUAL EPSON 89 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 2 2 Output Files An output file name can be specified in the command line or command file using the o start up option If no output file name is specified the same name as that of the relocatable object file to be linked first is used Absolute object file File format File name Output destination Description Link map file File format File name Output destination Description Symbol file File format File name Output destination Description Binary file in IEEE 695 format File name gt abs Current directory Object file in executable format that can be input to the debugger All the modules comprising one program are linked together in the file and the absolute addresses that all the codes will map are determined It also contains the necessary debugging information in IEEE 695 format Text file File name gt map Current directory Mapping information file showing from which address of a section each input file was mapped This file is output when the m start up option is specified Text file File name gt sym Current directory Sym
339. ler 63 Ver x xx Copyright C SEIKO EPSON CORP 1998 2001 End message The assembler outputs the following messages to indicate which files have been created when it ends normally Created preprocessed source file lt FILENAME MS gt Created relocatable object file FILENAME O Created relocatable list file FILENAME LST Created error log file lt FILENAME ERR gt Assembly 0 error s 0 warning s Usage output If no file name was specified or the option was not specified correctly the assembler ends after delivering the following message concerning the usage Usage as63 options file name Options d symbol Add preprocess definition e Output error log file ERR g Add source debug information in object sul Output relocatable list file LST ec Ignore character case of symbols o file name Specify output file name File name Source file name S or MS When error warning occurs If an error is produced an error message will appear before the end message shows up Example TEST S 5 Error Illegal syntax Assembly 1 error s 0 warning s In the case of an error the assembler ends without creating an output file If an error occurs at the preprocessing stage in the assembler the assembler stops processing and outputs preprocess level errors only If a warning is issued a warning message will appear before the end mess
340. line line number of The ICE parameter file contains an illegal parameter setting FILE NAME gt Illegal object FILE NAME gt The input file is not an object file in IEEE 695 format Illegal option option An illegal option is specified No address specified with option option Address is not specified with the option No code to locate There is no valid code for mapping No ICE parameter file specified ICE parameter file is not specified No name and address specified with option option Name and address are not specified with the option No object file specified Object files to be linked are not specified Out of memory Cannot secure memory space section kind section lt address gt lt address gt overlaps The address range of the section overlaps with another with section kind section lt address gt lt address gt Section s address range section kind section lt address gt lt address gt overlaps The address range of the section overlaps with the with the unavailable memory unavailable memory Unresolved external label in FILE NAME gt Reference was made to an undefined symbol Unusable instruction code instruction code The object contains an instruction invalid for the model in FILE NAME gt 5 12 2 Warning Even when a warning appears the linker continues with the processing It completes the processing after displaying a warning message unless in addition an error takes place The output files
341. line number The assembler error messages are given below Error message Address out of range Description The specified address is out of range Cannot open file kind file FILE NAME gt The specified file cannot be opened Cannot read file kind file FILE NAME gt The specified file cannot be read Cannot write file kind file FILE NAME gt Data cannot be written to the file Directory path length limit directory path length limit exceeded The path name length has exceeded the limit Division by zero The divisor in the expression is 0 File name length limit file name length limit exceeded The file name length has exceeded the limit Illegal macro label label The internal branch label in macro definition is incorrect Illegal macro parameter parameter The macro parameter is illegal Illegal syntax The statement has a syntax error Line length limit line length limit exceeded The number of characters in one line has exceeded the limit Macro parameter range macro parameter range exceeded The number of macro parameters has exceeded the limit Memory mapping conflict The address is already used Multiple statements on the same line Two or more statements were described on one line Nesting level limit nesting level limit exceeded Nesting of include has exceeded the limit Number of macro l
342. ll be hidden behind the active window Goto Label 1 main s 2 ASH63 test program main routine 3 4 5 5x INITIAL SP1 amp SP2 ADDRESS DEFINITION xxxx 6 7 tifdef SMALL_RAM 8 set SP1_INIT_ADDR 8xb SP1 init addr 6x2c 9 Helse 18 set SP1_INIT_ADDR 8xb SP1 init addr 8x12c 11 ttendif 12 13 set SP2 INIT RDDR 8x1f SP2 init addr Gx1f 14 15 16 xxxxx NMI amp BOOT LOOP rxxxx 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 ATTIE ies 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 MANUAL S1C63 FAMILY ASSEMBLE
343. log output If a command execution result is being output to a log file by the log command the register values are displayed in the Command window even if the Register window is opened and are also output to the log file GUI utility View Register menu item When this menu item is selected the Register window opens or becomes active and displays the current register contents 174 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER lS register set Function This command modifies the register values Format 1 gt rs lt register gt lt value gt lt register gt lt value gt lt register gt lt value gt direct input mode 2 gt rsJ guidance mode PC Old value lt value gt A Old value value B Old value value X Old value value Y Old value lt value gt t FE Old value value F I Old value value FC Old value value J FZ Old value lt value gt SP1 Old value value SP2 Old value value EXT Old value value J Q Old value value register Register name PC A B X Y F SP1 SP2 EXT Q value Value to be set to the register hexadecimal Examples Format 1 gt rs pc 110 f 0J Sets PC to 0x0110 and resets all the flags Format 2 gt rsd PC 116 110 A 0 4 B 0 4 X 0 1004 Y 0 1004 FE Osa FI 0 4 FC 1 04 FZ 1
344. lt Melody main ROM HEX data start mark S1C63xxxyyy MELODY MAIN ROM lt Master slice model name S2149000000 EE S804000000FB ZZZZZZZZ mdc 214000000 EE S804000000FB END lt Melody main ROM HEX data end mark EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE MOPTION S1C63xxx MELODY OPTION DOCUMENT Vx xx FILE NAME Samp3V1 mdc USER S NAME INPUT DATE 2000 12 13 COMMENT OPTION NO jj CHANGE MELODY IN OPERATION MODE CHANGE ff SELECTED OPTjj01 01 OPTkk01 01 EOF NEND NSEGMENT S1C63xxx SEGMENT OPTION DOCUMENT Vx xx FILE NAME ZZZZZZZZ SDC USER S NAME INPUT DATE 2000 9 1 COMMENT OPTION NO mm lt LCD SEGMENT DECODE TABLE gt SEG COMO COM1 COM2 COM3 SPEC 0 000 001 002 003 S 1 020 021 022 023 S nn 760 761 762 763 N EOF NEND CHAPTER 12 MASK DATA CHECKER lt Melody option start mark lt Model name version ZZZZZZZZ mdc lt Melody option end mark lt Segment option start mark lt Model name version ZZZZZZZZ sdc lt Segment option end mark S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE EPSON 289 S1C63 Family Assembler Package Quick Reference Memory Map 1C63000 Core CPU Program Memory Map Data Memory
345. mand window in hexadecimal dump format Table 8 8 3 4 Command to display option data Function Displaying option data Command od S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE EPSON 145 CHAPTER 8 DEBUGGER 8 8 4 Executing Program The debugger can execute the target program successively or execute instructions one step at a time single stepping Successive execution 1 Types of successive execution There are two types of successive execution available Successive execution from the current PC Successive execution from the program start address 0x0110 after resetting the CPU Table 8 8 4 1 Commands menu items tool bar buttons for successive execution Function Command Menu Button Successive execution from current PC g Run Go Run Go to Cursor Successive execution after resetting CPU gr Run Go from Reset GI 2 Stopping successive execution Using the successive execution command g can specify up to two temporary break addresses that are only effective during program execution The temporary break address can also be specified from the Source window one location only If the cursor is placed on an address line in the Source window and the Go to Cursor button clicked the program starts executing from the current PC address and breaks before executing the instruction at the address the cursor is placed Except being stopped by this
346. mands are not case sensitive they can be input in either uppercase or lowercase General command input format gt command parameter parameter parameter e A space is required between a command and parameter A space is required between parameters Use the arrow keys Back Space key or Delete key to correct erroneous input When you press the Enter key after entering a command the system executes that command If the command entered is accompanied by guidance the command is executed when the necessary data is input according to the displayed guidance Input example g l Only a command is input gt com test cmd A command and parameter are input Command input accompanied by guidance For commands that cannot be executed unless a parameter or the commands that modify the existing data are specified a guidance mode is entered when only a command is input In this mode the system brings up a guidance field so input a parameter there Input example EAR File name test abs J Input data according to the guidance underlined part gt Commands requiring parameter input as a precondition The If command shown in the above example reads an absolute object file into the debugger Com mands like this that require an entered parameter as a precondition are not executed until the param eter is input and the Enter key pressed If a command has multiple parameters to be input the system brings up the
347. me lt Selected specification lt Mask data S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE EPSON 279 CHAPTER 11 MELODY ASSEMBLER Example of output file Melody ROM option HEX file S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 S21 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 S21 S8040 140 00000 00010 00020 00030 00040 00050 00060 00070 00080 00090 000A0 000B0 000C0 000D0 000E0 000F0 00100 00110 00120 00130 00140 00150 002F0 00300E A8EEE 00310 00320E 00330EEE 00340E 004F0 00500 00000 000 080 000 00000 00000 00000 00 00 00 000 000 000 00000 00000 00000 00000000000000EB 00000000000000D3 00000000000000CB A39D819489710A3F665FA6480000000070 000 000 000 000 000 000 002 000 000 000 000 000 010 010 010 010 010 000 000 00000 00000 00000 00000 00000 00000 40043 00000 00000 00000 00000 00000 10101 10101 10102 10101 10103 00000 00000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0 000 000 000 000 000 000 000 000 000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000000 000 000 000 000 00000 00000 0101010101 0101010101 0101010101 0101010101 00000 00000
348. me A name defined after a conditional assembly instruction will be regarded as undefined When a name is going to be used only in conditional assembly no substitute character string needs to be specified 70 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER Expansion rule A statement string subjected to the assembling is expanded according to the expansion rule of the other preprocessing pseudo instructions If no preprocessing pseudo instruction is contained the statement will be output in a file as is Precaution Aname specified in the condition is evaluated with discrimination between uppercase and lowercase When assembling with the c option all symbols are case insensitive The condition is deemed to be satisfied only when there is the same Define name defined S5U1C63000A MANUAL EPSON 71 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 6 Section Defining Pseudo Instructions code data bss The section defining pseudo instructions define one related group of codes or data and make it possible to relocate by the groups at the later linking stage Even if these section defining pseudo instructions are not used the section kind will be automatically judged by its contents however a warning occurs If the new codes or data without section definition are different from the previous code or data kind they will be taken as another new section code pseudo instruction
349. me way as in 2 above If the Source window is open the window is redisplayed In this case the same number of lines is displayed in the Command window as displayed in the Source window 4 Successive display If you execute the m command after entering it from the keyboard code can be displayed successively by entering the Enter key only until some other command is executed When you press the Enter key the Source window is scrolled forward one screen When displaying code in the Command window 16 lines of code following the previously displayed address are displayed the same number of lines as displayed in the Source window if the m com mand is executed during log output Notes Source codes can be displayed only when an absolute object file that contains source debug informa tion has been loaded The display start address you specified must be within the range of the program memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or not a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX GUI utility View Program Mix Mode menu item Mix button When this menu item or button is selected the Source window opens or activates and displays the program from the current PC address Mix button S5U1C63000A MANUAL EPSON 205
350. melody S5U1C63000A MANUAL EPSON 273 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 3 Control data In the control data field the jump destinations main data numbers from the main data in which the jump bit is set are described here The control data should be described after the main data field The following shows the control data corresponding to the main data no cntl note pitch jump tempo MAIN mO test 0 7 G5 00 1 6 F5 0 0 2 5 D5 0 0 3 4 RR 10 4 3 E 0 1 5 2 E 0 1 6 LBS 01 TESS Q 1 8 3 0 RR 11 END CONTROL mO 0 lt l gt lt 4 gt 0 lt 5 gt lt 8 gt END 4 Option data Options can be selected in the option list area of the MLA window Refer to the Technical Manual for details of the melody options 11 4 5 Precautions lt l gt 5 2 6 3 TI 4 8 9 10 11 12 13 Start mark of control data It cannot be omitted Melody number m0 m15 Indicates that the mO begins from the melody data No 0 lt Data flow Indicates that the music flow jumps from the melody data No 3 lt 4 gt to the melody data No 0 4 lt 9 gt lt 13 gt Indicates that the second play jumps from the melody data No 3 8 to the melody data No 4 End mark It cannot be omitted Create scores before inputting melody data because the melody data No may change later when inserting data in the main data The data fields can
351. ment Ctrl S Saves the document Ctrl P Print the active document Ctrl Shift F12 Print the active document Ctrl Z Undees the last action Alt BackSpace Undees the last action Ctrl X Cuts the selection and puts it on the clipboard Shift Delete Cuts the selection and puts it on the clipboard Ctrl C Copies the selection to the clipboard Ctrl Insert Copies the selection to the clipboard Ctrl V Inserts the clipboard contents at the insertion point Shift Insert Inserts the clipboard contents at the insertion point Ctrl A Selects the entire document Ctrl F Finds the specified text F3 Finds next Shift F3 Finds previous Ctrl H Replaces the specified text with different text Ctrl G Moves to the specified location Ctrl F7 Assembles the file F7 Builds the project Ctrl Break Stops the build F5 Debugs the project Alt F7 Edits the project build and debug settings Ctrl Tab Next MDI Window Short cut key Opens the popup menu Shift F10 Opens the popup menu Error Messages lt filename gt is changed by another editor Reopen this file The currently opened file is modified by another editor Cannot create file lt filename gt The file linker command file debugger command file etc cannot be created Cannot find file lt filename gt The source file cannot be found Cannot find ICE parameter file The ICE parameter file cannot be found Cannot open file lt fil
352. ment assignment data file S1C63xxx SEGMENT OPTION DOCUMENT Vx xx FILE NAME ZZZZZZZZ SAD USER S NAME INPUT DATE yyyy mm dd COMMENT OPTION NO xx lt LCD SEGMENT DECODE TABLE gt SEG COMO COM1 COM2 COM3 SPEC 0 163 162 161 1F3 S 1 170 172 171 160 S 2 143 142 141 161 S mm FRE FRE FRE FRE X nn FRE FRE FRE FRE X oo FRE FRE FRE FRE X EOF lt Version lt File name specified by Setup lt User name specified by Setup Date of creation specified by Setup lt Comment specified by Setup lt Option number varies with type of microcomputer lt Segment decode table lt End mark lt Version lt File name specified by Setup lt User name specified by Setup lt Date of creation specified by Setup lt Comment specified by Setup lt Option number varies with type of microcomputer lt Segment data has been assigned lt FRE Segment address and data bit have not been assigned lt X Output specification has not been set lt End mark Example of a segment option HEX file Motorola S2 format S2240000001603160216011F03FFFFFFFFFFFFFFFF1700170217011600FFFFFFFFFFFFFFFF23 S2240000201403140214011E01FFFFFFFFFFFFFFFF1500150215011400FFFFFFFFFFFFFFFF14 S2240000400103120212011D03FFFFFFFFFFFFFFFF12031F0013021F01FFFFFFFFFFFFFFFFF7 S2240000600303130013011200FFFFFFFFFFFFFFFF1003100210011E02FFFFFFFFFFFFFFFFF6 S2240010E0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
353. menu HelptH Version VersiontA Displays the version of winsog The Help button has the same func tion Q Help button The dialog box shown below appears Click OK to close this dialog box ul Winsog Ver x xx Copyright C SEIKO EPSON CORP 2001 S5U1C63000A MANUAL EPSON 253 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR 10 3 4 Option Selection Buttons The following buttons are available in the option setup area OUTPUT Option buttons These buttons select SEG pin output modes These buttons are enabled when you click a SPEC cell in SEGMENT DECODE TABLE Seg Selects LCD segment output Comp Selects DC complementary output D Pch Selects DC Pch open drain output Neh Selects DC Nch open drain output Selects segment common shared output HD Delete button Delete Clears one selected segment assignment i 10 3 5 Operation Procedure The following shows the basic operation procedure 1 Loading the device information definition file First select a device information definition file s1c63xxx ini and load it Select Device INI Select from the Tool menu or click the Device INI Select button amp Device INI Select button The dialog box shown below appears Enter a file name including the path in the text box or select a file by clicking the Ref button Device INI file Select Click OK and the file is loaded If the INI file ini a
354. menu or clicking the Generate button this area displays a message showing the result of the selected operation 252 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR 10 3 3 Menus and Toolbar Buttons This section explains each menu item and toolbar button File menu File E Open Open O Opens a segment option document file Use this menu command when correcting an existing file The Open button has the same function g Open button Record Save Saves the current option settings to a file segment assignment data file The Save button has the same function HI Save button Record Load Loads a segment assignment data file The Load button has the same function E Load button Terminates winsog Load D Tool menu Tool Generate Generate G Creates a file according to the contents of segment options set The Generate button has the same function Setup S Device INI Select x Generate puttan Setup Sets the date of creation or output file name or a comment included in the segment option document file The Setup button has the same function Setup button Device INI Select Loads the device information definition file s1c63xxx ini The Device INI Select button has the same function This file must be loaded first before performing any operation with winsog amp Device INI Select button Help
355. mm 89ABCDEF 01234567 mmmmmmmm mmrmmmmmm mmmmmmmm mmrmmmmrmm 8 9ABCDEF 8 9ABCDEF mmmmmmmm mrmmrmmmrmm mmmmmrmmrnm mmmmmrmmrnm mmmmmrmmrnm mmmmmmmm mmmrmmmmm mmmmmmmm mmmmmmmm mmmmmrmmrnm mmmmmrmmrnm mmmmmrmmrnm mmmmmrmrmm mmmmmmmm mmmmmmmm mrmmrmrmrmrm m m m m In In Imm m m m m rm When displaying the map information of the I O and LCD areas the mapped addresses are marked by the letter m GUI utility None 228 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 19 Mode Setting md mode Function This command sets the debugger modes described below 1 Displaying on the fly information You can choose the display interval of the on the fly information from 0 to 5 times per second When 0 is chosen the on the fly information will not be displayed Measurement mode for the execution cycle counter This mode can be selected from the actual execution time measurement mode indicated in microseconds or the bus cycle mode indicated in terms of the number of cycles executed Interrupt mode for step execution You can choose to enable or disable interrupts during single stepping Single step display mode You can choose to display the execution results of each step or only the last step during single step operation The register values are updated when their contents are displayed in the Register window they are displayed in t
356. mmediately after the debugger starts up specify a command file that describes those commands Specifies a communication port This option specifies the communication port through which a personal com puter is communicated with by the ICE Specify a port number in the X part of this option The port that can be used for this purpose varies among different personal computers Unless this option is specified the com1 port is used to communicate with the ICE Specifies a communication transmission rate This option specifies the baud rate on the personal computer For baud rate gt select one from 2400 4800 9600 19200 or 38400 Unless specified otherwise the baud rate is set to 9600 bps This value is the same as the initial setting of the ICE The baud rate on the ICE is set using the DIP switch mounted on the ICE When entering an option in a command line make sure that there is at least one space before and after the option Example c epson slc63 bin db63 par63xxx par startup cmd com2 b 19200 The default start up options are set as com1 amp b 9600 If no parameter file name was specified or the option was not specified correctly the debugger ends after delivering the following message concerning the usage Usage db63 exe parameter file name startup options Options command file comX X 1 4 b Specifies a command file com port default coml baud rate 2400 4800 9600 default 1920
357. mory in a 16 words line hexadecimal dump format Format gt dd lt address1 gt lt address2 gt direct input mode lt address1 gt Start address to display hexadecimal or symbol IEEE 695 format only lt address2 gt End address to display hexadecimal or symbol IEEE 695 format only Condition 0 lt address lt address2 lt Oxffff Display 1 When data window is opened If both lt address1 gt and lt address2 gt are not defined Jo1234567 89A BCDEFA2 the Data window is redisplayed beginning with 0083 8082 601628 address 0x0000 ee 3X X 3X 3X X X ee He X 3X X X X S BFF OFF x x XH KK KX If lt address1 gt is defined or even lt address2 gt is 8FFOFOF GFxx xx x x defined the Data window is redisplayed in such a BFF BFF F F OF F P FFxxxx X3 ku way that lt address1 gt is displayed at the uppermost hDx xx x 20606 line 6606 xxx 666 6 6 Bx H EFFFFFEE EFFEFFEF Even when lt address1 gt specifies somewhere in 16 FFFFFFFF FFFFFFFF addresses line data is displayed beginning with J the top of that line For example even though you ee may have specified address Oxff08 for lt address1 gt data is displayed beginning with address Oxff00 However if an address near the uppermost part of data memory e g maximum address is Oxffff such as Oxffc0 is specified as lt address1 gt the last line displayed in the window in this case is Oxfff0 the specified addre
358. n lt File name specified by Setup lt User name specified by Setup lt Date of creation specified by Setup lt Comment specified by Setup lt Option number lt Option name lt Selected specification lt Mask data lt End mark Example of a function option HEX file Motorola S2 format 22400000022FF0200FFFFFFFFFFFFFFFFFFFFFFFF00000000000000FFFFFFFFFFFFFFFFFFCD S804000000FB For details about the Motorola S2 format refer to Section 6 5 2 Motorola S format 248 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR CHAPTER 10 SEGMENT OPTION GENERATOR 10 1 Outline of Segment Option Generator winsog Some types of microcomputers in the S1C63 Family allow the LCD output pin output specifications and LCD output pin assignments to be set with hardware options so that mask patterns for the IC are generated according to option settings The Segment Option Generator winsog is the software tool for creating the files required to generate mask patterns Its graphical user interface GUI ensures simple mask option setting In addition simultaneously with this file winsog can create mask option setup files Motorola S2 format data that are required when debugging programs with the ICE When using the ICE to debug a program you can download this file from the host computer making it possible to realize optional functions on the ICE that are equivalent to those
359. n clears all the set breakpoints i Break button When this button is clicked after placing the cursor to a line in the Source window the address at the cursor position is set as a breakpoint If the address has been set as a breakpoint this button clears the breakpoint M Break button The set breakpoints are marked with a at the beginning of the address lines in the Source window Unassemble ba 4b ldb ba SP1 INIT ADDR ldb sp1 ba ldb sp1 ba ldb ba 1f ldb ba SP2 INIT ADDR ldb sp2 ba ldb sp2 ba ldb ext fe ldb ext fe calr ea calr INIT_RAM_BLK1 ldb ext fe ldb ext fe calr ef calr INC_RAM_BLK1 D jr fd jr Loop vw a gt S5U1C63000A MANUAL EPSON 185 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER bc bpc break point clear Function This command clears the specified breakpoints that have been set Format gt be lt break1 gt lt break16 gt lt break1 16 gt Break address hexadecimal or symbol IEEE 695 format only Examples Sms gt bpa 1 0116 2 0200 3 0260 1 set 2 clear gt be 200 1 gt bp 1 0116 2 0260 1 set 2 clear gt bcJ gt bp No PC break is set 1 set 2 clear gt Notes 34 clear all clear all clear all direct input mode Breakpoints that have been set a Clears breakpoints at address 0x0200 4 Clears all breakpoints The bc and bpc commands have the same functions
360. nction This command quits the debugger Format gt q direct input mode GUI utility File Exit menu item Selecting this menu item terminates the debugger 236 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 22 Help help Function This command displays the input format of each command Format 1 direct input mode 2 lt n gt direct input mode 3 lt command gt direct input mode lt n gt Command group number decimal lt command gt Command name Condition 1S lt ns6 Examples When you input the command in Format 1 or 2 the system displays a list of commands classified by function Use the command in Format 3 if you want to display the input format of each individual command gt group 1 program data amp register pe pf pm a as dd de df dm dw od rd rs group 2 execution amp break g gr s n rst bp bc bpc bd bdc br brc bs bsc bsp bl bac group 3 source amp symbol u sc m sy group 4 file amp flash rom lf lo lfl sfl efl xfer xfers xfwr xfwrs xfcp xfcps xdp xdps group 5 trace amp coverage tm td ts tf cv cvc group 6 bere sesso cades ade xe ues com cmw rec log ma md q Type lt group gt to show group or type lt command gt to get usage of the command gt 14 group 1 program data amp register pe program enter pf program fill pm program move a as
361. nd option document file to create a mask data file for presentation to Seiko Epson e Unpack button 4 Restores files in the original format from a packed file Device INI Select button E gt Loads the device information definition file s1c63xxx ini Help button 9 Displays the version of winmdc Menus File menu End FiletF Terminates winmdc Endi Tool menu Pack Tool D Packs the ROM data file and option document file to create a mask data file for presentation to Seiko Epson Pack p Unpack Unpack U Restores files in the original format from a packed file Device INI Select Device INI Select Loads the device information definition file s1c63xxx ini Version Displays the version of winmdc Help menu Help H Versiont I O Error Messages File name error Number of characters in the file name or extension exceeds the limit Illegal character Prohibited characters have been entered Please input file name File name has not been entered INI file is not found Specified device information definition file ini does not exist INI file does not include MDC information Specified device information definition file ini does not contain MDC information Can t open file XXXX File xxxx cannot be opened Can t write file xxxx ROM Data Error Messages Hex data error Not S record File xxxx cannot be written Data d
362. ne that begins with a and then the Break button cancels the breakpoint you have set in which case the address is deleted from the breakpoint list The temporary break addresses that can be specified by the successive execution commands g do not affect the set addresses in the breakpoint list 2 Data break This break function allows a break to be executed when a location in the specified data memory area is accessed In addition to specifying a memory area in which to watch accesses specification as to whether the break is to be caused by a read or write as well as specification of the content of the data read or written The read write condition can be masked so that a break will be generated for whichever operation read or write is attempted Similarly the data condition can also be masked in bit units A break occurs after completing the cycle in which an operation to satisfy the above speci fied condition is performed Table 8 8 5 2 Commands menu item to set data break Function Command Menu Set data break condition bd Break Data Break Clear data break condition bdc Break Data Break For example if the program is executed after setting the data break condition as Address 0x10 Data pattern mask and R W W the program breaks after writing any data to the data memory address 0x10 S5U1C63000A MANUAL EPSON 149 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 3 Regis
363. ng the linker ends after creating an output file but the result cannot be guaran teed For details on errors and warnings refer to Section 5 12 Error Warning Messages 94 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 5 Linker Command File To simplify the keystroke in the command line at the time of start up execute the link processing through the linker by inputting a linker command file cm that holds the necessary specifications any options and file names described Sample linker command file e Generate error file g Add debug information code 0x0100 Fix CODE section start address rcode test2 0 0x0110 Fix CODE section start position of test2 o data 0x8000 Fix DATA section start address bss 0x00e0 Fix BSS section start address defsym IO OxFFO00 Set global symbol o test abs Specify output file name testl o Specify input file 1 test2 o Specify input file 2 Create the linker command file with the following rules File format The linker command file is a general text format as shown above cm should be used for the file name extension Option description All options should begin with a hyphen Each individual option needs to be delineated with more than one space tab or line feed For better visibility it is recommended to describe each option in a separate line Notes A numeric value to specify an address should be de
364. ng from program memory address 0x0100 The previously set display mode Unassemble Source or Mix is used S5U1C63000A MANUAL EPSON S1C63 FAMILY ASSEMBLER PACKAGE 123 CHAPTER 8 DEBUGGER 8 4 Windows This section describes the types of windows used by the debugger 8 4 1 Basic Structure of Window The diagram below shows the window structure of the debugger Source window Trace window Register window i Db63 Data BEE File Run Break Trace View Option Window Help 9 se nana m Mix ml xl E nl x Search Labet 3 PO Lm 5 Add Code Sourc a B DN c 23 8808 6a64 ldb x1 4 x1 RAM_BLK1 1 x 0007 8 24 8889 1911 add x 1 x 1 Y AAAA 25 888a 1998 adc x 8 x 8 EICZ 1881 26 666b 1996 adc x 8 x 8 SP1 4A 27 666c SP2 1F 28 666d ENT 66 29 fetch flag data QUEUE 6118 38 disasm EIC2 addr data SP in 88808090CF8 cycle EM 6087 AAAA 0808 6606 rF 6666 AAAA 32 1988 adc x 6x60 8887 ANAA GOOG 8886 wF 0905 1DF8 HM AAAA 8887 AAAA 8661 0007 r8 6888 6667 AAAA 8881 8887 wh 4 r B 1 1 1 4 1 1 8887 AAAA 0001 egen 1 1 1 1 1 1 Program area Data ram area 88FD jr xfd 88FE ldb ext Oxfe B2bEF calr 8xef 8888 ldb ext 6x66 0887 anna 0001 LILES 6667 AAAA 1801 8887 AAAA 88801 mmmmmmmmmmmmam 15234 5 5 B SUA B C DUE AAAITDF BB AAAAAAAA Da
365. ng symbol list All symbols used in the program and the defined addresses can be displayed in the Command window Table 8 8 2 2 Command to display symbol list Function Command Displaying symbol list sy S5U1C63000A MANUAL EPSON 143 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 8 3 Displaying and Modifying Program Data Option Data and Register The debugger has functions to operate on the program memory data memory and registers as well as option data Each memory area is set to the debugger according to the map information that is given in a parameter file Operating on program memory area The following operations can be performed on the program memory area Table 8 8 3 1 Commands to operate on program memory Function Command Entering modifying program code pe In line assemble a as Rewriting specified area pf Copying specified area pm 1 Entering modifying program code The program code at a specified address is modified by entering hexadecimal data 2 In line assemble The program code at a specified address is modified by entering a mnemonic code 3 Rewriting specified area An entire specified area is rewritten with specified code 4 Copying specified area The content of a specified area is copied to another area Operating on data memory area The following operations can be performed on the data memory areas RAM data ROM display memory I O memory
366. ning the priority among the preprocessing pseudo instructions will be given below 1 The conditional assembly instructions ifdef ifndef have the first priority Nesting cannot be made of those instructions 2 Define instruction define include instruction include or macro instruction macro can be described within a conditional assembly instruction 3 Define instruction define include instruction include and macro instruction macro cannot be described within a macro definition 4 Define name definitions are expanded with priority over macro definitions 82 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 8 Relocatable List File The relocatable list file is an assembly source file that carries assembled results offset addresses and object codes added to the first half of each line It is delivered only when the start up option 1 is specified Its file format is a text file and the file name File name gt lst The File name gt is the same as that of the input source file The format of each line of the assembly list file is as follows Line No Address Code Source statement Example Assembler 63 ver x xx Relocatable List File MAIN LST Mon Jan 15 12 40 41 2001 Ts main s 2 AS63 test program main routine 3 i 25 26 org 0x110 27 BOOT 28 0110 0900 ldb ba SPl INIT ADDR 29 0111 lfc4 ldb spl ba set SP1 30 0112 0900 ldb ba SP2 INIT
367. nition file ini Can t open File xxxx File xxxx cannot be opened when executing Generate Message Making file s is not completed Can t write File xxxx File xxxx cannot be written when executing Generate Message Making file s is not completed ERROR SPEC is not set One or more SPEC cells are left blank when executing Generate Message Making file s is not completed ERROR SEGMENT DECODE TABLE is Selected memory address data bit has not been assigned to SEG COM Message not set terminal cells when executing Generate Making file s is not completed Table 10 4 2 winsog Warning Messages Message Description Display Are you file update Overwrite confirmation message Dialog xxxx is already exist Specified file already exists 260 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE 10 5 Example Output Files CHAPTER 10 SEGMENT OPTION GENERATOR Note The display memory addresses the number of SEG COM pins and output specification vary with each type of microcomputer Example of a segment option document file S1C63xxx SEGMENT OPTION DOCUMENT Vx xx FILE NAME ZZZZZZZZ SDC USER S NAME SEIKO EPSON CORPORATION INPUT DATE yyyy mm dd COMMENT SAMPLE DATA OPTION NO xx lt LCD SEGMENT DECODE TABLE gt SEG COMO COM1 COM2 COM3 SPEC 0 163 162 161 1F3 S 1 170 172 171 160 S 2 143 142 141 161 S 3 150 152 151 140 S xx 3B0 3B1 3B2 3B3 S EOF Example of a seg
368. nition file the option list is placed in its default selection state For details about option specifications refer to the Technical Manual available for each type of microcomputer 3 Setup and creating files Select Generate from the Tool menu or click the Generate button to bring up the Generate dialog box From this dialog box Date zooo 4 fz TA Melody Data r Melody Data file Input C S1C63 EV63 DEVE3 MIN mdt Ref select items and enter data Select reference frequency E SE el Generate button C 64kHz C 32 768kHz Date Displays the current date Change it as necessary Melody ROM Option Document file Output zzzzzzzz mdc Ref p Melody ROM Option HEX rDo you make hex file Yes C No Melody ROM Option HEX file Output Melody Data file ZZZZZZZZ msa Ref CEPRGH Type Specify the melody data file to be assembled EE You can use the Ref button to look at other User s mne o folders This setting is unnecessary when creating a HEX file from an existing melody ROM option document file Comment Select reference frequency Select the reference frequency OSC1 oscillation frequency 266 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER Melody ROM Option Document file Specify the melody ROM option document file name you want to create
369. nk 8 error s 8 varning s Build Done For Help press F1 Ln27 Co 19 CAP NUM Project 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 win dow 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 instructions Black Preprocess 4 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 MANUAL S1C63 FAMILY ASSEMBLER PACKAGE Output window CHAPTER 3 WORK BENCH 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 c
370. nload this file into the ICE using debugger commands 1 The xxx in the file name denotes the model name of a microcomputer For the zzzzzzzz part any given file name can be specified 2 For details on how to download mask options into the ICE refer to Chapter 8 Debugger 240 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 9 FUNCTION OPTION GENERATOR 9 3 Using winfog 9 3 1 Starting Up Startup from Explorer Double click on the winfog exe icon or select winfog from the start menu If the device information definition file s1c63xxx ini was loaded into your computer during previous execution winfog automatically reads the same file as it starts Alternatively drag the Device information definition file icon into the winfog exe icon to start winfog which will then read the Device information definition file Startup by command input You can also start winfog from the MS DOS prompt by entering the command shown below gt winfog s1c63xxx ini I denotes entering the return key You can specify the device information definition file s1c63xxx ini as a command option You can also specify a path When you specify the device information definition file here winfog reads it as it starts This specification can be omitted When winfog starts it displays the FOG window The following diagrams show a FOG window when the device information definition file has been loaded and when it ha
371. nly the command will be canceled However if more than one pair of addresses is specified after selecting the address area trace mode one pair of addresses is specified in the above example the range of specified addresses will be set as the trace area Notes The trigger addresses set here are marked by the letter T at the beginning of the address lines displayed in the Source window The address you specified must be within the range of the program memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or not a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX GUI utility Trace Trace Mode Set menu item When this menu item is selected a dialog box appears allowing selection of a trace mode Trace Mode Set Select a trace mode using the radio button Enter addresses and or select an option and then clock OK Normal trace mode Address area trace mode 5U1C63000A MANUAL EPSON 215 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER td trace data display Function This command displays the trace information that has been sampled into the ICE trace memory Format 1 gt td lt cycle gt direct input mode 2 gt tdi guidance mode Start point ENTER from the latest lt num gt Trace data is display
372. ntents are updated at only the last step in a specified number of steps The display of the Source and Data windows are updated after the specified number of step executions are completed 3 HALT and SLEEP states and interrupts The CPU is placed in a standby mode when the halt or slp instruction is executed An interrupt is required to cancel this mode The debugger has a mode to enable or disable an external interrupt for use in single step operation Table 8 8 4 3 External interrupt modes Enable mode Disable mode External interrupt Interrupt is processed Interrupt is not processed halt and slp instructions Executed as the halt instruction The halt and slp instructions are Processing is continued by an replaced with a nop instruction as external interrupt or clicking on the instruction is executed the Key Break button In the initial settings the debugger is set to the interrupt disable mode The interrupt enable mode can also be set by using the md command S5U1C63000A MANUAL EPSON 147 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Measuring execution cycles execution time 1 Execution cycle counter and measurement mode The ICE contains a 31 bit execution cycle counter allowing you to measure the program execution time or the number of bus cycles executed The measurement mode time or bus cycle can be selected using the md command In the initial debugger settings the bus cycle mode is
373. nter a new name or address Symbol Addr TEST 0x0000 lt Double click to modify To delete a symbol highlight the symbol line by clicking and then click the Delete button Other option selections Disable all branch optimization check box Select this option if extension code insertions deletions and corrections are not necessary Disable insertion of branch extension check box Select this option if extension code insersions are not necessary Output Error log file check box Select this option to generate the error log file of the linker Disable removal branch optimization check box Select this option if extension code deletions are not necessary Add source debug information check box Select this option to add the debugging information If this option is not specified the sources cannot be displayed in debugging Output absolute list file check box Select this option to generate the absolute list file Output Map file check box Select this option to generate the link map file Output Symbol file check box Select this option to generate the symbol file Output cross reference file check box Select this option to generate the cross reference file Refer to Chapter 5 Linker for details of the linker options 42 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH 3 9 3 Debugger Options COM Port list box Select a COM port of the personal computer used to comm
374. ntered Can t open File xxxx File xxxx cannot be opened INI file is not found Specified device information definition file ini does not exist INI file does not include SOG information Specified device information definition file ini does not contain segment option information Function Option document file is not found Specified function option document file does not exist Function Option document file does not match INI file Contents of the specified function option document file do not match device information definition file ini Segment Option document file is not found Specified segment option document file does not exist Segment Option document file does not match INI file Contents of the specified segment option document file do not match device information definition file ini Segment assignment data file is not found Specified segment assignment data file does not exist Segment assignment data file does not match INI file Contents of the specified segment assignment data file do not match device information definition file ini Can t open File xxxx Making file s is not completed File xxxx cannot be opened when executing Generate Can t write File xxxx Making file s is not completed File xxxx cannot be written when executing Generate ERROR SPEC is not set Making file s is not completed One or more SPEC cells are l
375. o that execution time is added up until the CPU is reset If this mode is changed to reset mode by the md command the execution cycle counter is cleared to 0 each time the g command is executed The counter is also reset simultaneously when execution is restarted by hitting the Enter key Notes f a break condition is met program execution is suspended and the PC will be set to the program address at the breakpoint The address you specified must be within the range of the program memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX GUI utility Run Go menu item Go button When this menu item or button is selected the g command without temporary break is executed w Go button Run Go to Cursor menu item Go to Cursor button When this menu item or button is selected after placing the cursor to the temporary break address line in the Source window the g command with a temporary break is executed The program execution will be suspended after executing the address at the cursor position Go to Cursor button 178 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER QI go after reset CPU Function This command executes the target program
376. oes not begin with S Hex data error Data is not sequential Data is not listed in ascending order Hex data error Illegal data Invalid character is included Hex data error Too many data in one line Too many data entries exist in one line Hex data error Check sum error Checksum does not match Hex data error ROM capacity over Data is large Greater than ROM size Hex data error Not enough the ROM data Data is small Smaller than ROM size Hex data error Illegal start mark Start mark is incorrect Hex data error Illegal end mark End mark is incorrect Hex data error Illegal comment Model name shown at the beginning of data is incorrect Function Option Data Error Messages Option data error Illegal model name Model name is incorrect Option data error Illegal version Version is incorrect Option data error Illegal option number Option No is incorrect Option data error Illegal select number Selected option number is incorrect Option data error Mask data is not enough Mask data is insufficient Option data error Illegal start mark Start mark is incorrect Option data error Illegal end mark End mark is incorrect Segment Option Data Error Messages LCD segment data error Illegal model name Model name is incorrect LCD segment data error Illegal vers
377. of lines that can be displayed at once is 16 fog data is limited to 15 lines Even if you specify the end address in an attempt to display more than 16 lines the system will only display data for 16 lines and then stand by waiting for a command input As with the dd command this command allows you to display data for the following addresses by entering the Enter key only The maximam number of lines is 16 172 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Both the start and end addresses must be specified within the setup range of each option An error results if this limit is exceeded Error FO address out of range use 0 0xEF Specified address for the function option is outside the range Error SO address out of range use 0 0x1FFF Specified address for the segment option is outside the range Error MLA address out of range use 0 0xFFF Specified address for the melody data is outside the range An error results if the start address is larger than the end address Error end address start address The default value of option data is 0 GUI utility None S5U1C63000A MANUAL EPSON 173 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 6 Register Operation rd register display Function This command displays the contents of the registers execution cycle counter and watch data Format gt rd_ direct input mode Display
378. ogram area 82EF calr 8xef F 1 8887 AAAA 1881 1234567 89ABC Data ram area 0888 ldb Zext 0x08 F 1 0007 AAAA 6881 AAAIDFO AAAAAAAA Data window Data rom area 8005 ldb x1 6x64 F 1 8887 AAAA 1661 AAAAAAAA AAAAA THe ho LCD area 1911 add x 8x81 F 1 6664 AAAA 8081 AAAAAAAA AAAAAAAA EREECHEN External memori F 1 6665 AAAA 0008 AA AAAAAA AAAAAAAA AA AAAAAA AAAAAAAA of FO are AAAAAAAA AAAAAAAA of S01 area AAAAAAAA AAAAAAAA M of S02 area 256 AAAAAAAA AAAAAAAA Command window Or MA area 1296 ee ee ena EN Used to enter debug commands and display the execution results AA AAAAAA AAAAAAAA G H Z Ready NUM Debugger db63 2 Development Tools Buttons Tool bar i d migmewo rie E o E TS 4 Controls on Source window EI Key Break button Forcibly breaks execution of the target program Load File button Reads an object file in the IEEE 695 format into the debugger Load Option button Reads a program or optional HEX file in Motorola S format into the debugger Source button Switches the display of the Source window to the source mode Unassemble button Switches the display of the Source window to the unassemble mode Mix button Switches the display of the Source window to the mix mode Go button Executes the target program from the address indicated by the current PC Go to Cursor button Executes the target program from the address indicated by the curren
379. ollowing errors is encountered during program execution 1 Access to undefined program area A break occurs when an undefined area of the program memory map is accessed 2 Access to undefined data area A break occurs when an undefined area of the data memory map is accessed 3 Write to data ROM area A break occurs when a write to the data ROM area is attempted Notes If the return address is popped from the stack by a ret or reti instruction in an area with prohib ited 16 bit access invalid data is read out from a 16 bit data bus that does not have any memory connected In the ICE because the bus is pulled up Oxffff is read out causing control to return to that address This could result in generating a map break A break caused by an undefined program area access occurs before execution of such opera tion On the other hand a map break caused by access to an undefined data area or a write to the data ROM area occurs one or two instructions after execution of such operation n user breaks based on command settings also a PC break and sequential break occur before execution of operation However other breaks such as a data break register break and stack break occur one or two instructions after execution of operation S5U1C63000A MANUAL EPSON 151 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 8 6 Trace Functions The debugger has a function to trace program execution Trace memory and trace informati
380. ollowing keyboard inputs have special meaning g Command is terminated finish inputting and start execution AJ Return to previous address vel Input is skipped keep current value If the maximum address of program memory is reached and gets a valid input other than N the command is terminated When the contents of the program memory are modified using the a as command the unassemble contents of the Source window are updated immediately Although the contents of the unassemble display are modified by rewriting code those of source display remain unchanged GUI utility None 160 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER pe program memory enter Function This command rewrites the contents of the specified address in the program memory with the input hexadecimal code Format 1 gt pe address lt code1 gt lt code2 gt lt code8 gt direct input mode 2 pe lt address gt guidance mode Program enter address lt address gt Displayed only when address is omitted Address Original code lt code gt gt lt address gt Start address from which to write code hexadecimal or symbol IEEE 695 format only code 1 8 Write code hexadecimal valid operation code of S1C63000 Condition 0 lt address lt last program memory address 0 lt input code lt Ox 1 fff Examples Format 1 pe 200 1972 R
381. oloring function of the work bench does not support labels that have not ended with a colon 3 The work bench can create a make linker command and debugger command files note however that these files or settings created with another editor cannot be input into the work bench 46 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER CHAPTER 4 ASSEMBLER This chapter describes the functions of the assembler as63 and grammar involved with the creation of assembly source files 4 1 Functions The assembler as63 is a tool that constitutes the core of this software package It assembles translates assembly source files and creates object files in the machine language The functions and features of the assembler are summarized below e Allows absolute and relocatable sections mixed in one source Allows to develop programs in multiple sources by creating relocatable object files that can be com bined by the linker Can add source debugging information for source debugging on the debugger Upper compatible with the old S1C63 preprocessor and assembler The assembler provides the following additional functions as well as the basic assembly functions Macro definition and macro invocation Definition of Define name Operators Insertion of other file Conditional assembly The assembler processes source files in two stages preprocessing stage and assembling stage The preprocessing
382. on The ICE contains a trace memory When the program executes instructions in the trace range according to the trace mode the trace information on each cycle is taken into this memory The trace memory has the capacity to store information for 8 192 cycles making it possible to trace up to 4 096 instructions for two clock instructions only When the trace information exceeds this capacity the data is overwritten the oldest data first unless operating in single delay trigger mode Consequently the trace information stored in the trace memory is always within 8 192 cycles The trace memory is cleared when a program is executed starting to trace the new execution data Trace olx egister flag data trace fetch fetch addr code disasm 666A adc x 6x66 666C r B X Y EICZ addr data SP in 1 6665 AAAA 8888 6664 wt 1 AAAA 6008 8885 r9 1 AAAA OOOO 8885 w9 1 AAAA 6661 8886 r8 1 6661 8886 v8 1 8888 1 8888 w3 jr Oxfd 1 8888 rAAAA 1 ldb ext 6xfe 1 calr 8xef 1 ldb ext 8x68 1 mmmmmmmmmmo The following lists the trace information that is taken into the trace memory in every cycle This list is corresponded to display in the Trace window trace cycle Trace cycle decimal The last information taken into the trace memory becomes 00001 fetch adar Fetch address hexadecimal fetch code disasm Fetch code hexadecimal and disassembled content register Values of A B X and Y registers after cycle executi
383. on hexadecimal flag States of E I C and Z flags after cycle execution binary data Accessed data memory address hexadecimal read write denoted by r or w at the beginning of data and data 1 digit hexadecimal for 4 bit access 4 digit hexadecimal for 16 bit access SP Stack access 1 for SP1 access 2 for SP2 access trace in Input to TRCIN pin denoted by L when low level signal is input Notes The S1C63000 CPU uses two stage pipelined instruction processing one for fetch and one for execution Therefore please pay attention to the following The CPU fetches the next instruction in the last execution cycle of an instruction Because the instruction is executed beginning from the cycle which is after the fetch the displayed states of the registers etc are not the execution results of the fetch instruction that is displayed on the same line For reasons of the ICE operation timing the trace data at the boundary of operations such as in the fetch cycle at which trace starts or the execution cycle at which trace ends will not always be stored in memory 152 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Trace modes Three trace modes are available depending on the method for sampling trace information Table 8 8 6 1 Trace mode setup command Function Command Menu Set trace mode tm Trace Trace Mode Set 1 Normal trace mode In this mode th
384. on and di option must be specified respectively Be aware that the current version may generate an object different from that of the previous version because the current version uncondition ally deletes unnecessary extension codes when the project for the previous version with no d option is processed Specify the dr option to generate the same optimized codes as the previous version 104 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 6 HEX CONVERTER CHAPTER 6 HEX CONVERTER This chapter describes the functions of hex converter hx63 6 1 Functions The hex converter hx63 converts an absolute object file in IEEE 695 format output from the linker into a hex file in Motorola S format or Intel HEX format This conversion is needed when debugging the program with the ROM or when creating mask data using the mask data checker When creating the ROM image hex data the hex converter fills the unused area of each model with Oxff 6 2 Input Output Files from Linker gt Absolute object file _file abs pue file par ICE parameter file Hex Converter hx63 Intel HEX tileh hex file hsa Motorola S een format Se m format files _1x63 err filel hex _tile lsa Error file filec hex file csa ROM or Mask data creation Fig 6 2 1 Flow chart 6 2 1 Input Files Absolute object file File format File name Description ICE parameter file File format Fil
385. on using the set pseudo instruction Example set ADDR1 Oxff00 ADDRI is a symbol that represents absolute address Oxff00 3 Definition using the comm or lcomm pseudo instruction Example comm BUF1 4 BUFI is a label that represents a RAM address The comm and Icomm pseudo instructions can define labels only in bss sections data memory such as RAM Program memory addresses cannot be defined Reference with symbols A defined symbol denotes an address The actual address value should be determined in the linking process except in the case of absolute sections Examples LABEL jr LABEL1 jumps to the LABEL location set IO M Oxfff org 0x0000 bss comm COUNT1 1 code ldb Sext IO_M h ldb x1 10 MG1 Oxfff0 is loaded to X register h and G1 are symbol masks inc COUNT1 Regarded as inc 0x0000 54 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER Scope The scope is a reference range of a symbol label It is called local if the symbol is to be referenced within the same file and it is called global if the symbol is to be referenced from other files Any defined symbol s scope is local in default To make a symbol s scope global use the global pseudo instruction both in the file in which the symbol is defined and in the file that references the symbol A double definition of local symbols will be an error at the assembly stage while a double definit
386. ontents the option setup area is updated according to the segment assignment data saved in the file You can continue segment assignment from the previous set state To stop loading the file click Cancel 258 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR Notes The segment assignment data file can be read only when the device information definition file has been loaded Some models need a function option document file to be loaded at the start of winsog and the contents of the file affect the segment option setup condition Therefore the segment assign ment data file in which the settings do not match the function option cannot be read 9 Correcting an existing document file You can read an existing segment option document file into winsog and correct it as necessary To read a file select Open from the File menu or click the Open button g Open button The dialog box shown below appears so enter a file name including the path in the text box or select a file by clicking the Ref button Segment Option Document file Open Segment Option Document file fe S1C63 DEV63 DEV63xxx_V1l zzzzzzz2 sdc Click OK and the file is loaded If the specified file exists and there is no problem with its contents Memory Address Data bit and SEGMENT DECODE TABLE are updated according to the contents of the file To stop loading the file click Cancel
387. or RH Acquires the upper 8 bits of a relative address xh or XH Acquires the upper 8 bits of an absolute address by inverting them Used exclu sively for the Idb instruction combined with the cmp instruction Sample uses ldb Sext ADDR h ldb xl ADDRGl Functions as Id x ADDR 16 bit ldb Sext NUMG h add x NUMGlI Functions as add 96x NUM 16 bit ldb Sext LABEL rh calr LABEL rl Functions as calr LABEL 16 bit ldb Sext DATA xh cmp Sx DATA 1 Functions as cmp 96x DATA 16 bit set IO ADDR Oxff12 ldb Sext IO_ADDR 1 ld Sa Sy Functions as ld a IO_ADDR S5U1C63000A MANUAL EPSON 55 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER Restrictions The maximum number of characters of a symbol is 259 not including colon If this number is ex ceeded an error will result Only the following characters can be used A Z a z _ 0 9 A symbol cannot begin with a numeral Examples OK Error FOO llable Li Es set IO Oxfff0 set 10 Oxfff0 comm BUF 4 lcomm 1st BUF 2 Since symbols are case sensitive by default uppercase and lowercase are discriminated When refer encing a defined symbol use the characters exactly the same as the defined symbol Examples Abcd jr ABCD Does not jump to Abcd However symbols will be case insensitive if the c option is specified The symbol masks are effective only on the defined symbols
388. or a address area lt trigger gt Trace trigger address hexadecimal or symbol IEEE 695 format only lt option gt For single delay trace mode s start m middle e end For addres area trace mode i in area o out area lt addr1 8 gt Address ranges hexadecimal or symbol IEEE 695 format only Condition 0 S trigger addr1 8 lt last program memory address WB Examples Format 1 gt tm n 116 Sets normal trace mode and sets trigger point to 0x0116 Format 2 gt tm Normal mode Trigger Address 0 1 normal 2 single delay 3 address area 14 1 normal is selected Trigger address 1164 Trigger address is input gt tmd Normal mode Trigger Address 0116 1 normal 2 single delay 3 address area 2 2 single delay is selected Trigger address 1164 Trigger address is input l start 2 middle 3 end 24 Trace sampling area is selected gt 214 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER gt tmd Single delay mode Trigger Address 0116 Position Middle 1 normal 2 single delay 3 address area 34 2 address area is selected Trigger address 1164 Trigger address is input l in area 2 out area 14 In out is selected Start address 110 Address range is input End address 2004 in up to 4 locations Start address J Terminated by Enter key gt If you enter the Enter key o
389. ork Bench Options Options in the Tools menu allows selection of some options for customizing the work bench When this menu item is selected a dialog box appears r File Menu Print MRU Files fa 4 Unit 6 Inch C mm MRU Projects fa a Font Courier New m Editor Auto Save o a I Line No S Come Pseud Instruction es Assember M Pseud Instruction PreProcesser Label GER UE Cancel File menu options MRU Files box This option allows selection of a number of recently used files to be listed in the File menu The selectable range is 0 to 9 MRU Projects box This option allows selection of a number of recently used project files to be listed in the File menu The selectable range is 0 to 9 Print options Unit radio button This option allows selection of a unit used for specifying the margins of the printing sheet Either inch or mm can be selected This selection affects the margin setup field in the Page Setup dialog box Font list box This option allows selection of a font used for printing the document in the Edit window Editor options Auto Save box This option sets an auto save interval for the document to be edited in the Edit window The selectable range is 0 to 999 minutes When 0 is selected the document being edited will not be automatically saved Line No check box This option enables or disables the line numb
390. ow Comp button Complementary output C Nch button N channel open drain output N Pch button P channel open drain output P If your chip requires selecting an output mode every two pins the other pin that comprises a pair is set in the same way SEG3 c SEG4 N SEGS N 5 Setting SEG COM shared pins Whether the SEG COM shared pins output segment signals or common signals is determined by selecting the function option When using the shared pins as SEG pins allocate display memory addresses bits as shown above and leave unused COM cells blank When using the shared pins as COM pins select segment common shared output M button as the output specification and do not allocate memory Selection example Selection example Note This setting is required only for microcomputers that have SEG COM shared pins S5U1C63000A MANUAL EPSON 257 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 10 SEGMENT OPTION GENERATOR 6 Setting unused SEG pins For SEG pins that are used for neither LCD output nor DC output leave COMO through COMG cells in SEGMENT DECODE TABLE blank However SPEC cells cannot be left blank so select segment output S for the corresponding SPEC cells 7 Creating files After selecting options select Generate from the Tool menu or click the Generate button to create the files el Generate button The segment option document file you specified from the Setup di
391. p constitutes the range of statements until control is returned to the next step by a return instruction Other instruc tions are executed in the same way as in ordinary single stepping In either case the program starts executing from the current PC Table 8 8 4 2 Commands menu items tool bar buttons for single stepping Function Command Menu Button Stepping through all instructions s Run Step GE Stepping through all instructions except subroutines n Run Next E When executing single stepping by command input the number of steps to be executed can be specified up to 65 535 steps When using menu commands or tool bar buttons the program is ex ecuted one step at a time In the following cases single stepping is terminated before a specified number of steps is executed When the Key Break button is clicked or the Esc key is pressed When a map break or similar break occurs Single stepping is not suspended by breaks set by the user such as a PC break or data break e Key Break button When the program does not stop use this button to forcibly stop it 2 Display during single stepping In the initial debugger settings the display is updated as follows The display contents of the Register window are updated every step If the Register window is closed its contents are displayed in the Command window This default display mode can be switched over by the md command so that the display co
392. pecified no error file will be created i Function Conversion into Intel HEX format Explanation Generates the hex files h hex I hex and c hex in Intel HEX format Default If this option is not specified Motorola S format files hsa lsa and csa are generated Function Specification of output path file name Explanation Specifies an output path file name without extension or with an extension hsa Isa csa h hex Lhex or c hex By specifying only one file name three hex files will be generated If no extension is specified an appropriate extension will be supplemented at the end of the specified output path file name In this case hsa lsa or csa is added to the output file name If Intel HEX format is specified h hex I hex or c hex is added to the output file name It may change a DOS file name 8 characters max to a long file name for Windows Default The input file name is used for the output file names When entering an option in the command line one or more spaces are necessary before and after the option Example c epson sic63 bin hx63 e test abs par63xxx par EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 6 HEX CONVERTER 6 4 Messages The hex converter delivers all its messages via the Standard Output stdout Start up message The hex converter outputs only the following message when it starts up Hex converter 63 Ver x x
393. pened 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 MANUAL EPSON 27 S1C63 FAMILY ASSEMBLER PACKAGE 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 El test files main s sub s 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 sub s appears Properties shows the source file information as follows Assemble Open S 3d File name C AS1C63Testisub s AUR Last modified date 13 09 58 98 11 05 Properties Ed Dependencies Shortcut menu in the Project window Last mo
394. ptions in the function option document format The contents displayed in this area are output to the function option document file When you change any selected item in the option list area the display in this area is immediately updated Message area When you create a file by selecting Generate from the Tool menu or clicking the Generate button this area displays a message showing the result of the selected operation 242 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 9 FUNCTION OPTION GENERATOR 9 3 3 Menus and Toolbar Buttons This section explains each menu item and toolbar button File menu File E Open End amp Tool menu Tool Generate G Setups Device INI Select Help menu HelptH Versiont Open Opens a function option document file Use this menu command when correct ing an existing file The Open button has the same function g Open button End Terminates winfog Generate Creates a file according to the selected contents of the option list The Gener ate button has the same function el Generate button Setup Sets the date of creation output file name and a comment included in the function option document file The Setup button has the same function Setup button Device INI Select Loads the device information definition file s1c63xxx ini The Device INI Select button has the same function This file must be loaded first befo
395. put Set to record on mode Notes n record on mode besides the commands directly input in the Command window the commands executed by selecting from a menu or with a tool bar button except the Help menu commands are also displayed in the Command window and output to the specified file If you modify the register value or data memory contents by direct editing in the Register or Data window or set breakpoints in the Source window by double clicking the mouse the corresponding commands are also displayed in the Command window and output to the specified file At the first time you should specify the file name to which all debug commands following the rec command will be output Once an output command file is opened the recording is suspended and resumed toggled every time you input the rec command This toggle operation remains effective until you terminate the debugger If you want to record following commands to another file you can use format 1 to specify the file name then current output file is closed and all following commands will be recorded in the newly specified file f you want to execute some commands frequently you can record them to a file at the first execution and then use the com or cmw command to execute that command file you made GUI utility Option Record menu item When this menu item is selected a standard file selection dialog box appears for specifying a comm
396. r has a function that automatically inserts removes or corrects the extension codes This makes it possible to omit the address extension instruction in the source However this function is valid only for the branch instructions that use a label to specify the destination address This branch optimization function automatically insertion deletion correction of the extension codes is enabled by default and the branch codes will be optimized unless otherwise specified All the insertion deletion correction functions can be disabled by specifying the d option The di and dr options can also be specified to disable the extension code insertion and deletion functions respectively if the d option is not specified The linker checks the distance from a PC relative branch instruction code to the branch destination label and inserts removes or corrects the extension codes according to the check results 1 When the branch destination is located within the 127 to 128 range from the branch instruction If the branch instructon code does not have an extension code no extension code is inserted If the branch instruction has an extension code it is removed if the dr option is specified existing expansion code will not be removed Examples jr LABEL gt jr ABEL ldb Sext LABEL rh calr LABEL r1l gt calr AABEL r1l 2 When the branch destination is located outside the 127 to 128 range from the branch ins
397. r clears breakpoints using a program s execution address Format 1 gt bp lt break1 gt lt break2 gt lt break16 gt W 2 gt bp PC break set status 1 set 2 clear 3 clear all direct input mode guidance mode lt 1 2 3 gt 4 guidance depends on the above selection see examples break1 16 Break address hexadecimal or symbol IEEE 695 format only Condition 0 address last program memory address Examples Format 1 gt bp 116 200 Format 2 bp l Set No PC break is set 1 set 2 clear Set break address Set break address Set break address bp l Clear 1 0116 2 0200 1 set 2 clear Clear break address Clear break address bpJ Clear all 1i 0116 1 set 2 clear gt bp No PC break is set 1 set 2 clear Ss Notes Mon W Sets break points at addresses 0x0116 and 0x0200 The direct input mode cannot clear the set break points clear 116 1 2004 clear 200 1 clear clear all all all all 14 1 set is selected Address 0x0116 is set as a breakpoint Address 0x0200 is set as a breakpoint Terminated by Enter key 3 2al 2 clear is selected Break address 0x0200 is cleared Terminated by Enter key oe Jel 3 clear all is selected 2 41 Terminated by Enter key The addresses must be specified within the range of the program memory area available for e
398. r example ld LD and Ld are all accepted as Id instructions For purposes of discrimination from symbols this manual uses lowercase characters for the reserved words 52 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 5 2 Instructions Mnemonics and Pseudo instructions The assembler supports all the mnemonics of the 51C63000 instruction set and the assembler pseudo instructions The following shows how to describe the instructions Mnemonics An instruction is generally composed of mnemonic operand Some instructions do not contain an operand General notation forms of instructions General forms lt Mnemonic gt lt Mnemonic gt tab or space lt Operand gt lt Mnemonic gt tab or space lt Operand1 gt lt Operand2 gt lt Mnemonic gt tab or space lt Operand1 gt lt Operand2 gt lt Operand3 gt Examples nop jr NMI ld f 0x4 There is no restriction as to where the description of a mnemonic should begin in a line A tab or space preceding a mnemonic is ignored An instruction containing an operand needs to be separated into the mnemonic and the operand with one or more tabs or spaces If an instruction requires multiple operands the operands must be separated from each other with one comma Space between operands is ignored The elements of operands will be described further below Types of mnemonics The following 39 types of mnemonics can be used in the 1
399. r first setting a break address in two locations at ad dresses 0x1000 and 0x2000 and specifying 3 for the execution count using the bs command the program executes address 0x2000 three times after executing address 0x1000 more than one time and when the PC reaches 0x2000 it breaks before performing the 4th execution The execution count can be set up to 4 095 5 Accessing outside stack area In this case a break occurs when a location outside the stack area is accessed by stack pointer SP1 or SP2 Before this function can be used the SP1 and SP2 areas must be set by the bsp command The initial value is 0x0 to Ox3ff for SP1 and 0x0 to Oxff for SP2 The address of SP1 must be specified in units of 4 words Table 8 8 5 5 Command menu item to set stack break Function Command Menu Set stack break conditions bsp Break Stack Break Forced break by the Key Break button or the Esc key The Key Break button or the Esc key can be used to forcibly terminate the program under execu tion when the program has fallen into an endless loop or cannot exit a standby HALT or SLEEP state e Key Break button Pulling ICE BRKIN pin low The program is made to break by pulling the ICE BRKIN pin low by applying a low level pulse for more than 20 ns 150 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Map break and illegal instruction break The program also breaks when one of the f
400. r restoring the created mask data file into the original file format 12 2 Input Output Files Figure 12 2 1 shows the input output files of winmdc Function Melody ROM Segment Device information Code ROM Data ROM option option option definition file HEX file HEX file document file document file document file zzzzzzzz hsa s1c63xxx ini E pee e Emu peres Mask data created packed Pack file M C63XxxYYY PaN mask data file P To Seiko Epson Data restored unpacked Kf 3 luzzzzzzz hea pe L uzzzzzzz sdc Fig 12 2 1 Input Output Files of winmdc Device information definition file s1c63xxx ini This file contains option lists for various types of microcomputers and other information Always be sure to use the files presented by Seiko Epson This file is effective for only the type of microcomputer indicated by the file name Do not modify the contents of the file or use the file in other types of microcomputers Code ROM HEX files zzzzzzzz hsa zzzzzzzz lsa Both these files are Motorola S2 format HEX files with the 5 high order bits of object code 13 bits stored in hsa and the 8 low order bits of object code stored in lsa These files are created from the object files output by the linker 1k63 by converting them into HEX format using the HEX converter hx63 For details about hx63 refer to Chapter 6 HEX Converter Data ROM HEX file zzzzzzzz csa This i
401. rd 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 MANUAL EPSON 33 S1C63 FAMILY ASSEMBLER PACKAGE 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 Go to what Enter Line Number Label Going to a source line 1 Select Line in the Go to what list box 2 Typealine 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 Go to what Select Label Line Close 1 oe
402. re performing any operation with winfog amp Device INI Select button Version Displays the version of winfog The Help button has the same function H Help button The dialog box shown below appears Click OK to close this dialog box About Winfog ul Winfog Ver x xx Copyright C SEIKO EPSON CORP 2001 S5U1C63000A MANUAL EPSON 243 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 9 FUNCTION OPTION GENERATOR 9 3 4 Operation Procedure The following shows the basic operation procedure 1 Loading the device information definition file First select a device information definition file s1c63xxx ini and load it Select Device INI Select from the Tool menu or click the Device INI Select button amp Device INI Select button The dialog box shown below appears Enter a file name including the path in the text box or select a file by clicking the Ref button Device INI file Select Click OK and the file is loaded If the specified file exists and there is no problem with its contents the option list and the function option document which have both been set by default are displayed in each area To stop loading the file click Cancel fc S1C63 DEV63 DEV63xxx_V1 Slc63xxx ini OK cance1 F file ini Once a device information definition file is selected the same file is automatically loaded the next time you start winfog Note When you load a device information d
403. re the macro definition must precede the use of it Once a defined macro name is defined it cannot be canceled If the same macro name is defined duplicatedly a warning message will appear Until it is redefined it is expanded with the original content and once it is redefined it is expanded with the new content Definition should be done with distinct names although the program operation will not be affected No other characters than delimiters space tab line feed and commas can be added before and after a dummy parameter in a statement The same character string as that of the define instruction cannot be used as a macro name When the number of dummy parameters differs from that of actual parameters an error will result The maximum number of parameters and internal branch labels are limited according to the free memory space __Lnnnn used for the internal branch labels should not be employed as other label or symbol S5U1C63000A MANUAL EPSON 69 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 5 Conditional Assembly Instructions ifdef else endif ifndef else endif A conditional assembly instruction determines whether assembling should be performed within the specified range dependent on whether the specified name Define name is defined or not Instruction formats Format 1 ifdef lt Name gt lt Statement string 1 gt else lt Statement string 2 gt tendif If the name i
404. reak in such a way that the break address is displayed within the window If the Trace window is opened the display contents are cleared as the program is executed It is updated with the new trace information after a break If the Data window is opened the display contents are updated after a break 3 Display during log mode If the program is executed after turning on the log mode an on the fly display appears in the Com mand window as well as the Register window Example 2g PC 0007 EICZ 0001 0000 AAAA 0004 3D30 0008 AAAA 000C AAAA PC 000C EICZ 0000 0000 AAAA 0004 5250 0008 AAAA 000C AAAA PC 0117 EICZ 1001 0000 AAAA 0004 6760 0008 AAAA 000C AAAA PC 000B EICZ 0000 0000 AAAA 0004 8C70 0008 AAAA 000C AAAA Key Break PC 0008 A F B 1 X 0007 0 Y AAAA EICZ 1001 SP1 4A 128 SP2 1F EXT 00 QUEUE 0118 bus cycle 0000029332 cycle 0000 AAAA 0004 E280 0008 AAAA 000C AAAA gt When a break occurs the same display appears as when data is displayed by the rd command S5U1C63000A MANUAL EPSON 177 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 4 Execution cycle counter The execution cycle counter displayed in the Register window indicates the number of cycles executed or the execution time of the target program Refer to Section 8 8 4 for details In the initial debugger settings the execution cycle counter is set to hold mode s
405. rects branch instructions Flowchart from Assembler Linker Relocatable ICE optimization function that extension codes for command file object file s parameter file file cm file par Linker lk6s LL fie map file sym file abs file xrf file als keser Link Symbol Absolute Cross Absolute Error file map file file object file reference file list file as to Debugger Start up Command Usage Usage 1k63 options lt file names gt Options d di dr e wi I o lt file name gt code lt address gt data lt address gt bss lt address gt rcode lt file name gt lt address gt rdata lt file name gt lt address gt rbss lt file name gt lt address gt defsym lt symbol gt lt address gt File names Relocatable object file Command parameter file C ICE parameter file PAR Disable all branch optimization Disable insertion of branch extension Disable removal branch optimization Output error log file ERR Add source debug information Output absolute list file ALS Output map file MAP Specify output file name Output symbol file SYM Output cross reference file Specify CODE start address Specify DATA start address Specify BSS start address Specify CODE start address of the file Specify DATA start address of the file XRF Specify BSS start address of the file Define symbol address 0 M Error Messages Branch destination
406. rogram memory address Examples Format 1 gt pm 200 2ff 2804 Copies the codes within the range from address 0x200 to address Ox2ff to the area from address 0x280 Format 2 gt pmd Start address 200 Source area start address is input End address 2ffH Source area end address is input Destination address 2804 Destination area start address is input gt Command execution can be canceled by entering only the Enter key and nothing else Notes The addresses you specified must be within the range of the program memory area available with each microcomputer model An error results if the input one is not a hexadecimal number or not a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX An error results if the start address is larger than the end address Error end address start address When the contents of the program memory is modified using the pm command the contents of the Source window are updated automatically Although the contents of the unassemble display are modified by rewriting code those of source display remain unchanged GUI utility None S5U1C63000A MANUAL EPSON 163 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 4 Data Memory Operation dd data memory dump Function This command displays the content of the data me
407. rom top of the relocatable CODE DATA BSS section Basically the relocatable sections except those that are specified with the rcode rdata or rbss option are arranged successively in the order of processing However if a relocatable section cannot be mapped subsequent to the previous mapped section for instance there is unused area indicated by the ICE parameter file or an already mapped absolute section the linker searches another area to map the section If there is no available area an error will occur A section is not divided into two or more blocks when it is mapped After that another section may be mapped in the vacant area if it is possible to map there Restrictions on linking Note that all sections may not be mapped depending on each section size or address specifications even if the relocatable object size is within the available memory size Example of linking A sample case where two relocatable object files testl o and test2 0 are linked together under the following condition is described further below Memory configuration of the model Code ROM 0x0000 to Ox1fff Data ROM 0x8000 to 0x87ff RAM 0x0000 to 0x07 ff Display I O memory 0xf000 to Oxffff Relocatable object files test1 o test2 o CODE1 relocatable CODES relocatable CODE2 absolute 0x0100 org is used CODE4 relocatable org is used DATA1 _ relocatable DATA2 absolute 0x8400 BSS1 relocata
408. rror occurs when loading a file portions of the file that have already been read will remain in the emulation memory GUI utility File Load File menu item Load File button When this menu item or button is selected a dialog box appears allowing selection of an object file to iM be S D Load File button less a Test J Si e SE a Test abs ienme Files of type Source Files abs Cancel S5U1C63000A MANUAL EPSON 207 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER lO load option Function This command loads a Motorola S format program data or option file listed below into the debugger File Name specification Program file hsa 5 high order bits lsa 8 low order bits Data file csa Function option data file fsa Segment option data file ssa Melody data file msa Not used in some microcomputer models Format 1 gt lo file name gt direct input mode 2 gt lo guidance mode File Name file name gt gt lt file name gt File name to be loaded path can also be specified Examples Format 1 gt lo test lsad Loads the program files test lsa and test hsa Loading file OK gt Format 2 gt lod File name test fsad Loads a function option file Loading file OK gt Notes The debugger determines the file type based on the specified file name Therefore the debugger cannot load a file not following to
409. s The actual interval of the on the fly display is obtained from the expression below 1 sec Count set Overhead of the PC RS232C interface and ICE sec display interval sec The overhead varies depending on the performance of the PC and baud rate of the RS232C interface Be aware that there is a 0 05 sec to 0 1 sec overhead in this system In guidance mode the following keyboard inputs have special meaning 54 24 14 24 34 g Command is terminated finish inputting and start execution AJ Return to previous item Sel Input is skipped keep current value 230 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER GUI utility Option Mode Setting menu item When this menu item is selected a dialog box appears allowing selection of each mode Mode Setting Ex Select the mode using the check boxes or enter the number interval settings and then click OK 5U1C63000A MANUAL EPSON 231 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 20 FPGA Operation Xfer xfers xilinx fpga data erase Function This command erases the contents of the FPGA on the standard peripheral circuit board inserted in the ICE Format gt xfert for main FPGA direct input mode gt xfers for sub FPGA direct input mode Example gt xferJ gt After the command is entered a dialog box appears to select start or cancel erasing Notes
410. s a Motorola S2 format HEX file containing the 4 bit data to be written into the data ROM This file is created simultaneously with the code ROM HEX files by hx63 This file is available for only microcomputers featuring built in data ROM Function option document file zzzzzzzz fdc This is a text format file in which the contents of selected function options are stored This file is created by the function option generator winfog Melody ROM option document file zzzzzzzz mdc This is a text format file in which the contents of selected melody ROM options are stored This file is created by the melody generator winmla This file is available for only microcomputers with set melody options S5U1C63000A MANUAL EPSON 281 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 12 MASK DATA CHECKER Segment option document file zzzzzzzz sdc This is a text format file in which the contents of segment options set are stored It is created by the segment option generator winsog This file is available for only microcomputers with set segment options Pack file c63xxx yyy paN N 0 and over This is a text format file which contains the above data files combined into one We would like to have this file presented to Seiko Epson as the mask data file Seiko Epson will create the mask patterns for the IC from this mask data file The xxx in the file name denotes the model name of a microcomputer The yyy part of the file name represents the
411. s defined lt Statement string 1 gt will be subjected to the assembling If the name is not defined and else Statement string 2 gt is described then Statement string 2 gt will be subjected to the assembling else Statement string 2 gt can be omitted Format 2 ifndef lt Name gt lt Statement string 1 gt else lt Statement string 2 gt endif If the name is not defined lt Statement string 1 gt will be subjected to the assembling If the name is defined and else lt Statement string 2 gt is described lt Statement string 2 gt will be subjected to the assembling else Statement string 2 gt can be omitted Name Conforms to the restrictions on Define name See define Statement string All statements excluding conditional assembly instructions can be described Sample description ifdef TYPE1 ld x 0x12 else ld x 0x13 endif ifndef SMALL define STACK1 0x31 endif Name definition Name definition needs to have been completed by either of the following methods prior to the execution of a conditional assembly instruction 1 Definition using the start up option d of the assembler Example as63 d TYPE1 sample s 2 Definition in the source file using the define instruction Example define TYPE1 The define statement is valid even in a file to be included provided that it goes before the conditional assembly instruction that uses its Define na
412. s not FO Op File F TooKD Help H Bl 5 d FOG Window initial screen FOG Function Opt File E Tooli Help Sei aal d No 1 OSC1 SYSTEM CLOCK OPTION NO 1 OSCi SYSTEM CLOCK V Crystal 32 768KHz Crystal 32 768KHz Selected 2 CR 60KHz OPTO101 01 OPTION NO 2 Ko 200KHz OSC3 SYSTEM CLOCK M CR Type 1 8MHz CR 200KHz Selected Ceramic aNHz OPT0201 01 No 2 OSC3 SYSTEM CLOCK ti T CR external resistor SCORE COPTIONNOIS NY No 3 INPUT PORT PULL UP RES INPUT PORT PULL UP RESISTOR KOO KOO With Resistor Selected K01 With Resistor Selected K02 Vith Resistor Selected Gate Direct KO3 With Resistor Selected KO1 K10 With Resistor Selected Kil With Resistor Selected Ki2 With Resistor Selected With Resistor Selected K02 man ni 7 With Resistor 7 With Resistor Gate Direct FOG Window after reading the device information definition file S5U1C63000A MANUAL EPSON 241 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 9 FUNCTION OPTION GENERATOR 9 3 2 Window Option list area Function option document area FOG Function Option Generator xx OE x File E TooKD Help H Sal 2 2 Root E OPTION NO 1 No 1 OSCi SYSTEM CLOCK i OSC1 SYSTEM CLOCK JV Crystal 32 768KHz Crystal
413. s not deliver data in unused addresses of the absolute object file This allows minimization of the output hex files Note however that the hex files generated in this format cannot be used for creating the mask data S5U1C63000A MANUAL EPSON 109 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 6 HEX CONVERTER 6 6 Error Warning Messages 6 6 1 Errors When an error occurs the hex converter immediately terminates the processing after displaying an error message It will not output hex files The hex converter error messages are given below Error message Cannot create file kind file lt FILE NAME gt Description The file cannot be created Cannot open file kind file FILE NAME gt The file cannot be opened Cannot read file kind file lt FILE NAME gt The file cannot be read Cannot write file kind file FILE NAME gt Data cannot be written to the file Illegal file name FILE NAME gt specified with option option The specified hex file name is incorrect Illegal ICE parameter at line line number of FILE NAME gt The ICE parameter file contains an illegal parameter setting Illegal file name FILE NAME gt The specified input file name is incorrect Illegal option option An illegal option is specified Illegal absolute object format The input file is not an object file in IEEE 695 format No ICE parameter file specified ICE parameter
414. s of a global symbol is given for the referencing side The symbols to be specified with this option should not be defined in the source as an actual address label that can be referred to One or more spaces or tabs are necessary between defsym and symbol name Sample description defsym BOOT 0x100 When inputting an option in the command line one or more spaces are necessary before and after the option Examples c epson sic63 bin 1k63 defsym INIT 0x200 test cm par63xxx par c epson slc63 bin 1k63 g e s m testl o test2 o o test abs par63xxx par S5U1C63000A MANUAL EPSON 93 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 4 Messages The linker delivers all its messages to the Standard Output stdout Start up message The linker outputs only the following message when it starts up Linker 63 Ver x xx Copyright C SEIKO EPSON CORP 1998 2001 End message The linker outputs the following messages to indicate which files has been created when it ends normally Created absolute object file lt FILENAME ABS gt Created absolute list file lt FILENAME ALS gt Created map file lt FILENAME MAP gt Created symbol file lt FILENAME SYM gt Created cross reference file lt FILENAME XRF gt Created error log file lt FILENAME ERR gt Link 0 error s 0 warning s Usage output If no file name was specified or an option was
415. s to be loaded data l yes 2 no 14 fog l yes 2 no 24 Lal sog l yes 2 no 14 mla l yes 2 no 14 Loading from flash memory done gt Notes If the flash memory is protected against read write an error will result and memory contents will not be loaded into the target memory Error flash ROM is protected If the flash memory has been erased an error will result and memory contents will not be loaded into the target memory Error format error S5U1C63000A MANUAL EPSON 209 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER If the flash memory and target memory are mapped differently e g the parameter file used in the current debug differs from one that was used when the program was saved to the flash memory an error will result and memory contents will not be loaded into the target memory Error Map information is not the same In this case the system displays the map information of the target memory and the flash memory after showing the message above ICE flash Chip name 63A08 Parameter version 02 00 Size of program 2000 0 data RAM 800 8000 data ROM 1000 7000 ext memory 100 700 LCD 2C0 800 IO 20 20 FO 20 FO sol 0 1000 SO2 100 1000 MLA 510 1000 Redo the loading with the correct parameter file using the efl or sfl command f an error occurs when loading data portions of the data that have already been read into the target memory are left as they were loaded
416. scribed in the hexadecimal format Oxnnnn Decimal and binary notations will not be accepted e When an option that is only permitted in single setting is specified in a duplicated manner the last entered option will be effective Example code 0x0000 code 0x0100 code 0x0100 is effective Input file specification Describe the relocatable object file names at the end of the link command file The mapping by linking takes place in described order unless otherwise specified The extension 0 of the relocatable object files can be omitted Comment A comment can be described in the linker command file As in the source file the character string from a semicolon to the end of the line is regarded as a comment Blank line A blank line carrying only blank characters and a line feed will be ignored It need not be converted to a comment using a semicolon S5U1C63000A MANUAL EPSON 95 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER 5 6 Link Map File The link map file serves to refer to the mapping information for the modules of each section It is output if the m option is specified The file format is a text file and its file name is lt File name gt map File name gt is the same as that of the output object file Sample link map file Linker 63 ver x xx Link map file TEST MAP Mon Jan 15 12 40 41 2001 CODE section map of TEST ABS Index Start End
417. se 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 UV WorkBench63 Version X XX main s File Edit View Insert Build Tools Window Help Hema AES al amp ge JPARESA08PAR zl Absolute Object zl as ee Selm test files zl set SP2_INIT_ADDR 6x1f xxxxx NMI amp BOOT LOOP xxxxx global INIT_RAM_BLK1 subroutine in sub global INC_RAM_BLK1 subroutine in sub org 6x166 dalr INIT_RAM_BLK1 initialize RAM bl reti in NMI watchdog t Assembler 63 Ver x xx Copyright C SEIKO EPSON CORP 1998 2881 Linked with the corresponding source line C SIC63 TEST MAIN S 23 Error Unknown mnemonic dalr C S1C63 TEST MAIN S 41 Warning Section activation expected use bss Created preprocessed source file MAIN MS Assembly 1 error s 1 warning s sl For Help press F1 Ln 23 Col 1 NUM 5U1C63000A MANUAL EPSON 35 S1C63 FAMILY ASSEMBLER PACKAGE 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
418. semicolon 56 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE 4 5 6 Register Names The CPU register names may be written in either uppercase or lowercase letters Table 4 5 6 1 Notations of register names A B BA X XH XL Y YH YL F EXT SP1 SP2 Register Data register A Data register B BA register pair Index register X Upper 8 bits of X register Lower 8 bits of X register Index register Y Upper 8 bits of Y register Lower 8 bits of Y register Flag register F Extension register EXT Stack pointer SP1 Stack pointer SP2 Notation Ya YA a or A b B b or B ba BA ba or BA 95x X x or X xh XH xh or XH 9oxl XL xl or XL wy LY y or Y yh YH yh or YH Syl YL yl or YL i YF f or F ext EXT ext or EXT sp1 SP1 sp1 or SP1 sp2 SP2 sp2 or SP2 CHAPTER 4 ASSEMBLER Note can be omitted These symbols are reserved words therefore they cannot be used as user defined symbol names 4 5 7 Numerical Notations This Assembler supports three kinds of numerical notations decimal hexadecimal and binary Decimal notations of values Notations represented with 0 9 only will be regarded as decimal numbers To specify a negative value put a minus sign before the value Examples 1 255 3 Characters other than 0 9 and the sign cannot be used Hexadecimal notations of values To specify a hexadecimal number place 0x before the value Examples O
419. sible 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 e 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 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
420. sk that constitutes a break condition for each register A B F X and Y The program will break when all setting conditions are met Format 1 gt br lt register gt lt value gt lt register gt value lt register gt lt value gt 2 br i Register break set status 1 set 2 clear A Old value B Old value FE Old value FI Old value FC Old value FZ Old value X Old value Y Old value gt lt value gt lt value gt value 1 value 1 value 1 value 1 lt value gt t lt value gt 2 lt 1 2 gt register Register name A B F X or Y value Examples Besos direct input mode guidance mode Command is completed when 2 is selected Data pattern for the register hexadecimal or binary F register can be used for the bits to be masked Format 1 gt br f 1 Sets a register break condition so that the program breaks when the C flag is set Format 2 gt bra Asoc CES X xi EICZ 1 set 2 clear 14 1 set is selected A ad Data Oxa is set for A register condition B masks the register condition FE pl EI Kg W FC SS 14 FZ J X 204 Y sal d returns guidance to previous setting X 20 604 Y ex E gt bra Aia B X 60 Y EICZ 1 1 set 2 clear 24 2 clear is selected 2br Ao BS An KSC EICH 1 set 2 clear 4 Terminated by Enter
421. solute object file to be converted in the Hex data convert dialog box Look in S Test e zz el a Test abs Femme Files of type Absolute Object File abs Cancel ICE Parameter file PARB3A08 PAR Output Format Motorola 5 T 7 Output error log file T Do not fill room with OxFF 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 between Intel HEX and Motorola S Output error log file check box Select this option to generate the error log file of the HEX converter Do not fill room with OxFF check box Select this option when not filling the unused program area with OxFF After selecting an absolute object and options click the Open button The HEX converter starts up and converts the selected object into the specified format The messages delivered from the HEX converter are displayed in the Output window 38 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH Disassembler To invoke the disassembler select Disassembler from the Tools menu or click the Disassemble button uS Disassemble button Then select the executable object file to be disassembled in the Disassemble dialog box a Test abs Fiename Files of type Absolute Object File abs Cancel
422. ss is not at the top of the window Since the Data window can be scrolled to show the entire data memory defining lt address2 gt does not have any specific effect Only defining lt address1 gt and both defining lt address1 gt and lt address2 gt has same display result 2 When data window is closed If both lt address1 gt and lt address2 gt are not defined the debugger displays data for 256 words from address 0x000 in the Command window gt dd 01234567 89 ABCDEF 0000 AAAADCOS3 AAAAAAAA 0010 AAAAAAAA AAAAAAAA 00E0 AAAAAAAA AAAAAAAA 00F0 AAAAAAAA AAAAAAAA gt If only lt address1 gt is defined the debugger displays data for 256 words from lt address1 gt gt dd f 004 FF00 003 0002 001020 FF10 kK kk kk kk x kK k kK K k Kk x FFE0 00000000 FFF0 00000000 gt Watt indicates an unused address 164 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER If both lt address1 gt and lt address2 gt are defined the debugger displays data from lt address1 gt to lt address2 gt gt dd 008 017 01234567 89 ABCDEF 0000 00000000 0010 00000000 2 3 During log output If a command execution is being output to a log file by the log command when you dump the data memory data is displayed in the Command window even if the Data window is opened and are also output to the log file If the Data window is closed d
423. stage expands the additional function part described in the source file to mnemonics that can be assembled and delivers them to a temporary file preprocessed file The assembling stage as semble the preprocessed file to convert the source codes into the machine codes 4 2 Input Output Files Assembly source file pl Assembler as63 file lst file o file ms Relocatable Object file Preprocessed Error file list file 5 source file to Linker E Me Fig 4 2 1 Flow chart 4 2 1 Input File Assembly source file File format Text file File name lt File name gt s File name ms A preprocessed source file created by the assembler or disassembler Description File in which a source program is described If the file extension is omitted the assembler finds a source file that has the specified file name and an extension s Note When a s source file is specified it will be processed in the preprocessing stage and then the assembling stage When a ms source file is specified it will be processed only in the assembling stage Therefore ms files cannot include prepro cessor instructions S5U1C63000A MANUAL EPSON 47 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 2 2 Output Files Object file File format File name Output destination Description Relocatable list file File format File name Output destination Description Preprocessed file File format File nam
424. ster B register 4 S a X register and its memory Y register and its memory and flags E I C Z X TT stack pointers SP1 SP2 EXT register and QUEUE register v AAAA EIC2 6666 2 Execution cycle counter SBa e This counter calculates and indicates the number of executed cycles or EXT AA execution time since the CPU was reset QUEUE AAAA Gg E nA 3 Monitor data ette 983 The debugger allows you to specify four addresses in RAM and monitor the et Ge memory contents at these addresses The Register window displays the 4 contents of these four watch data addresses 4 words each beginning from the specified address When the debugger starts up addresses 0 4 8 and C are initially set as the watch data addresses The contents are arranged seguentially from left to right in order of their addresses as they are dis played on the screen Updating the display The display is updated when registers are dumped rd command when watch data addresses are set dw command when register data is modified rs command when the CPU is reset rst command or after program execution g gr s or n command is completed When the on the fly function is enabled the PC flag and watch data are updated in real time at 0 5 second intervals while the program is being executed Other contents are left blank until the program is stopped by a break 4 Direct modification of register contents The Register window allows direc
425. strasse 15 80992 Munich GERMANY Phone 49 0 89 14005 0 Fax 49 0 89 14005 110 SALES OFFICE Altstadtstrasse 176 51379 Leverkusen GERMANY Phone 49 0 2171 5045 0 Fax 49 0 2171 5045 10 UK BRANCH OFFICE Unit 2 4 Doncastle House Doncastle Road Bracknell Berkshire RG12 8PE ENGLAND Phone 44 0 1344 381700 Fax 44 0 1344 381701 FRENCH BRANCH OFFICE 1 Avenue de l Atlantique LP 915 Les Conquerants Z A de Courtaboeuf 2 F 91976 Les Ulis Cedex FRANCE Phone 33 0 1 64862350 Fax 433 0 1 64862355 BARCELONA BRANCH OFFICE Barcelona Design Center Edificio Testa Avda Alcalde Barrils num 64 68 E 08190 Sant Cugat del Vall s SPAIN Phone 34 93 544 2490 Fax 34 93 544 2491 ChaoYang District Beijing CHINA Phone 64106655 Fax 64107319 SHANGHAI BRANCH 4F Bldg 27 No 69 Gui Jing Road Caohejing Shanghai CHINA Phone 21 6485 5552 Fax 21 6485 0775 EPSON HONG KONG LTD 20 F Harbour Centre 25 Harbour Road Wanchai Hong Kong Phone 852 2585 4600 Fax 852 2827 4346 Telex 65542 EPSCO HX EPSON TAIWAN TECHNOLOGY amp TRADING LTD 10F No 287 Nanking East Road Sec 3 Taipei Phone 02 2717 7360 Telex 24444 EPSONTB Fax 02 2712 9164 HSINCHU OFFICE 13F 3 No 295 Kuang Fu Road Sec 2 HsinChu 300 Phone 03 573 9900 Fax 03 573 9169 EPSON SINGAPORE PTE LTD No 1 Temasek Avenue 36 00 Millenia Tower SINGAPORE 039192 Phone 65 337 7911 Fax 65 334 2716 SEIKO EPSON CORP
426. t Set register break log file name gt Turn log output on or off reg pcla b x y flsp1 sp2 ext q ma Display map information bre Clear register break md lt option gt num lt option gt lt num gt Set debugger modes _ option f u i s c il cm bs lt pass gt lt addr1 gt lt addr2 gt lt addr3 gt Set sequential break q Quit debugger bsc Clear sequential break Displays command usage bsp lt addr1 gt lt addr2 gt lt addr3 gt lt addr4 gt Specify stack area bl Display all break conditions A symbol can be used to specify an address as follows bac Clear all break conditions lt global symbol gt or lt local symbol gt lt source file name gt Debugger db63 5 Development Tools Debugger Messages ICE status Break by PC break Break caused by PC breakpoint Break by data break Break caused by data break condition Command errors Cannot load program ROM data check ABS file Failed to load program ROM data some file other than IEEE 695 executable format was specified Break by register break Break caused by register break condition Cannot open file The file cannot be opened Break by sequential break Break caused by sequential break condition Data out of range use 0 0xF The specified number is out of the data range Key Break Break caused by pressing ESC key or Key break button Different chip type cannot load
427. t Function Set up of the file specific DATA section start address Explanation Sets the absolute address to map the DATA section of the specified module This command serves to specify a module having data to be fixed at a specific address of the data ROM Absolute sections in the specified file remain unaf fected One or more spaces or tabs are necessary between rdata and file name gt The address should be described in hexadecimal format 0xnnnn Default If this option is not specified the DATA section of each module is mapped continuously from the address that was set by the data option Sample description rdata testl o 0x8100 rbss file name gt lt address gt Function Set up of the file specific BSS section start address Explanation Sets the absolute address to map the BSS section of the specified module This command serves to specify a module having a symbol to be fixed at a specific address of the RAM Absolute sections in the specified file remain unaffected One or more spaces or tabs are necessary between rbss and file name The address should be described in hexadecimal format 0xnnnn Default If this option is not specified the BSS section of each module is mapped continu ously from the address that was set by the bss command Sample description rbss testl o 0x100 defsym symbol name gt lt address gt Function Specification of a global symbol address Explanation e The absolute addres
428. t PC to the cursor position in the Source window the address of that line Go from Reset button Resets the CPU and then executes the target program from the program start address 0x110 Step button Executes one instruction step at the address indicated by the current PC Next button Executes one instruction step at the address indicated by the current PC The calr calz and int instructions and their subroutines are executed as one step Reset button Resets the CPU Break Button Sets or clears a breakpoint at the address where the cursor is located in the Source window Help Button Displays the help window Find button Searches the specified word and moves the source display to the found word location Search Label Search Label pull down list box Moves the source display to the selected label location Menus File menu Load File Load Option Flash Memory Operation Load File Reads an object file in the IEEE 695 format into the debugger Load Option Reads a program or optional HEX file in Motorola S format into the debugger Flash Memory Operation Exit Reads writes data from to the Flash memory or erases the Flash memory Exit Terminates the debugger Run menu Go Go to Cursor Go from Reset Step Next Command File Reset CPU Go Executes the target program from the address indicated by the current PC Go to
429. t address 1204 2nd address is input Pass count 34 Pass count is input gt bsa li 0116 23 0120 3 pass 3 1 set 2 clear 2 2 clear is selected gt bsa dita 2 32 pass 1 set 2 clear 4 Terminated by Enter key gt If you press Enter in the middle of a guidance the command is canceled S5U1C63000A MANUAL EPSON 193 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Notes The maximum number of times a program can be executed is 4 095 Specifying a pass count exceeding this limit will result in an error Error Number of passes out of range use 0 4095 The addresses must be specified within the range of the program memory area available for each microcomputer model An error results if the input one is not a hexadecimal number or a valid symbol Error invalid value no such symbol symbol type error An error results if the limit is exceeded Error Address out of range use 0 0xXXXX GUI utility Break Sequential Break menu item When this menu item is selected a dialog box appears for setting sequential break conditions Sequential Break Lx To set a sequential break enter sequential addresses and a pass count in the text boxes then click OK At least one Address 1 bag address Address 1 and the pass count must be set To clear the sequential break condition click Clear Address 2 m Addes3
430. t format The contents displayed in this area are output to the melody ROM option document file When you change any selected item in the option list area the display in this area is immediately updated Making file s is completed Message area When you create a file by selecting Generate from the Tool menu or clicking the Generate button this area displays a message showing the result of the selected operation Melody Assembler winmla 2 Development Tools Buttons Tool bar g Open button Opens a melody ROM option document file Generate button Sets the date of creation output file name and a comment included in the melody ROM option document file and creates a file according to the selected contents of the option list B Device INI Select button Loads the device information definition file s1c63xxx ini Help button Displays the version of winmla Menus File menu Filet Open Exito Open Opens a melody ROM option document file Exit Terminates winmla Tool menu Tool T Generate G Device INI Select Generate Sets the date of creation output file name and a comment included in the melody ROM option document file and creates a file according to the selected contents of the option list Device INI Select Loads the device information definition file s1c63xxx ini Help menu Help H Version A Version Displays the v
431. t input mode file name gt FPGA data file mot Motorola S mes Intel HEX H Intel HEX file S Motorola S file Examples Kass gt xfcp ice fpga c63xxx mot S l gt No error has occurred gt xfcp ice fpga c63yyy mot S l Warning Verify error Verify error has occurred 0X00000 OXFF Error addresses and data in the FPGA are displayed 0X00001 0X84 0X00002 OXAB gt Notes Data is verified only within the valid address range in the specified file If the FPGA contains data outside the range it is not verified Use the file provided by Seiko Epson as the data to be compared without modifying the contents Also the file extension cannot be changed as it is mot Motorola S or mcs Intel HEX Specifying an illegal file results in an error and data cannot be written Error cannot open file e A dialog box appears to show the progress while executing To abort execution click the Cancel button on the dialog box or press the ESC key When the execution stops the warning message shown below is displayed Warning User cancel GUI utility None 234 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE xdp xdps xilinx fpga data dump Function CHAPTER 8 DEBUGGER This command displays the content of the FPGA on the standard peripheral circuit board to the Command window in a 16 words line hexadecimal dump format Format gt xdp lt address1 gt lt address
432. t modification of register contents To modify data on the Regis ter window select highlight the data to be modified and type a hexadecimal number 0 9 a f then press Enter The register data will be modified with the entered number S5U1C63000A MANUAL EPSON 129 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 4 6 Trace Window fetch fetch addr code disasm 606A adc x 6x66 888 888D 8118 jr Oxfd ldb ext 6xfe calr 8xef ldb ext 6x68 register flag B X Y EICZ 1 8885 AAAA 8888 1 8886 AAAA 8888 1 8886 6666 1 6667 6661 1 6667 6661 4 4 1 1 1 1 mmmmnmmmmnmmm mp The Trace window displays the trace result up to 8 192 cycles by reading it from the ICE trace memory The following lists the trace contents Traced cycle number Fetched address Fetched code and disassembled contents Register contents A B X Y and flags Memory access status address R W data and SP1 SP2 TRCIN pin input status This window also displays the trace data search results by the ts command Updating of display The contents of the Trace window are cleared when the target program is being executed During this period the Trace window does not accept scrolling and resizing operations After an program execution is terminated this window displays the latest data traced during the execution To specify a display start cycle execute the td command 130 EPSON S5U1C63000A MANUAL 81C63
433. ta rom area 8885 ldb x1 6x64 8887 AAAA 1661 AAAAAAAA AAAAAAGBA LCD area 1911 add x 6x61 8885 AAAA 6001 AAAAAAAA AAAAAAAA External memori 8885 AAAA 8888 AAAAAAAA AAAAAAAA I0 area AA AAAAAA AAAAAAAA Size of FO are pu nf AAAAAAAA AAAAAAAA Size of S01 area 6 AAA A AARAA AAAAAAAA Size of S02 area 256 AAAAAAAA AAAAAAAA Size of MLA area 1296 AAA ana nana AAAAAAAA AAAAAAAA AAAAAAAA mm ly H 3 Beach Command window Data window Depending on the computer used the windows may differ from the above display depending on the screen resolution the number of dots in system font etc Adjust the size of each window to suit needs 124 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Features common to all windows 1 Open close and activating a window All windows except Command can be closed or opened To open a window select the window name from the View menu To close a window click the Close box on the window After initialization the state of the screen including the position and size of the windows will return to the same as the last time the debugger was terminated The opened windows are listed in the Window menu Selecting one from the list activates the selected window It can also be done by simply clicking on an inactive window Furthermore pressing Ctrl Tab switches the active window to the next open window 2 Resizing and moving a window Each window can be r
434. 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 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 x 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 1C63 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
435. tdout such as error messages The file name is ds63 err by default but it can be changed using the o start up option S5U1C63000A MANUAL EPSON 111 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 7 DISASSEMBLER 7 3 Starting Method General form of command line ds63 Options Absolute object or hex file name gt denotes a space indicates the possibility to omit File names Absolute object file File name gt abs Motorola S files File name gt hsa File name gt lsa File name gt csa The input file must be specified with its extension The Motorola S file can be specified with either hsa lsa or csa as the extension The other unspecified files will be automatically loaded A long file name supported in Windows and a path name can be specified When including spaces in the file name enclose the file name with double quotation marks Options The disassembler comes provided with the following four start up options cl Function Use of lower case characters Explanation Creates all instructions and labels using lower case characters Default If neither this option nor the cu option is specified the source will be made with all labels in upper case characters and instructions in lower case characters cu Function Use of upper case characters Explanation Creates all instructions and labels using upper case characters Default If neither this option nor the cl option is specified the
436. temporary break the program continues execution until it is stopped by one of the following causes Break conditions set by a break set up command are met The Key Break button is clicked or the Esc key is pressed A map break etc occurs e Key Break button When the program does not stop use this button to forcibly stop it 3 On the fly function The ICE and debugger provide the on the fly function to display the PC address F register and watch data values every 0 5 seconds default during successive execution These contents are dis played in the relevant positions of the Register window If the Register window is closed they are displayed in the Command window In the initial debugger settings the display update interval of the on the fly function is set to twice per second It can be modified to 0 OFF 5 times per second using the md command This function provides a complete real time display that is implemented using the ICE hardware 146 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Single stepping 1 Types of single stepping There are two types of single stepping available Stepping through all instructions STEP All instructions are executed one step at a time according to the PC regardless of the type of instruction Stepping through instructions except subroutines NEXT The calr calz and int instructions are executed under the assumption that one ste
437. ter break This break function causes a break when the A B F X and Y register reach a specified value Each register can be masked so they are not included in break conditions The F register can be masked in bit units A break occurs when the above registers are modified to satisfy all set conditions Table 8 8 5 3 Commands menu item to set register break Function Command Menu Set register break conditions br Break Register Break Clear register break conditions brc Break Register Break For example if the program is executed after setting 0 for the data of the A register and 1 for the data of the F register C flag 1 and masking all others the program breaks when the A register is cleared to 0 and the C flag is set to 1 4 Sequential break This break function allows settings of up to three break addresses and the number of times the instructions of the last address to be executed While passing through all addresses sequentially in the order set the program executes instructions at the final specified address the directed number of times and then fetches the instruction at that address one more time before it breaks Table 8 8 5 4 Commands menu item to set sequential break Function Command Menu Set sequential break conditions bs Break Sequential Break Clear sequential break conditions bsc Break Sequential Break For example if you execute the program afte
438. th the ICE parameter file data 0x8000 EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE CHAPTER 5 LINKER bss lt address gt Function Set up of a relocatable BSS section start address Explanation Sets the absolute start address of a relocatable BSS section Absolute sections remain unaffected BSS sections are mapped in succession from this address unless otherwise specified e One or more spaces or tabs are necessary between bss and address The address should be described in hexadecimal format 0xnnnn Default If this option is not specified the BSS section will begin from the RAM physical start address specified with the ICE parameter file Sample description bss 0x000 rcode file name gt lt address gt Function Set up of the file specific CODE section start address Explanation Sets the absolute address to map the CODE section of the specified module This command serves to specify a module having a code to be fixed at a specific address such as the interrupt vector Absolute sections in the specified file remain unaffected One or more spaces or tabs are necessary between rcode and file name gt The address should be described in hexadecimal format 0xnnnn Default If this option is not specified the CODE section of each module is mapped continuously from the address that was set by the code option Sample description rcode testl o 0x0110 rdata file name gt lt address g
439. the Source window if the window is closed All program code in the 64K address space can be referenced by scrolling the window When a break occurs the display content is updated so that the address line to be executed next is displayed with an arrow mark at the beginning of the line for identification Use the scroll bar or arrow keys to scroll the window Or enter a command to display the program code beginning with a specified position Display of source line numbers and source statements The source line numbers and source statements can only be displayed when the IEEE 695 absolute object file including debugging information for the source display is loaded Furthermore the source statements that are actually displayed from this file are those which have had the g option specified by the assembler S5U1C63000A MANUAL EPSON 127 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER Updating of display When a program is loaded and executed g gr s n or rst command or the memory contents are changed a as pe pf or pm command the display contents are updated In this case the Source window updates its display contents so that the current PC address can always be displayed The display contents are also updated when the display mode is changed 2 Current PC The current PC program counter address line is indicated by an arrow mark at the beginning of the line Address 0x0110 in the diagram 3 PC breakpoint Th
440. the name specification listed above and an error will result Error invalid file name If an error occurs when loading a file portions of the file that have already been read are left as they were loaded GUI utility File Load Option menu item Load Option button When this menu item or button is selected a dialog box appears allowing selection of a hex file to be loaded n Load Opti E Load Option button a C3a080a0 fsa Filename Files of type te file fsa Cancel 208 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER 8 9 13 Flash Memory Operation Ifl load from flash memory Function This command loads the memory contents from the flash memory of the ICE into the target memory It therefore allows you to debug the program beginning from the contents previously saved to the flash memory up to latest one Format 1 gt Ifl lt content gt lt content gt direct input mode 2 gt Ifl J guidance mode Read program 1 yes 2 no lt 1 2 gt 1 data 1 yes 2 no lt 1 s fog 1 yes 2 no lt 1 25 sog 1 yes 2 no lt 1 2 gt 1 mla 1 yes 2 no lt 1 22 1 Loading gt content Data type p program d data f fog s sog m mla Examples Format 1 gt 1f1 pd Loads program data Loading from flash memory done Format 2 SEL Read program 1 yes 2 no 14 Select the content
441. this is invalid define L LABEL ldb Sext L h Replaced with Idb ext LABEL Gh ldb x1 L01 Replaced with Idb xl LLABEL 1 When using an expression in a define statement it will be expanded as is Pay attention when a number is defined using the define pseudo instruction Examples define NUM1 1 1 id ga NUM1 2 Expanded as ld Ya 1 1 2 3 define NUM2 1 1 ld ga NUM2 2 Expanded as Id a 1 1 2 4 The internal preprocess part of the assembler does not check the validity of a statement as the result of the replacement of the character string 66 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 3 Numeric Define Instruction defnum Instruction format defnum Numeric Define name lt Number gt Function The defnum pseudo instruction is provided for compatibility with the older assembler In the older assembler defnum is required to define a numeric constant while define is for defining a string In the new assembler there is no need to differentiate between a numeric constant and a string Therefore the new assembler should use the define instruction S5U1C63000A MANUAL EPSON 67 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER 4 7 4 Macro Instructions macro endm Any statement string can be left defined as a macro using the macro instruction macro and the content of that definition can be invoked from different parts o
442. ting files and major startup options and the startup of each tool can be made with simple Windows operations Windows WorkBench63 Version x xx sub s File Edit View Insert Build Tools Window Help oema lc ale al Sle EA FAR63408 PAR zl Absolute Object m ak s 5 i i J test files Project window br This window shows the currently sub s 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 5 0 sub s AS63 test program subroutine global RAM_BLK1 x xx x RAM block 1 initialize xx global INIT RAM BLK1 INIT Bon BLK1 ldb ext RAM_BLK1 h ldb xX1 RAM_BLK1 1 set RAM_BLK1 addre ld x 8x0 CON Ch An EWN ch Linker 63 Uer x xx Copyright C SEIKO EPSON CORP 1998 2081 Output window Created absolute object file TEST RBS This window displays the messages Link 8 error s 8 warning s delivered from the executed tools in a Build Done I build or assemble process Double clicking a syntax error message with a source line number For Help press F1 Ln27 Col19 CAP NUM 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 Edit window This window is used for editing a source
443. tion select the radio button for the register and enter a value in the Enter Value box then click Modify m Register All the register condition must be set Enter CB x an to exclude the register from the break Su ns condition 00018 When the Apply button is clicked the dialog box closes and the register break is Nae EE set with the specified conditions However Enter Value if there is a register of which the condition bm has not been set indicated with no 00018 7 Modi Cancel Clear En 4 _Mediy_ Lancet ces register break condition is set To clear the register break conditions click Clear S5U1C63000A MANUAL EPSON 191 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER bre register break clear Function This command clears the register break conditions that have been set Format gt brc direct input mode GUI utility Break Register Break menu item When this menu item is selected a dialog box appears for clearing the register break conditions See the br command 192 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER bs sequential break Function This command sets and clears sequential break and displays the sequential break condition that have been set This command allows you to set break addresses in up to three locations and the number of times you want the program to be executed at the last
444. too far from lt address gt The branch destination address is out of range CALZ for non zero page at lt address gt The specified address is out of the range 0x0000 0x00ff Cannot create absolute object file lt FILE NAME gt The absolute object file cannot be created Cannot open lt file kind gt file lt FILE NAME gt The file cannot be opened Cannot read lt file kind gt file lt FILE NAME gt The file cannot be read Cannot relocate lt section kind gt section of lt FILE NAME gt The relocatable section cannot be allocated Cannot write lt file kind gt file lt FILE NAME gt Data cannot be written to the file lt address gt legal address range lt address gt for a code at The address specified by TST SET CLR is out of the range 0x0000 0x003f or OxffCO Oxffff legal file name lt FILE NAME gt The file name is incorrect option lt option gt legal file name lt FILE NAME gt specified with The file name specified with the option is incorrect lt FILE NAME gt legal ICE parameter at line lt line number gt of The ICE parameter file contains an illegal parameter setting legal object lt FILE NAME gt The input file is not an object file in IEEE 695 format legal option lt option gt An illegal option is specified No address specified with option lt option gt Address is not specified with the option
445. trigger address regardless of the trace mode specified When the Source window is open the address thus set is marked by a T at the beginning of the address When the program executes that address the ICE outputs a low level pulse from its TRGOUT pin Displaying and searching trace information The sampled trace information can be displayed in the Trace window by a command If the Trace window is closed the information is displayed in the Command window In the Trace window the entire trace memory data can be seen by scrolling the window The trace information can be displayed beginning from a specified cycle The display contents are as described above Table 8 8 6 2 Command menu item to display trace information Function Command Menu Display trace information td View Trace It is possible to specify a search condition and display the trace information that matches a specified condition The search condition can be selected from the following three 1 Program s execution address 2 Address from which data is read 3 Address to which data is written When the above condition and one address are specified the system starts searching When the trace information that matches the specified condition is found the system displays the found data in the Trace window or in the Command window if the Trace window is closed Table 8 8 6 3 Command menu item to search trace information Function Command Menu Se
446. truction If the branch instructon code does not have an extension code an appropriate extension code is inserted If the branch instruction has an illegal extension code it is replaced with a correct extension code Examples jr LABEL ldb Sext LABELGrh jr ABELG rl ldb Sext LABELlGrh gt lab Sext LABEL2Grh calr LABEL2 rl calr ABEL2Z r1 Unused memory spaces may be generated between sections caused by the branch optimization In this case the linker moves the relocatable section following an unused area toward a lower address so that the codes are embedded in the unused area Note In the previous version omission of the d option enables automatic insertion and correction of the extension codes note however that deletion of the extension codes must be enabled using the er option The current version has no er option and all the insertion deletion correction functions are enabled by default To disable the deletion and insertion functions when the d option is omitted the dr option and di option must be specified respectively Be aware that the current version may generate an object different from that of the previous version because the current version uncondi tionally deletes unnecessary extension codes when the project for the previous version with no d option is processed Specify the dr option to generate the same optimized codes as the previous version 102 EPSON S5U1C63000A MANUAL 81C63 F
447. ts in the Source window by double clicking the mouse the corresponding commands and the execution results are also displayed in the Command window and output to the specified file The displayed contents of the Source Data Trace or Register window produced by command execution are displayed in the Command window as well The on the fly information is also dis played However the updated contents of each window after some execution as well as the contents of each window scrolled by scroll bar or arrow keys are not displayed At the first time you should specify the file name to which all following debug commands and execution results will be output Once a log file is open log output is suspended and resumed toggled every time you input the log command This toggle operation remains effective until you terminate the debugger If you want to specify a new log file you can use format 1 to specify the file name then current log file is closed and following commands and results will be output to the newly specified file GUI utility Log E Option Log menu item ee Log State When this menu item is selected a standard file selection dialog box appears for specifying a log file If the logging function has been activated a dialog box appears allowing selection of either log off mode or log on mode A new log file can also be specified using the New button Log On C Log Off S
448. ty 97 or more control data are defined The location counter value or the specified location exceeded the upper limit of the melody ROM capacity Warning 276 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 11 7 Sample Files For Elize Original title For Elize Composer Beethoven Score TEMPO 4580 va Pie ete A I Il Il N NH d d Il D Le A ll i oe Example of input file Melody data I I tr DS P K ki CONS SOND GB Br D C EMPO mO tempo 0 1 EMPO 0 0 8 END AIN adr cntl note scale jump tempo mO For Elize 017E5 00 1 1 7 D5 00 2 1 7 E5 00 3 17 D5 00 417E5 00 5 17 B4 00 6 17D5 00 717C5 00 8 15 A4 00 917 Cc 00 10 17 E4 00 11 17 A4 00 12 15 B4 00 13 17 E4 00 14 17 G4 0 0 15 17 B4 00 16 1 5 C5 0 0 17 17 E4 00 I8 1 7 ES Q 0 19 1 7 D5 0 0 20 1 7 E5 00 21 1 7 D5 0 0 2217 E5 00 23 1 7 B4 00 24 1 7 D5 00 25 17 C5 00 S5U1C63000A MANUAL EPSON 277 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 11 MELODY ASSEMBLER 26 15 A4 0 0 27 17 C4 00 28 17 E4 00 29 17 A4 00 30 15 B4 00 31 1 7 E4 0 0 32 17 C5 00 33 17 B4 00 34 1 6 A4 00 35 2 7 RR
449. ub s 47 global INC_RAM_BLK1 subroutine in sub s 48 49 Org 0x100 503 NMI sl 0100 O8fe ldb est fe 52 0101 02fe calr INIT RAM BLK1 initialize RAM block 1 531 0102 ltf9 reti in NMI watchdog timer 54 114 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE 551 56 57 58 59 60 61 62 63 64 65 0 66 0118 CO OO OO CO Ot GA M o o o Output source file test ms default 094b lfc4 091f lfe 08fe 02ea 08fe 02ef 00fd BOOT LOOP org 0x110 ldb ba SPl INIT ADDR ldb spl ba ldb ba SP2 INIT ADDR ldb ssp2 ba ldb est fe calr INIT_RAM_BLK1 ldb est fe calr INC_RAM_BLK1 jr LOOP CHAPTER 7 DISASSEMBLER set SP1 set SP2 initialize RAM block 1 increment RAM block 1 infinity loop Disassembler 63 Ver x xx Assembly source file TEST MS Mon Jan 15 13 10 20 2001 set LABEL1 0x4 set LABEL2 0x4 set LABEL3 0x4b set LABEL4 Oxlf code org 0x0 CODE1 db ext LABE db x1 LABEL CODE2 db ext LABE db xl LABEL add x 0x1 adc x 0x0 adc x 0x0 adc x 0x0 ret code o oo 2 L1 h 181 L2 h 2 1 org 0x100 ldb ext CODE calr CODE1 rl reti code 1 rh org 0x110 ldb ba LABEL ldb spl ba ldb ba LABEL ldb sp2 ba ldb ext CODE calr CODE1 rl CODE3 ldb ext CODE calr CODE26r1 jr CODE3 rl 361 461 1 rh 2 rh Output source file test ms when cl is specif
450. unction option document area Displays the contents of selected options in the function option document format The contents displayed in this area are output to the function option document file When you change any selected item in the option list area the display in this area is immediately updated Message area When you create a file by selecting Generate from the Tool menu or clicking the Generate button this area displays a message showing the result of the selected operation Function Option Generator winfog 2 Development Tools Open button Opens a function option document file Generate button Creates a file according to the selected contents of the option list Setup button Sets the date of creation output file name and a comment included in the function option document file Device INI Select button Loads the device information definition file s1c63xxx ini Help button Displays the version of winfog ab ase Menus File menu Open Filet Opens a function option document file End pen Terminates winfog End amp Tool menu Generate Tool Creates a file according to the selected contents of the option list Setup Generate G Sets the date of creation output file name and a comment included Setup S in the function option document file Device INI Select Loads the device information definition file s1c63xxx ini Device INI Select Version
451. unicate with the ICE COMI is set by default ICOMT 9600 If test abs bps list box Select a baud rate to communicate with the ICE 9600 bps is set by default Initial Command edit box This box is used to edit the debugger commands to be executed when the debugger starts up The work bench generates a command file with the commands entered in this box and specifies it when invoking the debugger A load command is initially set so that the debugger can load the object at start up Refer to Chapter 8 Debugger for details of the debugger options 3 9 4 HEX Converter Options Output Format list box An output format of the executable object to be generated by the build task can be selected When Absolute Object is selected the build task will be terminated after linking has completed The HEX converter will not be invoked When Intel Hex or Motorola S is selected the HEX converter will be invoked after linking has completed Other HEX converter options become selectable when one of them is selected Do not fill room with OxFF check box Select this option when not filling the unused program area with OxFF Output error log file check box Select this option to generate the error log file of the HEX converter Refer to Chapter 6 HEX Converter for details of the HEX converter options 5U1C63000A MANUAL EPSON 43 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 3 WORK BENCH 3 10 W
452. urce file e l main s main s AS63 test program main routine P INITIAL SP1 amp SP2 ADDRESS DEFINITION ifdef SMALL RAM set SP1 INIT ADDR Oxb SP1 init addr 0x2c else set SP1_INIT_ADDR 0x4b SP1 init addr 0x12c fendif set SP2 INIT ADDR Oxlf SP2 init addr Oxlf P NMI amp BOOT LOOP global INIT_RAM_BLK1 subroutine in sub s global INC_RAM_BLK1 subroutine in sub s org 0x100 NMI G lr INIT RAM BLK1 initialize RAM block 1 reti in NMI watchdog timer org 0x110 BOOT ldb ba SP1 INIT ADDR ldb spl ba set SP1 ldb ba SP2 INIT ADDR ldb sp2 ba set SP2 calr INIT RAM BLK1 initialize RAM block 1 LOOP calr INC RAM BLK1 increment RAM block 1 jr LOOP infinity loop pk RAM block kkk ke org 0x0 bss comm RAM_BLKO 4 comm RAM_BLK1 4 84 EPSON S5U1C63000A MANUAL S1C63 FAMILY ASSEMBLER PACKAGE Preprocessed file stabs main AS63 C EPSON S1C63 Test main s 8 test program main routine FileName INITIAL SP1 amp SP2 ADDRESS DEFINITION j ifdef SMALL RAM else set SP1_INIT_ADDR Oxb set SP1 INIT ADDR 0x4b tendif pr NMI stabn stabn BOOT stabn stabn stabn stabn stabn LOOP stabn stabn rktkkt stabn set SP2_INIT_ADDR Ox1f NMI amp BOOT LOOP global INIT_RAM_BLK1 global INC_RAM_BLK1 org 0x100 2
453. utable object in the format selected here Si Output Format pull down list box Selects an executable object file format Three types of formats are available 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 sl Bl mi 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 MANUAL 81C63 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 opera tion 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
454. uted for the corresponding bits When the contents of the data memory is modified using the dm command the displayed contents of the Data window are updated automatically GUI utility None S5U1C63000A MANUAL EPSON 169 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER dw data memory watch Function This command registers four data memory locations as the watch data addresses Memory contents equivalent to 4 words at each watch address are displayed in the Register window Format 1 gt dw lt address1 gt address4 direct input mode 2 dw i guidance mode Address 1 Old value address1 Address 2 Old value lt address2 gt 1 Address 3 Old value address3 1 Address 4 Old value lt address4 gt 1 gt lt address1 4 gt Watch address hexadecimal or symbol IEEE 695 format only Condition 0 address lt address2 lt Oxffff Examples Format 1 gt dw 10 14 18 1CJ Format 2 dw l Addressl 0010 Address2 0014 Address3 0018 Address4 001c gt Notes Sets watch addresses to 0x10 0x14 0x18 and Oxlc 20 44 Bal e When the debugger starts up four locations at addresses 0 4 8 and Oxc are initially set as the watch data addresses The address specified here must be within the range of the data memory area available with each microcomputer model An error results if the input one is not a hexad
455. verwrite confirmation message Specified file already exists There is a fatal syntax error The control data is placed antecedent to the main data There is control data even though main data is not describes The specified value is out of the range O ROM Over Flow The definition exceeded the ROM capacity R Range Error The location counter value or the specified location exceeded the upper limit of the melody ROM capacity W Warning Warning Melody Assembler winmla 3 Development Tools Melody Data Sample melody Data melody sample file lt Comment TEMPO Start mark of tempo data mO tempo 0 1 TEMPO 0 0 4 TEMPO 0 1 10 i EE AP bere Tempo data 0 15 Tempo data Tempo No 0 1 HS Melody No 0 15 Tempo data Tempo d Tempo data Tempo 45 END lt End mark of tempo data 0 30 0 8 60 0 1 32 0 9 68 6 MAIN lt Start mark of main data 2 34 0 10 80 0 no cntl note scale jump tempo 3 36 9 11 96 0 m0 test 4 40 0 12 120 0 0 765 00 a 5 43 6 13 160 0 1 6 F5 00 b 6 48 0 14 240 0 2 5 D5 0 0 o 7 53 3 15 480 0 3 24 RR 10 d 40385 01 e 5 2E5 01 f 6 1D5 01 9 TEO 65 0 1 h m gt Jump bit BOSCO RRS CIT i 0 Not jumped beli e dh 1 de is enabled Set also when changing tempo and specifying a rest at the end of a melody ump bit 0 Pitch data D4 D74 38 4kHz C4
456. ws 8 4 1 Basic Structure of Window sie 8 4 2 Command WEE S 4 3 Source WindOW 3E 8 4 4 Data Window 6 4 5 Register Window G6 Trace EEN oo WOOL BOSS 9 20 S A EMEND e e EE 8 5 3 Load File and Load Option Buttons 6 5 4 Source Mix and Unassemble Buttons 6 5 5 Go Go to Cursor Go from Reset Step Next and Reset Bunton issues cine e E e Me ORO EO ER vM I Va 131 3 6 Break Button ecco eG IEEE 132 Si EE 9 0 MER oss sama HP re ton Oed i aes AAS 8 6 1 Menu Structure 8 6 2 File Menu 8 63 Run Men 6 0 4 Break Men er aaas rate ar PE in Osa 8 6 5 Trace Menu 8 6 6 View Menu 6 6 7 Option Menu 6 6 8 Windows Menu 6 09 Help Menu sce rt root ento a e 6 7 Method for Executing Commande 136 8 7 1 Entering Commands from Keyboard 136 6 7 2 Executing from Menu or Tool Bar 138 8 7 3 Executing from a Command File seen 139 Eege dE Eeer Eeer 140 6 8 Debug Functions eebe eese et ge eu eb eek iene ds 141 8 8 1 Loading Program and Data Files sese 141 8 8 2 Source Display and Symbolic Debugging Function sss 142 8 8 3 Displaying and Modifying Program Data Option Data and Register 144 6 6 4 Execuling PFOBFAPFI Sirri eere sana AE EE REPRE LIEU YES 146 8 6 MEE 149 vi EPSON S5U1C63000A MANUAL 81C63 FAMILY ASSEMBLER PACKAGE 8 9
457. x Copyright C SEIKO EPSON CORP 1998 2001 End message The hex converter outputs the following messages to indicate which files have been created when it ends normally Created hex file lt FILE NAME gt HSA Created hex file lt FILE NAME gt LSA Created hex file lt FILE NAME gt CSA Created error log file HX63 ERR Hex conversion 0 error s 0 warning s Usage output If no file name was specified or an option was not specified correctly the hex converter ends after delivering the following message concerning the usage Usage hx63 options lt file names gt Options b Do not fill unused memory with Oxff e Output error log file HX63 ERR i Use Intel Hex format o file name gt Specify output file name File names Absolute object file ABS ICE parameter file PAR When error warning occurs If an error occurs an error message will appear before the end message shows up Example Error No ICE parameter file specified Hex conversion 1 error s 0 warning s In the case of an error the hex converter ends without creating an output file If a warning is issued a warning message will appear before the end message shows up Example Warning Output file name conflict Hex conversion 0 error s 1 warning s In the case of a warning the hex converter ends after creating the output files but the result cannot be guaranteed For details on errors and
458. xla Oxff00 0x cannot be followed by characters other than 0 9 a f and A F Binary notations of values To specify a binary number place 0b before the value Examples 0b1001 0b1001100 Ob cannot be followed by characters other than 0 or 1 Specified ranges of values The size specified range of immediate data varies with each instruction The specifiable ranges of different immediate data are given below Table 4 5 7 1 Types of immediate data and their specifiable ranges Symbol Type Decimal Hexadecimal Binary imm2 2 bit immediate data 0 3 0x0 0x3 0b0 0b1 1 imm4 4 bit immediate data 0 15 0x0 Oxf 0b0 0b1 111 imm6 Software vectored interrupt address 0 64 0x0 0x3f 0b0 0b111111 imm8 8 bit immediate data 0 255 0x0 Oxff 0b0 0b11111111 n4 4 bit n ary specified data 1 16 0x1 0x10 0b0 0b10000 sign8 Signed 8 bit immediate data 128 127 0x0 Oxff 0b0 0b11111111 add6 6 bit address 0 64 0x0 0x3f 0b0 0b111111 S5U1C63000A MANUAL EPSON 57 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 4 ASSEMBLER Other numerical notations The following numerical notations can also be used nnnnB Binary numbers nnnnO Octal numbers nnnnQ Octal numbers nnnnH Hexadecimal numbers nnnnB binary numbers and nnnnH hexadecimal numbers are converted into the new format Obnnnn and Oxnnnn in the preprocessing stage nnnnO and nnnnQ octal numbers are converted into hex
459. xxx csa memory S5U1C63000A MANUAL EPSON 117 S1C63 FAMILY ASSEMBLER PACKAGE CHAPTER 8 DEBUGGER CHAPTER 8 DEBUGGER This chapter describes how to use the Debugger db63 8 1 Features The Debugger db63 is used to debug a program after reading an object file in the IEEE 695 format that is generated by the linker It has the following features and functions Various data can be referenced at the same time using multiple windows Frequently used commands can be executed from tool bars and menus using a mouse Also available are source display and symbolic debug functions which correspond to assembly source codes Consecutive program execution and two types of single stepping are possible Five break functions are supported A real time display function shows register and memory contents on the fly A time display function showing execution time by both duration and steps An advanced trace function An automatic command execution function using a command file 8 2 Input Output Files from Linker IEEE 695 Source file s Parameter file object file Bes Command file T file s 3 Debugger A ICE E db63 x Program data Option file cmd file log file trc HEX files HEX files Record file Log file Trace eJ Fig 8 2 1 Flow chart 8 2 1 Input Files Parameter file File format Binary file File name lt file name gt par Description This file contains memory in
460. y to models having a data ROM BSS section The bss pseudo instruction defines a BSS section Statements from this instruction to another section defining instruction will be regarded as 4 bit data and will be so processed as to be mapped in the data memory RAM Therefore nothing else can be described in this area other than the symbols for referring to the address of the data memory the area securing pseudo instructions comm and comm The comm pseudo instruction and the lcomm pseudo instruction are designed to define the symbol and size of a data area Although the BSS section basically consists in a RAM area it can as well be used as a data memory area such as display memory and I O memory Since code definition in this area is meaningless in embedded type microcomputers such as those of the 1C63 Family nothing else can be described other than the two instructions and comments 4 6 2 Absolute and Relocatable Sections The assembler is a relocatable assembler that always generates an relocatable object and needs the linker to make it into an executable absolute object However each section in one source can be absolute or relocatable depending on how they are described The section whose absolute address is specified with the org pseudo instruction in the source is an absolute section while the section whose absolute address is not specified is an relocatable section Absolute addresses of relocatable sections will be fixed by the lin

Download Pdf Manuals

image

Related Search

Related Contents

施工説明書  Roller Shade Installation Guide  XFX PV-T80G-THF4 GeForce 8800 GTS graphics card  R&S NRP2 User Manual  Phonix S357BCB mobile phone case  UNー-PEX 安男ホン  Release 3 10-1 10 HILO & SUSIE Simulator Interface  Integral 8GB DDR3-1600  Primefit ISP1414MS-B25-P Use and Care Manual  Kramer Electronics Switch FC-1ETHN User's Manual  

Copyright © All rights reserved.
Failed to retrieve file