The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

M68HC705JICS IN-CIRCUIT SIMULATOR USER'S MANUAL MOTOROLA, Inc., 1


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



705JICSUM/D January 1998
M68HC705JICS IN-CIRCUIT SIMULATOR USER'S MANUAL
MOTOROLA, Inc., 1998; Rights Reserved
More Information This Product, www.freescale.com
Important Notice Users While every effort been made ensure accuracy information this document, Motorola assumes liability party loss damage caused errors omissions statements kind this document, updates, supplements, special editions, whether such errors omissions statements resulting from negligence, accident, other cause. Motorola further assumes liability arising application information, product, system described herein, liability incidental consequential damages arising from this document. Motorola disclaims warranties regarding information contained herein, whether expressed, implied, statutory, including implied warranties merchantability fitness particular purpose. Motorola makes representation that interconnection products manner described herein will infringe existing future patent rights, descriptions contained herein imply granting license make, sell equipment constructed accordance with this description. Trademarks This document includes these trademarks: Motorola Motorola logo registered trademarks Motorola Inc. registered trademark Corporation. Windows registered trademark Microsoft Corporation. CASM05W, ICS05JW, WinIDE software Microcomputer Systems, Inc, 1996; rights reserved. Motorola Inc. Equal Opportunity /Affirmative Action Employer.
More Information This Product, www.freescale.com
CONTENTS
CONTENTS
CHAPTER
INTRODUCTION
Overview. Toolkit Components Hardware Software Requirements Toolkit Features Specifications. About This User's Manual. Quick Start Instructions CHAPTER INSTALLATION
Overview. Installing M68HC705JICS CHAPTER INSTALLING INITIALIZING ICS05JW SOFTWARE
Overview. ICS05JW Software Components. 3.2.1 WinIDE. 3.2.2 CASM05W 3.2.3 ICS05JW. Installing ICS05JW Software 3.3.1 Install ICS05JW Software 3.3.2 Start ICS05JW Software 3.3.3 Communication
705JICSUM/D
More Information This Product, www.freescale.com
CONTENTS
CHAPTER
WINIDE USER INTERFACE
Overview. Windows Integrated Development Environment WinIDE Windows 4.3.1 Main Window Functions 4.3.2 Main Window Components. Getting Started 4.4.1 Prerequisites Starting WinIDE Editor. 4.4.2 Start WinIDE Editor. 4.4.3 Open Source Files 4.4.4 Navigate WinIDE Editor 4.4.5 Using Markers Command Line Parameters. WinIDE Toolbar WinIDE Menus. WinIDE File Options. 4-10 4.8.1 File. 4-10 4.8.2 Open File 4-10 4.8.3 Save File 4-11 4.8.4 Save File 4-11 4.8.5 Close File 4-12 4.8.6 Print 4-12 4.8.7 Print Setup 4-12 4.8.8 Exit. 4-13 WinIDE Edit Options 4-13 4.9.1 Undo 4-13 4.9.2 Redo. 4-14 4.9.3 4-14 4.9.4 Copy. 4-15 4.9.5 Paste. 4-15 4.9.6 Delete. 4-15 4.9.7 Select 4-15 4.10 WinIDE Environment Options 4-16 4.10.1 Open Project 4-17 4.10.2 Save Project 4-17 4.10.3 Save Project 4-17
More Information This Product, www.freescale.com
705JICSUM/D
CONTENTS
CHAPTER
WINIDE USER INTERFACE (continued)
4.10.4 Close/New Project 4-18 4.10.5 Setup Environment 4-18 4.10.5.1 General Environment Tab. 4-18 4.10.5.2 General Editor 4-20 4.10.5.3 Assembler/Compiler Tab. 4-22 4.10.5.4 Executable (Debugger) Executable (Programmer) Tabs. 4-26 4.10.6 Setup Fonts 4-28 4.11 WinIDE Search Options 4-29 4.11.1 Find 4-30 4.11.2 Replace 4-31 4.11.3 Find Next 4-31 4.11.4 Line 4-32 4.12 WinIDE Window Options 4-32 4.12.1 Cascade 4-32 4.12.2 Tile. 4-33 4.12.3 Arrange Icons. 4-34 4.12.4 Minimize All. 4-34 4.12.5 Split. 4-34 CHAPTER CASM05W ASSEMBLER
Overview. CASM05W Assembler User Interface 5.2.1 Passing Command Line Parameters Assembler Windows 3.x. 5.2.2 Passing Command Line Parameters Assembler Windows Assembler Parameters Assembler Outputs. 5.4.1 Object Files. 5.4.2 Files 5.4.3 Listing Files 5.4.4 Files from Other Assemblers Assembler Options. 5.5.1 Operands Constants 5.5.2 Comments
705JICSUM/D
More Information This Product, www.freescale.com
CONTENTS
CHAPTER
CASM05W ASSEMBLER (continued)
Assembler Directives. 5.6.1 BASE 5.6.2 Cycle Adder 5.6.3 Conditional Assembly 5-11 5.6.4 INCLUDE. 5-11 5.6.5 MACRO. 5-12 Listing Directives. 5-13 5.7.1 Listing Files 5-13 5.7.2 Labels. 5-15 Pseudo Operations 5-16 5.8.1 Equate (EQU) 5-16 5.8.2 Form Constant Byte (FCB) 5-17 5.8.3 Form Double Byte (FDB) 5-17 5.8.4 Originate (ORG) 5-17 5.8.5 Reserve Memory Byte (RMB) 5-17 Assembler Error Messages 5-18 5.10 Using files from Other Assemblers 5-20 CHAPTER ICS05JW SIMULATOR USER INTERFACE
Overview. ICS05JW In-Circuit Simulator 6.2.1 ICS05JW Simulation Speed 6.2.2 System Requirements Running ICS05JW 6.2.3 File Formats Starting ICS05JW ICS05JW Windows Code Windows 6.5.1 Display Code Windows Shortcut Menus 6.5.2 Code Window Shortcut Menu Functions 6.5.3 Code Window Keyboard Commands 6-10 Variables Window 6-10 6.6.1 Display Variables Shortcut Menu 6-11 6.6.2 Variables Window Shortcut Menu Options. 6-11 6.6.3 Variable Window Keyboard Commands. 6-13
More Information This Product, www.freescale.com
705JICSUM/D
CONTENTS
CHAPTER
ICS05JW SIMULATOR USER INTERFACE (continued)
Memory Window. 6-13 Status Window. 6-14 Window. 6-16 6.9.1 Changing Register Values 6-17 6.9.2 Window Keyboard Commands. 6-18 6.10 Chip Window. 6-18 6.10.1 Reading Values Chip Window 6-18 6.10.2 Chip Window Keyboard Commands. 6-19 6.11 Cycles Window. 6-19 6.12 Stack Window. 6-19 6.12.1 Interrupt Stack 6-20 6.12.2 Subroutine Stack. 6-20 6.13 Trace Window 6-21 6.14 Breakpoint Window. 6-21 6.14.1 Breakpoint 6-22 6.14.2 Edit Breakpoint. 6-23 6.14.3 Delete Breakpoint. 6-23 6.14.4 Remove Breakpoints 6-24 6.15 Programmer Windows 6-24 6.16 Register Block Window. 6-25 6.17 Entering Debugging Commands. 6-26 6.18 ICS05JW Toolbar 6-26 6.19 ICS05JW Menus. 6-28 6.20 File Options 6-29 6.20.1 Load File. 6-30 6.20.2 Reload Last S19. 6-30 6.20.3 Play Macro. 6-30 6.20.4 Record Macro 6-31 6.20.5 Stop Macro. 6-31 6.20.6 Open Logfile. 6-32 6.20.7 Close Logfile 6-33 6.20.8 Exit. 6-33
705JICSUM/D
More Information This Product, www.freescale.com
CONTENTS
CHAPTER
ICS05JW SIMULATOR USER INTERFACE (continued)
6.21 ICS05JW Execute Options 6-33 6.21.1 Reset Processor. 6-34 6.21.2 Step 6-34 6.21.3 Multiple Step 6-34 6.21.4 6-35 6.21.5 Stop. 6-35 6.21.6 Repeat Command. 6-35 6.22 ICS05JW Window Options 6-35 6.22.1 Open Windows 6-36 6.22.2 Change Colors 6-36 6.22.3 Reload Desktop. 6-37 6.22.4 Save Desktop 6-37 CHAPTER ICS05JW DEBUGGING COMMAND
Overview. ICS05JW Command Syntax Command Explanations. 7.3.1 Accumulator Value ACC). 7.3.2 Assemble Instructions (ASM) 7.3.3 Sound Bell (BELL) 7-10 7.3.4 Block Fill Memory (BF). 7-11 7.3.5 Instruction Breakpoint (BR). 7-12 7.3.6 Accumulator Breakpoint (BREAKA). 7-14 7.3.7 Stack Pointer Breakpoint (BREAKSP) 7-16 7.3.8 Index Register Breakpoint (BREAKX) 7-18 7.3.9 Set/Clear Carry (C). 7-20 7.3.10 Capture Changed Data (CAPTURE). 7-21 7.3.11 Open/Close Capture File (CAPTUREFILE) 7-22 7.3.12 Condition Code Register (CCR) 7-23 7.3.13 Clear .MAP File (CLEARMAP) 7-24 7.3.14 Clear User Symbols (CLEARSYMBOL) 7-25 7.3.15 Cycles Counter (CYCLES, CY). 7-26 7.3.16 Disassemble Memory (DASM). 7-27 7.3.17 Port Direction Register (DDRA) 7-28 7.3.18 Port Direction Register (DDRB) 7-29
viii
More Information This Product, www.freescale.com
705JICSUM/D
CONTENTS
CHAPTER 7.3.19 7.3.20 7.3.21 7.3.22 7.3.23 7.3.24 7.3.25 7.3.26 7.3.27 7.3.28 7.3.29 7.3.30 7.3.31 7.3.32 7.3.33 7.3.34 7.3.35 7.3.36 7.3.37 7.3.38 7.3.39 7.3.40 7.3.41 7.3.42 7.3.43 7.3.44 7.3.45 7.3.46 7.3.47 7.3.48 7.3.49 7.3.50 7.3.51 7.3.52 7.3.53 7.3.54
ICS05JW DEBUGGING COMMAND (continued)
Dump Memory Screen (DUMP). 7-30 Evaluate Expression (EVAL). 7-31 Exit/Quit Application (EXIT QUIT) 7-32 Begin Program Execution GO). 7-33 Execute Macro after Break (GOMACRO). 7-34 Execute Until Address (GOTIL) 7-35 Execute Cycle Counter Value (GOTOCYCLE). 7-36 Set/Clear Half-Carry 7-37 Open Help (HELP) 7-38 Set/Clear Interrupt Mask 7-39 Display Line Information (INFO). 7-40 Port Inputs (INPUTA). 7-41 Port Inputs (INPUTB) 7-42 Show Port Inputs (INPUTS) 7-43 State (IRQ). 7-44 Turn Step Listing (LISTOFF). 7-45 Turn Step Listing (LISTON) 7-46 Load (LOAD). 7-47 Load Desktop Settings (LOADDESK). 7-48 Load File (LOADMAP) 7-49 Open/Close File (LOGFILE). 7-50 Execute Batch File (MACRO). 7-51 Stop Saving Commands Batch File (ENDMACRO) 7-52 Save Debug Commands Batch File (MACROSTART) 7-53 Display Memory Address (MD). 7-54 Modify Memory (MM) 7-55 Set/Clear Negative (N). 7-56 Remove Breakpoints (NOBR) 7-57 Clear User Symbols (NOSYMBOL) 7-58 Program Counter (PC). 7-59 Change Serial Port (POD) 7-60 Port Output Latches (PORTA) 7-61 Port Output Latches (PORTB). 7-62 Start Programmer (PROGRAM) 7-63 Pick Window 7-63 Status Window. 7-63
705JICSUM/D
More Information This Product, www.freescale.com
CONTENTS
CHAPTER 7.3.55 7.3.56 7.3.57 7.3.58 7.3.59 7.3.60 7.3.61 7.3.62 7.3.63 7.3.64 7.3.65 7.3.66 7.3.67 7.3.68 7.3.69 7.3.70 7.3.71 7.3.72 7.3.73 7.3.74 7.3.75 7.3.76 7.3.77 7.3.78 7.3.79 7.3.80 7.3.81
ICS05JW DEBUGGING COMMAND (CONTINUED)
File Window 7-63 Show Registers (REG) 7-65 Place Comment Batch/Macro File (REM). 7-66 Simulate Processor Reset (RESET). 7-67 Reset Restart (RESETGO) 7-68 Save Desktop Settings (SAVEDESK) 7-69 Display Breakpoint Window (SHOWBREAKS). 7-70 Display Code Address (SHOWCODE). 7-71 Show Information File (SHOWMAP) 7-72 Show Code from Address Value (SHOWPC) 7-73 Display Trace Window (SHOWTRACE). 7-74 Stack Pointer (SP) 7-75 Execute Source Step(s) (SS). 7-76 Execute Single Step(s) (ST, STEP) 7-77 Show Stack Window (STACK) 7-78 Step Forever (STEPFOR). 7-79 Step Until Address (STEPTIL) 7-80 View Create Symbol (SYMBOL) 7-81 Show Available System Memory (SYSINFO) 7-82 Enable/Disable Tracing (TRACE). 7-83 Upload Record Screen (UPLOAD_SREC). 7-84 Display Variable 7-85 Display Software Version (VER). 7-86 Wait Cycles (WAIT) 7-87 Display Symbol Value (WHEREIS) 7-88 Register Value (X). 7-89 Set/Clear Zero (Z). 7-90 CHAPTER EXAMPLE PROJECT
Overview. Setting Sample Project 8.2.1 Setup Environment 8.2.2 Create Source Files 8.2.3 Assemble Project
More Information This Product, www.freescale.com
705JICSUM/D
CONTENTS
APPENDIX
S-RECORD INFORMATION
Overview.A-1 S-Record Content .A-1 S-Record Types .A-2 S-Record Creation .A-3 S-Record Example .A-3 A.5.1 Header Record .A-4 A.5.2 First Record .A-5 A.5.3 Termination Record .A-6 A.5.4 ASCII Characters .A-6 APPENDIX M68HC705JICS IN-CIRCUIT SIMULATOR SUPPORT INFORMATION
Overview.B-1 Functional Description .B-1 B.2.1 Emulator .B-1 B.2.2 Programming .B-2 Troubleshooting Quick Start .B-3 Troubleshooting Programmer .B-5 Logic Diagram Parts List .B-5 Glossary Glossary-1 Index Index-1 FIGURES WinIDE Environment Settings Dialog WinIDE Environment Settings Dialog Assembler/Compiler Tab. M68HC705JICS Circuit Board (Pod). Jumper Headers through Jumper Headers through J14. Jumper Header Factory Configuration. ICS05JW Can't Contact Board Dialog. WinIDE Window Components. WinIDE Status Edit Shortcut Menu.
705JICSUM/D
More Information This Product, www.freescale.com
CONTENTS
FIGURES (continued) 4-10 4-11 4-12 4-13 4-14 4-15 4-16 4-17 4-18 4-19 4-20 4-21 4-22 4-23 4-24 4-25 4-26 4-27 4-28 Marker Sub-menu WinIDE Toolbar File Menu. 4-10 Open File Dialog 4-11 Print Dialog 4-12 Edit Menu 4-13 Environment Menu 4-16 Specify project file open Dialog. 4-17 Specify project file save Dialog 4-17 Environment Settings Dialog General Environment 4-18 Environment Settings Dialog: General Editor 4-20 Environment Settings Dialog: Assembler/Compiler Tab. 4-22 Error Format List 4-25 Environment Settings Dialog: (Debugger) (Programmer) Tabs. 4-26 Setup Fonts Dialog 4-28 Search Menu 4-29 Find Dialog. 4-30 Replace Dialog. 4-31 Line Number Dialog 4-32 Window Menu 4-32 WinIDE with Subordinate Windows Cascaded. 4-33 WinIDE with Subordinate Windows Tiled. 4-33 WinIDE with Source Window Displayed. 4-34 WinIDE Editor with Subordinate Windows Minimized 4-34 Split Pointer Bar. 4-35 WinIDE with CASM05W Assembler Window Displayed Windows Program Item Property Sheet CASM05W Windows Assembler Parameters Can't Contact Board Dialog. ICS05JW Windows Default Positions Code Window Disassembly Mode with Breakpoint Toggled Code Window Shortcut Menu Window Base Address Dialog.
More Information This Product, www.freescale.com
705JICSUM/D
CONTENTS
FIGURES (continued) 6-10 6-11 6-12 6-13 6-14 6-15 6-16 6-17 6-18 6-19 6-20 6-21 6-22 6-23 6-24 6-25 6-26 6-27 6-28 6-29 6-30 6-31 6-32 6-33 6-34 6-35 Variables Window with Shortcut Menu 6-10 Variable Dialog 6-11 Memory Window with Shortcut Menu. 6-13 Status Window. 6-14 Results Entering Command Status Window. 6-15 Specify Output File! Dialog 6-15 Logfile Already Exists Message. 6-16 Window with Shortcut Menu. 6-17 Change Dialog 6-17 Chip Window. 6-18 Cycles Window. 6-19 Stack Window. 6-20 Trace Window 6-21 Breakpoint Window with Shortcut Menu. 6-22 Edit Breakpoint Dialog 6-22 PROG05P9 Programmer Pick Window. 6-24 Programmer Files Window. 6-24 Register Block Window 6-25 WinReg Window with Typical Register File Information 6-25 WinIDE Toolbar 6-26 File Menu. 6-29 Specify File Load Dialog 6-30 Specify MACRO File Execute Dialog. 6-31 Specify MACRO File Record Dialog 6-31 Specify Output File Dialog 6-32 Logfile Already Exists Dialog. 6-32 Sample Output File. 6-33 ICS05JW Execute Menu. 6-34 Window Menu 6-35 Change Window Colors Dialog 6-36 Assembly Window Showing Command 7-10 Modify Memory Dialog. 7-56
705JICSUM/D
More Information This Product, www.freescale.com
xiii
CONTENTS
FIGURES (continued) PROG05P Programmer Pick Window. 7-64 CASM05W Window M68HC705J1 Logic Components (Sheet .B-7 M68HC705J1 Logic Components (Sheet .B-9 TABLES
45-1
M68HC705JICS Specifications. ICS05JW Software Files WinIDE Toolbar Buttons. WinIDE Menus Options Summary. Change Base Prefixes/Suffixes. Assembler Directives Conditional Assembler Directives. 5-10 Listing Directives. 5-13 Listing File Fields 5-14 Pseudo Operations Allowed CASM05W 5-16 Assembler Error Messages 5-18 Base Prefixes Suffixes 6-12 ICS05JW Toolbar Buttons. 6-27 ICS05JW Menus Options Summary. 6-28 Argument Types ICS05JW Command Overview Programming Commands 7-65 S-Record Fields .A-1 S-Record Field Contents.A-2 S-Record Types .A-3 Header Record .A-4 Header Record .A-5 Header Record.A-6 M68HC705JICS Parts List .B-11
More Information This Product, www.freescale.com
705JICSUM/D
INTRODUCTION
CHAPTER INTRODUCTION OVERVIEW
This chapter overview M68HC705JICS In-Circuit Simulator components Quick Start guide setting development project. Motorola M68HC705JICS In-Circuit Simulator development toolkit designers develop debug target systems that incorporate M68HC705JICS Microcontroller Unit (MCU) devices. toolkit contains hardware software need develop simulate source code program Motorola M68HC05J family microcontrollers. Together, M68HC705JICS printed circuit board (pod) ICS05JW software form complete simulator non-real-time emulator simulating, programming, debugging code M68HC705J1 device. When connect your host computer optional target hardware, actual inputs outputs target system during simulation code. also ICS05JW software edit assemble code standalone mode, without input/output. M68HC705JICS toolkit with IBM-Windows Windows 95-based computer with serial port.
705JICSUM/D
More Information This Product, www.freescale.com
INTRODUCTION
TOOLKIT COMPONENTS
complete M68HC705JICS toolkit contains: M68HC705JICS in-circuit simulator pod. sample MC68HC705J1 EPROM MCU. 28-lead header target emulation cable. Windows-optimized software components, collectively referred ICS05JW software, consisting WINIDE.EXE, integrated development environment (IDE) software interface your target system editing performing software incircuit simulation. CASM05W.EXE, CASM05W command-line cross-assembler. ICS05JW.EXE, in-circuit/standalone M68HC705JICS target MCU. Documentation: M68HC705JICS In-Circuit Simulator User's Manual. Technical literature, including Understanding Small Microcontrollers, introductory guide understanding using Motorola MC68HC05 family microcontrollers. simulator software
More Information This Product, www.freescale.com
705JICSUM/D
INTRODUCTION
HARDWARE SOFTWARE REQUIREMENTS
ICS05JW software requires this minimum hardware software configuration: IBM-compatible host computer running Windows Windows operating system. Approximately memory (RAM) free drive space serial port communications between M68HC705JICS host computer.
TOOLKIT FEATURES
M68HC705JICS toolkit low-cost development system that supports in-circuit simulation. features include: Software in-circuit simulation M68HC705J1 Ability program MC68HC705J1 EPROM microcontrollers Communication with host computer serial port ICS05JW software, including editor, assembler, assembly source-level simulator instruction breakpoints SCRIPT command automatic execution sequence commands Emulation cable connection target system On-screen, context-sensitive Windows Help CHIPINFO command: M68HC705JICS memory-map, vector, register, pinout information Software responds both mouse keyboard controls
705JICSUM/D
More Information This Product, www.freescale.com
INTRODUCTION
SPECIFICATIONS
Table summarizes M68HC705JICS hardware specifications. Table 1-1. M68HC705JICS Specifications
Characteristic Temperature: Operating Storage Specification +25°C -40° +85° (non-condensing) +9Vdc (maximum) (from included wall transformer)
Relative humidity Power requirement Dimensions
ABOUT THIS USER'S MANUAL
This manual covers ICS05JW software, hardware, reference information follows: Chapter Installation Chapter Loading Initializing ICS05JW Software Chapter WinIDE User Interface Chapter ICS05JW In-Circuit Simulator User Interface Chapter CASM05W Assembler Chapter ICS05JW Debugging Command Chapter Example Project Appendix S-Record Information Appendix ICS05JW Support Information Glossary Index
More Information This Product, www.freescale.com
705JICSUM/D
INTRODUCTION
NOTE procedural instructions this user's manual assume that familiar with Windows interface selection procedures. Figures this manual show ICS05JW windows dialog boxes they appear Windows environment.
QUICK START INSTRUCTIONS
following instructions summarize hardware software installation instructions Chapters experienced installing Motorola other development tools, follow these steps: Install ICS05JW software: follow instructions diskette label ICS05JW Setup program. During installation, follow instructions installation wizard: choose Typical Install option install files your hard disk, choose Compact Install option copy files onto another diskette. Connect M68HC705JICS pod: connect M68HC705JICS host computer's serial port using included cable. Plug cable into connector. Supply power M68HC705JICS pod: connect wall-mounted transformer's circular connector connector left side pod, next serial connector. Turn switch apply power pod. Start ICS05JW simulator test connection: Double click ICS05JW icon. Status Window command line, enter command using port which connected argument. message will tell status connection between host computer's communication port pod. Start WinIDE software open project files: Double click WinIDE icon. From WinIDE Environment menu, choose Open Project option, choose project file from Specify project file open dialog. project file exists, choose option from File menu create project file. Paragraph gives additional information about setting sample project.
705JICSUM/D
More Information This Product, www.freescale.com
INTRODUCTION
Configure environment ICS05JW software components: from WinIDE Environment menu, choose Setup Environment option open Environment Settings dialog make following changes: Click EXE1 Debugger bring (Figure 1-1) front. executable type, path filename, command line options (including optional switches, filenames, port settings), other options ICS05JW simulator software.
Figure 1-1. WinIDE Environment Settings Dialog EXE1 Click Assembler/Compiler label bring (Figure 1-2) front. executable path filename, type, other options CASM05W other) assembler software. necessary, change programmer settings EXE2 (Programmer) tab. Click General Environment General Editor tabs make changes each necessary. When have specified environment settings, press button save changes WINIDE.INI file close Environment Settings dialog.
More Information This Product, www.freescale.com
705JICSUM/D
INTRODUCTION
Figure 1-2. WinIDE Environment Settings Dialog Assembler/Compiler Create project file: desktop environment settings make Environment Settings dialog stored WINIDE.INI file read each time start WinIDE editor. also choose save project-specific desktop environment settings project file (*.PPF) which read when open project, allowing save general environment well custom environments individual projects. create project file: Specify project-specific desktop environment settings WinIDE editor. Choose Save Project option from WinIDE Environment menu name save project directory folder. ICS05JW simulator: With project source file open WinIDE main window, click Debugger (EXE1) button WinIDE toolbar move ICS05JW simulator debug contents active source window. Additional information about ICS05JW simulator found Chapter Assemble code: Press Assemble/Compile File button WinIDE toolbar assemble source code active WinIDE window. Additional information about CASM05W assembler found Chapter
experience problems with Quick Start procedures, refer paragraph troubleshooting instructions.
705JICSUM/D
More Information This Product, www.freescale.com
INTRODUCTION
More Information This Product, www.freescale.com
705JICSUM/D
INSTALLATION
CHAPTER INSTALLATION OVERVIEW
This chapter explains install hardware components ICS05JW your host computer both interactive standalone modes.
INSTALLING M68HC705JICS
When M68HC705JICS (Figure 2-1) connected serial port host computer, actual inputs outputs your target system during simulation your source code. When connected host computer, ICS05JW simulator software standalone simulator/debugger. M68HC705JICS single printed circuit board. Before beginning install pod, locate these components: 9-pin RS-232 serial connector 9-volt Input Circular connector 20-pin socket Power switch Programming (VPP) Power Switch Microprocessor Reset Switch
705JICSUM/D
More Information This Product, www.freescale.com
INSTALLATION
LED1
Figure 2-1. M68HC705JICS Circuit Board (Pod) connect host computer: Connect your host computer using serial cable connect connector host computer's serial port. host computer's serial port requires 25-pin connector, 25-pin adapter between serial port cable. Plug round output connector 120Vac-to-9Vdc wall-plug transformer into connector supply operating power pod. connect target system: Connect 20-lead header cable between socket 20-pin socket target system. When connect JICS your target system power target system provides inputs accepts outputs from ICS05JW software. RESET lines also interact with ICS05JW software. When execute command, simulator does real time, because host computer simulator. Note position power switch programming (VPP) power switch reset switch Switch experimenting with line. NOTE press switch unless ICS05JW software prompts
More Information This Product, www.freescale.com
705JICSUM/D
INSTALLATION
Jumper header enables switch fabricated jumper header connects switch MCU. disconnect switch remove jumper from header. Jumper header enables LED1. fabricated jumper this header connects LED1 MCU. disconnect LED1, remove jumper from this header. Jumper headers through (Figure 2-2) compensating pull-downs port pins. M68HC705JICS uses MC68HSC705C9A emulate MC705HCJ1 MCU. Unlike MC705HCJ1, MC68HSC705C9A does have programmable pull-downs. Jumper headers through compensate manually: fabricated jumper these headers connects corresponding port pull-down resistor, pulling signal low.
Figure 2-2. Jumper Headers through Jumper headers through (Figure 2-3) compensating pull-downs port pins. Fabricated jumpers these headers have same function jumpers headers through apply port pins instead port pins.
Figure 2-3. Jumper Headers through Jumper header sets baud rate communication with host computer. Figure shows factory configuration: fabricated jumper between pins selects 115.2 kilohertz. 115.2k 19.2k
Figure 2-4. Jumper Header Factory Configuration
705JICSUM/D
More Information This Product, www.freescale.com
INSTALLATION
change alternative rate 19.2 kilohertz: Position jumper between pins Press switch reset pod. WinIDE Environment Settings dialog EXE1 (Debugger) tab, include /b19200 parameter value Path textbox choose /b19200 option when ICS05JW starts information about entering executable path parameters, paragraph 4.10.5.4.
More Information This Product, www.freescale.com
705JICSUM/D
INSTALLING INITIALIZING ICS05JW SOFTWARE
CHAPTER INSTALLING INITIALIZING ICS05JW SOFTWARE OVERVIEW
This chapter install initialize ICS05JW software.
ICS05JW SOFTWARE COMPONENTS
ICS05JW software consists following components: WINIDE.EXE: Windows Integrated Development Environment editor CASM05W.EXE: 68HC05 Cross Assembler ICS05JW.EXE: in-circuit Simulator, optimized HC05J-family Motorola microcontrollers
3.2.1
WinIDE
WinIDE editor text editing application that lets several different programs from within single development environment. WinIDE editor edit source code, launch variety compatible assemblers, compilers, debuggers, programmers, configure environment read display errors from such programs. select error detection options Environment Settings dialog, WinIDE editor will highlight errors source code, display error messages from compiler assembler editor. debug source code WinIDE code window, load compatible source-level files. configure CASM05W produce such files output. Because WinIDE editor modular, may, example, choose substitute third party C-compiler other assembler CASM05W cross assembler provided toolkit.
705JICSUM/D
More Information This Product, www.freescale.com
INSTALLING INITIALIZING ICS05JW SOFTWARE
3.2.2
CASM05W
CASM05W cross assembler that creates Motorola object files files from assembly files containing 68HC05 instructions. CASM05W assembler same functionality version assembler, been optimized take advantage Windows graphical environment. Using assembler conjunction with WinIDE editor, edit standard ASCII files (such .ASM assembly files), menu options toolbar buttons call other customized assemblers, compilers, debuggers. resulting environment lets assemble files, download test them, without leaving WinIDE editing environment.
Paragraph gives additional information about assembler options them. 3.2.3 ICS05JW
ICS05JW simulator HC705J1 microcontroller that inputs outputs (I/O) device when external M68HC705JICS attached host computer. want from your target board, attach your board through extension cable that comes with toolkit. also program HC05J1 device using M68HC705JICS ICS05JW simulator software. start move ICS05JW in-circuit simulator software from WinIDE editor. ICS05JW software also started using standard Windows techniques independently WinIDE editor. ICS05JW simulator accepts standard Motorola object code files input object code simulation debugging. using third party assembly- C-language compiler, compiler must capable producing source-level files allow source-level debugging.
More Information This Product, www.freescale.com
705JICSUM/D
INSTALLING INITIALIZING ICS05JW SOFTWARE
INSTALLING ICS05JW SOFTWARE
ICS05JW software contained single diskette containing setup program that automatically installs software your hard drive. 3.3.1 Install ICS05JW Software
install software your host computer's hard drive: Insert ICS05JW diskette into 3.5-inch disk drive. Windows 3.x: Program Manager, select from File menu. Windows from Start Menu, select option. dialog, enter Setup click Browse button select different drive and/or directory) press ICS05JW Microsoft Setup Wizard, follow instructions that appear screen. NOTE Setup wizard, select Typical Installation option install files your hard disk, choose Compact Installation option copy files another diskette. Table describes system files directories required control ICS05JW system. Table ICS05JW Software Files
Directory Casmw ICS05JW WinIDE Filename casm05w.exe ics05jw.exe winide.exe Winide.hlp Description Windows Cross Assembler 68HC05 Windows In-Circuit Simulator Windows integrated Development Environment (WinIDE) program file Help WinIDE
705JICSUM/D
More Information This Product, www.freescale.com
INSTALLING INITIALIZING ICS05JW SOFTWARE
3.3.2
Start ICS05JW Software
Depending operating system using, choose appropriate method starting WinIDE software: From Windows Program Manager, double-click WinIDE and/or ICS05JW icon(s). From Windows Start Menu, select WinIDE and/or ICS05JW icon(s).
start ICS05JW simulator alone from within WinIDE.
3.3.3
Communication
When double-click ICS05JW icon, software attempts communicate with using specified port, baud rate, default parameters. When software connects pod, Status contains message, Contact with established. installed, ICS05JW software cannot establish communications with through specified port, Can't Contact Board dialog appears (Figure 3-1), with options changing port baud rate retrying connection, choosing simulator standalone mode (with input output from pod).
Figure 3-1. ICS05JW Can't Contact Board Dialog receive communication error messages, reduce baud rate host computer. communication errors persist, exit from ICS05JW simulator disable disk caching (SMARTDRV.EXE) host computer. NOTE port assignment defaults unless specify another port startup command.
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
CHAPTER WinIDE USER INTERFACE OVERVIEW
This chapter overview WinIDE windows, menus, toolbars, dialogs, options, procedures using each.
WINDOWS INTEGRATED DEVELOPMENT ENVIRONMENT
Windows Integrated Development Environment (the WinIDE editor) graphical interface editing, compiling, assembling, debugging source code embedded systems using In-Circuit Simulator ICS05JW. WinIDE interface consists standard Windows title menu bars, WinIDE toolbar, main window (containing open source project file windows), status bar. WinIDE window components labeled Figure described paragraph 4.3.2.
Title Menu Toolbar Source Windows
Main Window Status
Figure 4-1. WinIDE Window Components
705JICSUM/D
More Information This Product, www.freescale.com
WinIDE USER INTERFACE
WinIDE WINDOWS
4.3.1 Main Window Functions
When first start WinIDE editor, main window opens without source project files. open create source files project, they appear subordinate windows main window. move, size, arrange subordinate windows using standard Windows techniques WinIDE Window menu options. WinIDE main window
4.3.2
Open, create, edit, save, print source (*.ASM, *.LST, *.MAP, *.S19) project (*.PPF) file. Configure desktop environment settings editor, assembler, compiler, debugger, other programs. Launch in-circuit simulator, compiler, debugger, another program.
Main Window Components
Figure shows WinIDE main window might look during typical editing project, labels standard window components: Title Bar: title appears edge main window contains: application title name target microcomputer application which editing source code object file files, (usually truncated) Windows control buttons closing, minimizing maximizing window Menu Bar: menu appears immediately below title contains names WinIDE menus. Toolbar: WinIDE toolbar appears just below menu contains shortcut buttons frequently used menu options. Main Window: main window area inside portion main window which contains open subordinate windows that resize, reposition, minimize, maximize using standard Windows techniques Window menu options.
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
Status Bar: status (Figure 4-2) appears along bottom edge main window contains number fields (depending project) that show Source-file line column numbers blinking insertion point cursor System status progress current window; example, when window edited, status will Modified Total number lines active window Top: current line position file active window Bytes: displays total number bytes active window
Insert/Overwrite mode: indicates current typing mode status fields expand contract client area contents change files become active.
Figure 4-2. WinIDE Status
GETTING STARTED
4.4.1 Prerequisites Starting WinIDE Editor
Before start WinIDE editor, Windows operating environment must running ICS05JW software must installed host computer. Remember also, that ICS05JW simulation mode, asynchronous communications cable must connect M68HC705JICS platform board host computer, power M68HC705JICS must 4.4.2 Start WinIDE Editor
start editor, select WinIDE icon double-clicking ICS05JW Program Group icon Windows Program Manager selecting icon from Windows Start menu.
705JICSUM/D
More Information This Product, www.freescale.com
WinIDE USER INTERFACE
4.4.3
Open Source Files
When WinIDE editor opens, main window empty. build environment your project, choose Open option from File menu click File button WinIDE toolbar). Open File dialog, choose files that will make your project: Select drive containing files from Drives list. Select directory folder containing files from Folders list. Filename text specify filename wildcard extension filter list filenames choose file type from List files type list). default file type .ASM, also choose: source code files) *.lst (listing files) *.txt (text files) (all files) When project files have been selected, click button open files WinIDE main window. 4.4.4 Navigate WinIDE Editor
navigate among subordinate windows: navigate among several sub-windows which your project files displayed WinIDE main window: Choose subordinate window's filename from Window menu click file's title bring front cascaded stack. have large screen project files, choose Tile option from Window menu sub-windows that visible, choose Cascade option arrange windows that only window entirely visible. Regardless arrange windows, title windows visible.
move between WinIDE editor ICS05JW simulator: From WinIDE editor, click External Program toolbar button switch in-circuit simulator application which have specified debugger other external program use. From ICS05JW, click Back Editor toolbar button editor. toggle back
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
4.4.5
Using Markers
Markers provide convenient mark multiple points file navigating between frequently visited locations while editing. many markers source files WinIDE editor. marker appears file small button labeled with marker number. When save project, WinIDE editor saves markers open edit files well, that when open project again, markers still set. marker anywhere file:
Place cursor line where want marker Press CNTL SHIFT where value from indicating marker number. marker appears left line. move marker, press CNTL where denotes marker number between This feature useful editing large file. Markers also set, changed, navigated cleared using options Edit shortcut menu (Figure 4-3). Open Edit shortcut menu clicking right mouse button edit window.
Figure 4-3. Edit Shortcut Menu clear marker using Edit shortcut menu options: With cursor editing window, click right mouse button open shortcut menu. Position cursor line where marker should appear. Click right mouse button display shortcut menu. Click Toggle Marker option open list markers. Click once marker toggle. When marker number checked, toggled when marker number unchecked, toggled off.
705JICSUM/D
More Information This Product, www.freescale.com
WinIDE USER INTERFACE
move marker number using shortcut menu options: With cursor anywhere edit file, click right mouse button open Edit shortcut menu Click Marker option open Marker sub-menu (Figure 4-4), choose marker number move
Figure 4-4. Marker Sub-menu execute many ICS05JW menu options using either keyboard commands toolbar buttons. example, move marker, press Ctrl Shift combination, where marker number).
COMMAND LINE PARAMETERS
WinIDE editor lets specify command line options pass each executable program. name currently edited file, some derivative thereof, passed within these options. pass current filename, specify parameter %FILE%. WinIDE editor will substitute this string with current filename execution time. also change extension passed filename, specifying within %FILE% parameter. example, specify .S19 extension current filename user would specify %FILE.S19% parameter. example, current filename being edited MYPDA.ASM:
Parameters specified %FILE% %FILE.S19% Parameters passed program MYPDA.ASM MYPDA.S19
Although default currently edited filename that used %FILE% parameter substitution, environment configured always pass same filename. this checking Main File option Environment Settings dialog's General Options tab. This technique useful want pass specific filename external program without regard what being edited.
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
WinIDE TOOLBAR
WinIDE Toolbar (Figure 4-5) provides number convenient shortcut buttons that duplicate function most frequently used menu options. tooltip label pops when mouse button lingers over toolbar button, identifying button's function.
Figure 4-5. WinIDE Toolbar
Table identifies describes WinIDE toolbar buttons. Table 4-1. WinIDE Toolbar Buttons
Icon Button Label External Program (Debugger) Button Function Call External Program (Debugger ICS) specified Environment Settings dialog's (Debugger) tab; this could debugger default), other external program, i.e., third party assembler, debugger, compiler. Call External Program specified Environment Settings dialog's (Programmer) Assemble compile active source window selected text from active source window (this button shortcut Edit menu option). Copy selected text active source window Windows clipboard (this button shortcut Edit Copy menu option). Paste contents Windows clipboard insertion-point location active source window (this button shortcut Edit Paste menu option). Close active source window (this button shortcut File Open menu option). Save file active source window (this button shortcut File Save menu option). Save active project (this button shortcut Environment Save Project menu option). Close active source window (this button shortcut File Close menu option).
External Program Assemble/Compile File Copy
Paste
Open File Save File Save Project (All Files Setup) Close File
705JICSUM/D
More Information This Product, www.freescale.com
WinIDE USER INTERFACE
WinIDE MENUS
Table summarizes WinIDE menu titles options. Table 4-2. WinIDE Menus Options Summary
Menu Title File Option File Open File Description Open file window ("No name") Display Open File dialog choose file open Save current file Open Save dialog choose directory filename which save current file Close current file Open Print dialog print current file Open Print Setup dialog choose printer options Close WinIDE editor Undo last action Redo last action selection clipboard Copy selection clipboard Paste contents clipboard Delete selection Select text current window
Save File Save File Close File Print Print Setup. Exit Edit Undo Redo Copy Paste Delete Select
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
Table 4-2. WinIDE Menus Options Summary (Continued)
Menu Title Environment Option Open Project Save Project Save Project Close/New Project Description Open Specify Project File Open dialog Save current project Open Specify Project File Save dialog Close current project file open project file current file Open Environment Settings dialog change settings for: General Environment General Editor Environment Settings Debugger Settings Open Font dialog specify font options text current file Open Find dialog enter search string Open Replace dialog enter search replacement string next occurrence search string Open Line Number dialog enter line number current file Cascade open windows with active window Tile open windows with active window Arrange minimized window icons along bottom edge main window Minimize open windows Toggle split window active file Itemize open minimized windows name order opening Opens WinIDE Help Contents Page Help File Displays WinIDE About Window
Setup
Setup Font Search Find Replace Find Next Line Window Cascade Tile Arrange Icons Minimize Split Windows name) Help Contents About
705JICSUM/D
More Information This Product, www.freescale.com
WinIDE USER INTERFACE
WinIDE FILE OPTIONS
This section describes WinIDE File menu options managing printing source files exiting WinIDE editor select File option, click once File menu title open File menu (Figure 4-6). Click option perform operation. also accelerator shortcut keystrokes execute option.
Figure 4-6. File Menu
4.8.1
File
Choose File from File menu open client window WinIDE main window. title window title defaults [NONAME#], where reflects number source windows created during this session. there active project, project name appears title bar. there project, Project] precedes window name. this window enter source code. When save contents this window, WinIDE editor prompts filename. This filename replaces [NONAME#] title bar. Alternatives: Type Ctrl click toolbar button. This keyboard equivalent choosing File File menu option. 4.8.2 Open File
Choose Open File from File menu open Open File dialog (Figure 4-7) choose existing filename, file type, directory, network applicable) open. Each file opens client window within main WinIDE window.
4-10
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
Figure 4-7. Open File Dialog Alternatives: Type Ctrl click Open button toolbar. This keyboard equivalent choosing File Open File menu option. 4.8.3 Save File
Choose Save File from File menu save file active source window. saving file first time (that been named), Save dialog appears. Enter filename file accept current file type, directory folder, drive, choose options. Press button save file selected drive/directory. file been saved previously (and name), file saved with filename, directory drive previously specified, source window remains open.
Alternatives: Type Ctrl click Save button toolbar. This keyboard equivalent choosing File Save File menu option. 4.8.4 Save File
Choose Save File from File menu save contents active source window assign filename. Save dialog opens. Enter file name File Name field click button save file return source window. save file with name existing file, select filename File Name list, click button. confirmation dialog will confirm that want overwrite existing file.
705JICSUM/D
More Information This Product, www.freescale.com
4-11
WinIDE USER INTERFACE
4.8.5
Close File
Choose Close File from File menu close file active source window. chose Give user option save each file option General Environment Environment Settings dialog, Information dialog will display, reminding save changes .ASM file. Alternatives: Type Ctrl click Close toolbar button. This keyboard equivalent choosing File Close File menu option.
4.8.6
Print
Choose Print from File menu open Print dialog (Figure 4-8) choose options printing active source window. Print dialog your operating system printer capabilities opens choose Print range, Print quality, open Print Setup dialog change printer settings.
Figure 4-8. Print Dialog NOTE Print option active when least source window open. WinIDE editor disables option window open. 4.8.7 Print Setup
Choose Print Setup option from File menu open Print Setup dialog your operating system printer. this dialog choose printer, page orientation, paper size, other options your printer.
4-12
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
4.8.8
Exit
Choose Exit option from File menu close editor. project source window open, editor closes files exits. Alternatives: Type This keyboard equivalent choosing File Exit menu option.
WinIDE EDIT OPTIONS
This section describes WinIDE Edit menu options creating editing source file contents. perform Edit operation, click once Edit menu title open Edit menu (Figure 4-9). Click option perform operation.
Figure 4-9. Edit Menu 4.9.1 Undo
Choose Undo undo reverse last action change made active source window. Changes that make contents window (and that undoable reversible) saved undo stack, where they accumulate, maximum instances. reverse your changes descending order sequence which they were made. more changes remain stack, Undo option disabled. Reversible actions local each source window. Commands that reversible contribute undo stack. cannot, example, undo command open window using Undo command. Alternatives: Type Ctrl This keyboard equivalent selecting Edit Undo menu option.
705JICSUM/D
More Information This Product, www.freescale.com
4-13
WinIDE USER INTERFACE
4.9.2
Redo
Choose Redo restore most recently undone action active window. Redo option restores actions undone reversed Undo option, ascending order, that last action first. Reversible changes window's contents accumulate window's undo stack. Once change been reversed using Undo option, change reversed, using Redo option When more changes remain (that Redo stack reached) Redo option disabled. Some commands reversible: they contribute undo stack therefore cannot redone. instance, since reversible actions local each source window, opening window action that cannot undone using Undo command, redone using Redo command. NOTE Redo option active only have used Undo option modify contents active source window. Alternative: Type Shift Ctrl This keyboard equivalent selecting Edit Redo menu option. 4.9.3
Choose from Edit menu currently selected text from active source window place system clipboard. NOTE option active only when have selected text active source window. Alternative: Type Ctrl This keyboard equivalent selecting Edit menu option.
4-14
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
4.9.4
Copy
Choose Copy from Edit menu copy selected text from active source window Windows clipboard. NOTE Copy option available only have selected text active source window. Alternatives: Type Ctrl click Copy toolbar button. This keyboard equivalent selecting Edit Copy menu option.
4.9.5
Paste
Choose Paste from Edit menu paste contents Windows clipboard into active source window insertion-point location. Alternatives: Type Ctrl click Paste button toolbar. This keyboard equivalent selecting Edit Paste menu option. 4.9.6 Delete
Choose Delete from Edit menu delete selected text from active source window without placing Windows clipboard. Text delete using Delete option restored only using Undo option. Alternatives: Press Delete key. This keyboard equivalent selecting Edit Delete menu option. 4.9.7 Select
Choose Select from Edit menu select text active source window.
705JICSUM/D
More Information This Product, www.freescale.com
4-15
WinIDE USER INTERFACE
4.10
WinIDE ENVIRONMENT OPTIONS
This section describes WinIDE Environment menu options managing project information, setting environment font settings project. Environment settings represent current environment configuration information WinIDE editor. These settings stored WINIDE.INI file, from which they loaded each time start editor, saved each time exit from editor. When start editor, application opens WINIDE.INI file reads project information. there open project, project file's environment settings read used instead. This lets have different environment configurations different projects. Environment information stored WINIDE.INI file includes: project open, name Current font information Current source directory project directory paths preferences options Environment Settings dialog tabs, including: General Environment options General Editor options Executable options assembler, debugger, compiler, programmer choose environment option, click once Environment menu title (Figure 4-10) open menu. Click option execute.
Figure 4-10. Environment Menu Project files have extension .PPF; they store kinds information: Environment Settings: User settings WinIDE configuration parameters Desktop Information: Open edit windows, size location, markers
4-16
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
4.10.1
Open Project
Choose Open Project from Environment menu choose project file Specify project file open dialog (Figure 4-11).
Figure 4-11. Specify project file open Dialog Enter project name File name: text select project name from list below. Press button open project file press Cancel button close dialog without opening file). 4.10.2 Save Project
Choose Save Project from Environment menu save current project currently specified file pathname. 4.10.3 Save Project
Choose Save Project from Environment menu display Specify project file save dialog (Figure 4-12).
Figure 4-12. Specify project file save Dialog Enter project name File name: text select project name from list below. Press button open project file press Cancel button close dialog without opening file).
705JICSUM/D
More Information This Product, www.freescale.com
4-17
WinIDE USER INTERFACE
4.10.4
Close/New Project
Choose Close/New Project from Environment menu 4.10.5 Close active current project file Open project Setup Environment
Choose Setup Environment from Environment menu display Environment Settings dialog box. Environment Settings dialog contains five tabs: General Environment General Editor Assembler/Compiler (Debugger) (Programmer)
Environment Settings tabs, choose options marking option buttons (sometimes called radio buttons), check boxes, entering information text boxes. 4.10.5.1 General Environment
Click General Environment Environment Settings dialog (Figure 4-13) change options saving project files, exiting WinIDE editor, storing filename passed external program parameter.
Figure 4-13. Environment Settings Dialog General Environment
4-18
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
NOTE Clicking button saves changes made Environment Settings dialog closes dialog. General Environment offers these options: Upon Exiting WinIDE Editor Auto-Save Current Project: Select this option save currently open project automatically, with file extension .PPF, without prompting. editor saves currently open files with current project. select this option, editor prompts save open project when exit. This setting only effect project open when exit. Auto-Save Files: Select this option save open editor files automatically, without prompting, when exit. select this option, editor will prompt save open files when exit. user "Exit Application?" Select this option display Exit Application confirmation message when exit. select this option, editor will close without asking confirmation when choose Exit option from File menu. Saving Project Also save open editor files: Select this option save open editor files whenever save project file. select this option, project/environment information written project files, editor files saved when choose Save Project option from Environment menu. %FILE% Parameter passed executable programs %FILE% parameter specifies what passed command line place %FILE% string. specify %FILE% string command line parameter executable programs launched from within WinIDE editor. Currently edited filename: Select this option name current active file (the window with focus) %FILE% parameter substitution. Main Filename: Select this option filename Main filename edit %FILE% parameter substitution. NOTE using include files, must enter full pathname file containing included files Main filename edit box.
705JICSUM/D
More Information This Product, www.freescale.com
4-19
WinIDE USER INTERFACE
Modified files exist just prior external program execution: executable programs which launch from WinIDE editor offer option save open editor files before executable launched. Give user option save each file: Select this option want prompted save each modified file before external program launched. select this option, external program runs without asking your confirmation. result that external program runs while modified files exist editing environment, circumstance that undesirable lead incorrect results.
4.10.5.2
General Editor
Click General Editor Environment Settings dialog (Figure 4-14) bring General Editor front. General Editor change editing options such indentation, word wrap, settings. NOTE: change font options, choose Setup Font option from Environment menu.
Figure 4-14. Environment Settings Dialog: General Editor
4-20
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
General Options Auto-Indentation: Select this option place cursor column first non-space character previous line when Enter pressed. this option checked, cursor goes first column. example, current line begins with spaces, pressing Enter will begin next line with spaces, aligning line under first text previous line. Create Backup: Select this option create backup file whenever file saved. WinIDE editor will copy current disk version file (the last save) file same name with .BAK extension, then save current edited copy over editing filename. default (and recommended) setting this option giving option return review previous version file. select this option, currently edited file will saved, backup will made.
Word Wrap Wrap Window: Select this option have cursor wrap left when reaches right side window. This lets text file, without scrolling line. select this option, text wraps only when press Enter key. Wrap Column: Select this option wrap text left side when cursor reaches specified column. This lets text file, without scrolling line. column number which text wrapping should occur edit right this option. Word Wrap OFF: Select this option turn text wrapping off. view edit text, which does horizontally window, scroll controls. general, this option should when writing editing code.
Settings Fixed Tabs: Select this option spaces emulate tabs: pressing inserts number spaces bring cursor position next stop. Changing size affects only future spacings. Past tabs remain unchanged. Real Tabs: Select this option actual characters: pressing insets character. character displayed number spaces determined size, really character. Changing size affects display tabs file, present future.
705JICSUM/D
More Information This Product, www.freescale.com
4-21
WinIDE USER INTERFACE
Smart Tabs: Select this option enable smart tabs: previous line contains text, pressing advances cursor same column beginning next character group previous line. previous line does contain text, smart tabs behave fixed tabs. Size: Enter number spaces tab. This setting affects tabs operate: fixed, real, smart tabs. This number default display size characters, size spaces both fixed smart modes. size stops N+1, 2N+1, 3N+1,
4.10.5.3
Assembler/Compiler
addition running external compiler, need other external programs such third party programmers, debuggers, simulators. WinIDE editor lets configure many three external programs: general-purpose programs compiler. settings Assembler/Compiler WinIDE Environment Settings dialog external programs Click Assembler/Compiler heading Environment Settings dialog (Figure 4-15) bring front. options this change settings parameters assembler compiler path type, specify output, listing, assembly preferences. Path: Enter full path executable name compiler text box. extensions EXE/COM/BAT legal. executable BATch file, want create file prevent screen from changing video modes when executable runs.
Figure 4-15. Environment Settings Dialog: Assembler/Compiler
4-22
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
Type: Click downward-pointing arrow right Type list display compiler types. Click compiler type select options Assembler/Compiler change according compiler type chosen: select compiler, number compiler options available. select non-P&E compiler, options lets specify parameters pass compiler.
Output Control: These options specify output files that assembler will create: Output Object: Select this option have assembler output object file. object file contains compiled instructions from program assembled. output file same name assembly file, with .S19 extension. Appendix gives more information about file format. Output Debug File: Select this option have assembler produce debug .MAP file. debug .MAP file contains symbol information well line number information source level debugging from program assembled. output debug file same name assembly file, with .MAP extension. Output Listing File: Select this option have assembler produce listing file. listing file shows source code well object codes that were produced from assembler. Listing files useful debugging, they exactly where code assembled. output listing file same name assembly file, with .LST extension.
Listing Options: following options specify assembler generates listing file. Show Cycles Listing: Select this option include cycle information each compiled instruction listing (.LST) file. View cycle information long each instruction takes execute. cycle count appears right address, enclosed brackets. Expand Includes Listing: Select this option expand include files into current listing file. This lets view source files main listing file. this option checked, will only $Include statement each included file, source file. Expand Macros Listing: Select this option expand macros into listing file: each time macro used, listing will show instructions comprising macro. select this option, only macro name, instructions.
705JICSUM/D
More Information This Product, www.freescale.com
4-23
WinIDE USER INTERFACE
Assembly Preferences Show Assembler Progress: Select this option display popup window showing current assembly status, including: pass assembler currently file that currently being assembled line that currently being assembled
this option checked, must wait assembly result displayed status bottom environment window.
Wait Assembler Result: Select this option Show Assembler Progress option cause progress window displaying assembly result stay when assembly done. assembly result window will remain until dismiss clicking button. general, select this option, assembler results shown status bottom WinIDE window. Save files before Assembling: Select this option save open files disk before assembler. This important because assembler/compiler reads file compiled from disk, from open windows WinIDE editor. save file before assembling assembler will assemble last saved version. general, should leave this option checked. Sound Bell Error: Select this option have assembler beep encounters error. Other Assembler/Compiler: choose Other Assembler/ Compiler from Type list, WinIDE editor offers these additional options: Options: Enter options pass compiler command line. Such options generally consist switches that instruct compiler, filename. Enter %FILE% string command line insert either current filename filename specified Main Filename option Path text General Environment options (Figure 4-13). Confirm command line: Select this option display window describing executable want run, parameters that want pass executable, just before assembler/compiler run. This gives option cancel assemble/compile, continue described, modify parameters before continue with assembly. select this option, assembler/compiler runs without prompting confirm parameters.
4-24
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
Recover Error from Compiler: Select this option have WinIDE editor attempt recover error/success information from assembler/compiler, open file with error line highlighted (and displayed status bar) when error encountered. this feature work, Error Filename Error Format options must also this tab. this option checked, WinIDE editor will look compiler result will display results status bar. Wait compiler finish: Select this option have WinIDE editor disable itself until compiler terminates. must select this option editor attempt recover error/success information from assembler/ compiler. Further, turning this option prevents from running external programs from editor that require compilation assembly results. select this option, editor starts assembler/compiler, continues, letting Windows' multitasking capabilities take care program. Save files before Assembling: Select this option save open files disk before running assembler. This very important since assembler/compiler reads file compiled from disk from memory WinIDE editor. file being assembled isn't saved, assembler compiler will assemble last saved version. this reason, should leave this option checked. Error Format: Click down arrow right Error Format list display list error formats (Figure 4-16). WinIDE editor attempt read back error from compiler, must understand error syntax. This option lets select error format from list supported formats. Recover Error from compiler option checked, filename specified Error Filename text found, editor parses that file from beginning looking error. editor finds error, opens file, highlights error line, displays error status bar.
Figure 4-16. Error Format List
705JICSUM/D
More Information This Product, www.freescale.com
4-25
WinIDE USER INTERFACE
Error Filename: Enter filename which editor pipes compiler/assembler error output. Some compilers provide switch piping error output file; others require that handle this manually. most compilers DOS-based, create batch file into which pipe output. example:
COMPILER OPTIONS ERROR.TXT
This batch file creates file ERROR.TXT sends assembler/compiler output that file. Most C-compilers require batch file compiler through various steps (compiling, linking), which pipe error output. Once environment reads this error file, WinIDE editor displays results, deletes error file. want keep copy file, must such instructions batch file. 4.10.5.4 Executable (Debugger) Executable (Programmer) Tabs Choose either (Debugger) (Programmer) (Figure 4-17) Environment Settings dialog bring either front. Enter options general-purpose external programs, example, ICS05JW, that will using with this project.
Figure 4-17. Environment Settings Dialog: (Debugger) (Programmer) Tabs NOTE options same both EXE1 (Debugger) EXE2 (Programmer) tabs.
4-26
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
Type: Enter description executable type Type text box. This string will appear other parts WinIDE editor. default Executable Debugger. ICS05JW, choose change Type ICS. This will change label this elsewhere dialog. Path: Enter full path executable name Executable Path text box. executable name have EXE, COM, extension. DOS-based executable batch file, choose create file prevent screen from changing video modes when file run.
Options: Enter options want pass executable command line Options text box. general, options will consist switches that instruct executable from command line. filename using %FILE% string. %FILE% string inserts either currently active filename, filename specified %FILE% parameter, %FILE% parameters pass external programs field General Environment tab. Confirm Command line before running: Select this option display window describing executable parameters which will passed, just before assembler/compiler run. This gives option cancel assemble/compile, continue described, modify parameters before continuing. select this option, assembler/compiler will without prompting confirm parameters. Save files before running: Select this option save open files disk before running executable. This important since external programs that must read edit file read only last version saved disk. general, always select this option. Wait program completion: Select this option have WinIDE editor disable itself until executable terminates. select this option, editor starts compiler, allows Windows manage program.
705JICSUM/D
More Information This Product, www.freescale.com
4-27
WinIDE USER INTERFACE
4.10.6
Setup Fonts
Select Setup Fonts option Environment menu open Setup Fonts dialog (Figure 4-18) change font options editor.
Figure 4-18. Setup Fonts Dialog Font: Font text displays name current font. change current font, select another font name from Font list. scroll arrows necessary view font choices. Font Style: Font Style text displays name current font style. change current font style, select another font style name from Front Style list. Size: Size text displays current font size. change size, enter number text choose font size from list. Effects: Toggle special font effects: Strikeout: Choose this option produce horizontal strikethrough line selected text Underline: Choose this option produce horizontal underscore line below selected text Color: Choose text color from dropdown list box. Click downward pointing arrow display Color list. scrolling arrows view choices, necessary. Sample: choose Font options, example text that will result shown Sample area. Script: have installed multilingual support, this option choose nonwestern script.
4-28
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
4.11 WinIDE SEARCH OPTIONS
This section describes WinIDE Search menu options specifying search criteria entering line number source file. perform search operation, click once Search menu open menu (Figure 4-19). Click option execute.
Figure 4-19. Search Menu
705JICSUM/D
More Information This Product, www.freescale.com
4-29
WinIDE USER INTERFACE
4.11.1 Find Choose Find option from Search menu open Find dialog (Figure 4-20). Find what: box, enter string search for. search will performed active WinIDE editor source window.
Figure 4-20. Find Dialog Enter search string choose from following options refine your search: Match Whole Word Only: choose this option limit search whole "words" character strings that part longer word string. Match Case: choose this option perform case sensitive search, that find words with specific uppercase and/or lowercase arrangement. Direction: Up/Down: Click option direct search: Choose Down option direct search from current cursor position text "bottom" file. Choose option direct search from current position text beginning "top" file. Press Find Next button start search. NOTE Find window modeless remain open, allowing interact with either Find dialog source window. Alternatives: Press Ctrl This keyboard equivalent selecting Search Find menu option.
4-30
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
4.11.2 Replace Select Replace option open Replace dialog (Figure 4-21) search substitute text active source window.
Figure 4-21. Replace Dialog Find what text box, enter text string find; Replace with text box, enter text string replace with. Refine search using Match whole word only Match case options. Match Whole Word Only: choose this option limit search whole "words" character strings that part longer word string Match Case: choose this option perform case sensitive search, that find words with specific uppercase and/or lowercase arrangement.
Press Cancel button close Replace dialog. Alternatives: Press Ctrl This keyboard equivalent selecting Search Replace menu option. 4.11.3 Find Next Select Find Next option from Search menu find next occurrence previous search string without displaying Find dialog. Alternatives: Press This keyboard equivalent selecting Search Find Next menu option.
705JICSUM/D
More Information This Product, www.freescale.com
4-31
WinIDE USER INTERFACE
4.11.4 Line Select Line option from Search menu open Line Number dialog (Figure 4-22). note line numbers Status dialog navigate between points text.
Figure 4-22. Line Number Dialog dialog instruction includes range line numbers available active window. Enter line number want press button.
4.12 WinIDE WINDOW OPTIONS
This section describes WinIDE Window menu options managing arrangement open client windows main WinIDE window. perform Window operation, click once Window menu open menu (Figure 4-23). Click option execute.
Figure 4-23. Window Menu
4.12.1 Cascade Select Cascade option from Window menu arrange open source windows overlapping cascaded style (Figure 4-24), like fanned cards. this arrangement, open source windows same size shape, overlapping other from upper left hand lower right hand corner WinIDE main window, with their title bars visible.
4-32
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
Figure 4-24. WinIDE with Subordinate Windows Cascaded choose window from cascaded display, click title bar. This moves selected window stack, makes active window. 4.12.2 Tile Select Tile option from Window menu arrange open source windows tiled fashion (Figure 4-25). will able entire window border each, although necessarily window's entire contents.
Figure 4-25. WinIDE with Subordinate Windows Tiled contents source window cannot displayed their entirety, scroll bars. tiled arrangement practical when cutting pasting from window another.
705JICSUM/D
More Information This Product, www.freescale.com
4-33
WinIDE USER INTERFACE
4.12.3 Arrange Icons Select Arrange Icons option from Window menu rearrange icons minimized windows into columns rows bottom WinIDE main window (Figure 4-26).
Figure 4-26. WinIDE with Source Window Displayed Remaining Windows Minimized
4.12.4 Minimize Select Minimize option from Window menu minimize open source windows display them icons bottom WinIDE main window (Figure 4-27).
Figure 4-27. WinIDE Editor with Subordinate Windows Minimized
4.12.5 Split Select Split option from Window menu divide active source window into more separate panes, each capable displaying different view same file. toggle split window view, click Split option. check mark appears beside option when split view effect. Adjust relative size panes dragging split bar, double horizontal line separating panes. Position pointer over split until changes split pointer (Figure 4-28).
4-34
More Information This Product, www.freescale.com
705JICSUM/D
WinIDE USER INTERFACE
Split Pointer Split
Figure 4-28. Split Pointer
705JICSUM/D
More Information This Product, www.freescale.com
4-35
WinIDE USER INTERFACE
4-36
More Information This Product, www.freescale.com
705JICSUM/D
CASM05W ASSEMBLER
CHAPTER CASM05W ASSEMBLER OVERVIEW
This chapter describes operation CASM05W assembler, including methods interfacing with assembler from WinIDE, setting assembler options directives, generating using output files formats, understanding assembler-generated error messages. order used target microcontroller CPU, source code your program must converted from mnemonic codes machine code that target execute. CASM05W assembler program accomplishes this reading source code mnemonics assembling object code file that programmed into memory target microcontroller. Depending parameters that specify assembler, other supporting files produced that useful debugging process. When click Assemble/Compile File button WinIDE, CASM05W crossassembler activated process active file WinIDE main window according parameters have entered. addition kinds object code files, choose have assembler produce (.MAP) listing (.LST) files well. Listing files show original source code, mnemonics, including comments, well object code translation. this listing during debugging phase development project. also provides basis documenting program.
705JICSUM/D
More Information This Product, www.freescale.com
CASM05W ASSEMBLER
CASM05W ASSEMBLER USER INTERFACE
CASM05W assembler interface consists window (Figure 5-1) that appears WinIDE main window during assembly. This window contains information about file being assembled: Main File: path filename main file being assembled. Current File: path filename current file being assembled. Status: assembler status assembly proceeds. Current Line: current line position assembler. Total Lines: total number lines file being assembled.
Figure 5-1. WinIDE with CASM05W Assembler Window Displayed
More Information This Product, www.freescale.com
705JICSUM/D
CASM05W ASSEMBLER
pass parameters assembler with these methods: assembler/compiler environment options WinIDE Environment Settings dialog Assembler/Compiler tab. Modify command line Program Item properties sheet Windows 3.x, Shortcut Properties window Windows (Figure 5-2).
Enter command line parameters
Figure 5-2. Windows Program Item Property Sheet (Shortcut Property CASM05W.EXE)
5.2.1
Passing Command Line Parameters Assembler Windows
enter parameters CASM05W assembler Windows 3.x: Windows Program Manager, select CASMW icon. Choose Properties option from Program Manager File menu type Program Item Properties dialog enter Command Line information. command line specifies command that will execute start program. general, path program executable file name command line entry. also optional command-line switches parameters name specific file run.
705JICSUM/D
More Information This Product, www.freescale.com
CASM05W ASSEMBLER
5.2.2
Passing Command Line Parameters Assembler Windows
enter parameters CASM05W assembler Windows program running, right-click icon Windows desktop, shortcut entry folder Windows Explorer window open Shortcut Properties sheet (Figure 5-2). Target textbox, enter CASM05W command line parameters. necessary, edit pathname Start text box. Choose window type which assembler:
Choose Normal assembler standard CASM05W window (Figure 5-3). Choose Minimized assembler minimized CASM05W window. Choose Maximized assembler maximized CASM05W window.
ASSEMBLER PARAMETERS
configure CASM05W assembler using following parameters Windows command line. specify multiple parameters, separate them spaces. enter parameters order. parameters default OFF. Filename: Required parameter specifying pathname filename CASM05W assembler executable. Optional parameter general Motorola .S19 S-Record object file. Optional parameter general .LST listing file. Optional parameter generate .MAP debugging file. Optional parameter generate Intel object file. Optional parameter show cycle counts listing file. Optional parameter expand MACROS listing file. Optional parameter expand INCLUDE files listing file. Optional parameter suppress screen writes except errors.
More Information This Product, www.freescale.com
705JICSUM/D
CASM05W ASSEMBLER
summary CASM05W Assembler parameters example command-line, open CASM05 Windows window (Figure 5-3): Example
C:\P&E\CASM05#.EXE MYFILE
Double-click CASM05W icon Windows 3.1. Choose CASM05W icon from Windows Start Menu.
Figure 5-3. CASM05W Windows Assembler Parameters
705JICSUM/D
More Information This Product, www.freescale.com
CASM05W ASSEMBLER
ASSEMBLER OUTPUTS
5.4.1 Object Files
specify object file command-line Program Item Properties properties sheet Windows, using parameters, assembler creates object file during assembly. object file same name file being assembled, with extension .HEX .S19, depending specification give: Motorola uses S-Record 8-bit object code file format object files. more information, Appendix S-Record Information. .HEX Intel 8-bit object code format.
either case, object code file produced CASM05W assembler text file containing numbers that represent binary opcodes data assembled program. This object code file sent using programmer bootstrap program, which time converted binary format required target CPU. object filename depends choice made command line Windows Program Item Properties sheet. default, object filename that file being assembled, with proper object file format extensions. there existing file with same name, will overwritten. 5.4.2 Files
specify file using parameter, assembler creates Debug .MAP file during assembly. Microcomputer products (such MMDS MMEVS) these files during source-level debugging process. files contain directory path information under which they created, cannot, therefore, moved directory. must place file different directory, place file directory, then reassemble code, using file option Windows command line. 5.4.3 Listing Files
specify listing file using parameter Windows command line, assembler creates file with same name file being assembled adds extension LST. This file serves program listing showing binary numbers that needs, alongside assembly language statements from source code. More information about using assembler listing directives found Table paragraph 5-6.
705JICSUM/D
More Information This Product, www.freescale.com
CASM05W ASSEMBLER
5.4.4
Files from Other Assemblers
possible files produced another assembler with CASM05W assembler, providing they properly prepared before using. prepare source file from third-party assembler with CASM05W, follow these steps: Precede comments semicolon. Using WinIDE other editor) global search replace command, change assembler-specific directives, listing directives, pseudo operations, etc., required create file which compatible with CASM05W. Remember that assembler directives must begin with characters must begin column
necessary, BASE directive change default base operands (CASM05W defaults hexadecimal base).
ASSEMBLER OPTIONS
CASM05W assembler supports Motorola opcode mnemonics command set. Table gives tabular summary ICS05JW debugging commands, followed command dictionary with command explanations, syntax, example usage. NOTE Opcodes mnemonics cannot start column one. label begins line, there must least space between label opcode. 5.5.1 Operands Constants
Operands addresses, labels, constants, defined opcode. Assembly-time arithmetic allowed within operands. Such arithmetic these operations: multiplication division addition subtraction left shift right shift remainder after division bitwise bitwise bitwise
705JICSUM/D
More Information This Product, www.freescale.com
CASM05W ASSEMBLER
Operator precedence follows algebraic rules. parentheses alter precedence. your expression contains more than operator, parenthesis, embedded space, must entire expression inside braces start start+3 (start ;start previously defined label ;jump location start ;jump location start divided
Constants specific numbers assembly-language commands. default base constants hexadecimal, change default using Change Base Address dialogs Memory Code windows. temporarily override default base, either appropriate prefix suffix (Table 5-1), both. assembler also accepts ASCII constants. Specify ASCII constant enclosing single double quotes. character ASCII constant equivalent value: same 41H. example string constant
"this string"
Table 5-1. Change Base Prefixes/Suffixes
Base Prefix Suffix
5.5.2
Comments
semicolons delineate comments. comment start column runs until line. Additionally, line asterisk semicolon column entire line comment.
ASSEMBLER DIRECTIVES
Assembler directives keywords that control progress modes CASM05W assembler. invoke assembler directive, enter first character line. Enter directive immediately after this initial character, along with appropriate parameters values. Directives supported assembler vary according manufacturer. Table summarizes CASM05W assembler directives. caret indicates that parameter value must follow directive. Note also that space must separate directive parameter value.
705JICSUM/D
More Information This Product, www.freescale.com
CASM05W ASSEMBLER
5.6.1
BASE
BASE assembler directive changes default base current file. parameter specified must current base have base qualifier (prefix suffix). next base remains effect until file, until enter another BASE directive. original default base hexadecimal, change default binary, octal, decimal default bases instead. good practice specify base explicitly that always sure that base currently effect. 5.6.2 Cycle Adder
CASM05W assembler contains internal counter instruction cycles called cycle adder. assembler directives, CYCLE_ADDER_ON CYCLE_ADDER_OFF, control this counter. When assembler encounters CYCLE_ADDER_ON directive, clears cycle adder. cycle adder starts running total instruction cycles subsequent instructions assembled. instructions that have variables numbers instruction cycles, cycle adder uses smallest number. When assembler encounters CYCLE_ADDER_OFF directive, writes current cycleadder value .LST file disables cycle adder.
705JICSUM/D
More Information This Product, www.freescale.com
CASM05W ASSEMBLER
Table 5-2. Assembler Directives Conditional Assembler Directives
Directive BASE CYCLE_ADDER_OFF CYCLE_ADDER_ON INCLUDE MACRO Action Change default input base binary, octal, decimal, hexadecimal Stop accumulating instruction cycles print total Start accumulating instruction cycles Include specified file source code Create macro macro definition logical space default ramloc pseudo operation Action Sets value parameter true. Maximum number SETs SETNOT Sets value parameter false. Maximum number SETNOTs IFNOT Determines block code used conditional assembly; code between ENDIF will assembled given parameter value true; code between IFNOT ENDIF will assembled parameter value false. Provides alternative ENDIF when precedes ENDIF; example, parameter value true, code between ELSEIF will assembled, code between ELSEIF ENDIF will assembled. parameter value false, code between ELSEIF will assembled, code between ELSEIF ENDIF will assembled. ELSEIF gives same alternative arrangement directive sequence that begins with IFNOT. ENDIF IFNOT, ELSEIF
MACROEND RAMEND RAMSTART Conditional Directive
ELSEIF
5-10
More Information This Product, www.freescale.com
705JICSUM/D
CASM05W ASSEMBLER
5.6.3
Conditional Assembly
CASM05W assembler allows specify blocks code assembled only upon certain conditions. such conditional assembly procedures, conditional assembler directives summarized Table 5.2. Example Conditional Assembly Directives
$SET debug $SETNOT test debug start $ELSEIF $ENDIF test test $ENDIF ;sets debug true ;sets test false ;always assembles ;always assembles debug true ;assembles debug false ;does assemble ;always assembles ;always assembles test true ;does assemble
5.6.4
INCLUDE
CASM05W assembler encounters INCLUDE directive, takes source code from specified file continues until encounters another INCLUDE directive until reaches main file. When assembler reaches main file, continues taking source code from file that contained include directive. file specification INCLUDE directive must either single double quotes. file current directory, specification should also include full path name well filename. nest included maximum depth that each included file contain additional included files. Examples
$INCLUDE "INIT.ASM" $INCLUDE "C:\project\init.asm*"
705JICSUM/D
More Information This Product, www.freescale.com
5-11
CASM05W ASSEMBLER
5.6.5
MACRO
macro named block text assembled. Similar some ways included file, macro allows labels parameter values. MACRO directive begins macro definition. name macro parameter value MACRO direction. subsequent code, until assembler encounters MACROEND directive, considered macro definition. assembler directives used within macro, does definition require parameter names. Instead, macro definition includes sequential indicators parameter values macro call. assembler will ignore parameter values MACRO directive line, such values helpful internal documentation. Example This macro example illustrates macro that divides accumulator value
$MACRO divide_by_4 $MACROEND ;starts macro definition ;divides accumulator ;divides quotient ;ends macro definition
This macro example illustrates macro that creates time delay:
$MACRO delay loop: $MACROEND count ldaa #$01 deca loop
this macro, CASM05W assembler ignores parameter count MACRO directive line. parameter count merely indicates role parameter value passed macro. That value substituted sequential indicator first time this macro called, CASM05W assembler changes label loop, lines loop:0001. calling line
delay 100t
invokes this macro, loop would occur times. suffix represents decimal base. CASM05W assembler ignores extra parameter values sent macro. macro does receive enough parameter values, assembler issues error message. Labels change automatically each time they used. Labels used within macros longer than characters, because assembler appends four-digit hexadecimal number label insure label uniqueness. Although code jump into macro, jump macro. Macros cannot forward-referenced.
5-12
More Information This Product, www.freescale.com
705JICSUM/D
CASM05W ASSEMBLER
LISTING DIRECTIVES
List directives source-code keywords that control output .LST listing file. These directives pertain only viewing source-code output; directives, which interspersed anywhere source code, affect actual code assembled. Table summarizes listing directives. Table 5-3. Listing Directives
Directive Action Begins page Specifies header listing pages; header defined only once; default header blank; header string entered quotes. Turns .lst file output. Turns .lst file output. This directive counterpart list directive; file, this directive keeps symbol-table from being listed. Sets length page; default parameter value lines decimal) Sets width output, word wrapping additional text; default parameter value columns decimal)f. Makes string specified quotes (double single) subheader listing pages; subheader takes effect next page.
eject page header list nolist pagelength pagewidth subheader
Note: caret character following directive indicates mandatory parameter value that must supplied.
5.7.1
Listing Files
listing file requested using parameter command line Windows Program Item Properties, Output Listing File option checked Assembler/Compiler Environment Settings dialog, listing file (.LST) created during assembly. This listing file same name file being assembled, with extension .LST. existing file with same name will overwritten. listing file following format (listing file fields shown example described Table 5-4):
AAAA [CC] VVVVVVVV LLLL Source Code
705JICSUM/D
More Information This Product, www.freescale.com
5-13
CASM05W ASSEMBLER
Example:
0202 [05] 1608 bset 3,tcsr timer overflow flag ;clear
listing file fields described Table 5-4. Table 5-4. Listing File Fields
Field Contents AAAA [CC] Field Description first field contains four hexadecimal digits indicating address command target processor (MCU) memory. assembler generates this field. second field indicates number machine cycles used opcode. assembler generates this field. Note that this value appears only cycle counter (Cycle Cntr) turned before assembly. Also note that value, which always appears brackets, decimal value. command several possible cycle counts assembler cannot determine actual number, field shows best case (lowest number). example command that have several possible counts branch command. VVVVVVVV third field contains label consisting four hexadecimal digits indicating values placed into that memory address (and, possibly, next several memory addresses). refer this label other commands. size this field depends actual opcode. assembler derives this field from source code. fourth field contain four digits indicating line count. assembler derives this field from source code. last field contains actual source code from source code file. listing table provides summary every label value, displayed table format each listing file.
LLLL Source code Listing table
5-14
More Information This Product, www.freescale.com
705JICSUM/D
CASM05W ASSEMBLER
Example Listing Table
MAIN1.ASM Assembled with CASMW 2/27/97 12:06:39 PAGE porta portb portc portd ddra ddrb ddrc ddrd $0000 $0001 $0002 $0003 $0004 $0005 $0006 $0007
0000 0000 0000 0000 0000 0000 0000 0000 Symbol Table DONSCN DONSCN1 OPTSC1 OPTSC2 OPTSC3 08DD 08EE 0866 0877 0888
5.7.2
Labels
write program code, will necessarily know addresses where commands will located. assembler solves this problem using system labels, providing with convenient identify specific points program without knowing exact addresses. assembler later converts these mnemonic labels into specific memory addresses even calculates offsets branch commands order them. assembler truncates labels longer than characters. Labels within macros must exceed characters length. Examples:
Label: ThisIsALabel: Loop_1 This_label_is_much_too_long:
assembler would truncate last example characters.
705JICSUM/D
More Information This Product, www.freescale.com
5-15
CASM05W ASSEMBLER
PSEUDO OPERATIONS
CASM05W assembler also allows pseudo operations place opcode mnemonics). operations that assembler allows summarized Table described following paragraphs. Table 5-5. Pseudo Operations Allowed CASM05W
Pseudo Code Action Associates binary value with label. Defines byte storage, where label, number, string. Strings generate ASCII code multiple bytes; number label parameters receive single bytes. Separate multiple parameters with commas. Defines word storage, where label, number, string. bytes generated each number label. Separate multiple parameters with commas. Sets origin value number label forward references allowed. Defines storage, reserving bytes, where number label; forward references allowed.
5.8.1
Equate (EQU)
equate directive associates binary value with label. value either 8-bit value 16-bit address value. This directive does generate object code. During assembly process, assembler must keep cross-reference list where stores binary equivalent each label. When label appears source program, assembler looks this cross-reference table find binary equivalent. Each directive generates entry this cross-reference table. assembler reads source program twice. first pass, assembler just counts bytes object code internally builds cross-reference table. second pass, assembler generates listing file and/or S-record object file, specified command line parameters assembler. This two-pass arrangement allows programmer reference labels that defined later program.
5-16
More Information This Product, www.freescale.com
705JICSUM/D
CASM05W ASSEMBLER
directives should appear near beginning program, before their labels used other program statements. assembler encounters label before been defined, assembler choice assume worse case, assign label 16-bit address value. This would cause extended addressing mode used places where more efficient direct addressing mode could have been used. other cases, indexed 16-bit offset addressing mode used where more efficient 8-bit offset indexed command could have been used. 5.8.2 Form Constant Byte (FCB)
arguments this assembler directive labels numbers (separated commas) that assembler convert into single byte data. Each byte specified directive generates byte machine code object code file. directives define constants program. 5.8.3 Form Double Byte (FDB)
arguments this assembler directive labels numbers (separated commas) that assembler convert into 16-bit data values. Each argument specified directive generates bytes machine code object code file. 5.8.4 Originate (ORG)
originate directive sets location counter assembler. location counter keeps track address where next byte machine code will stored memory. assembler translates program statements into machine code commands data, advances location counter point next available memory location. Every program least directive, establish program's starting place. Most complete programs will also have second directive near program location counter address where reset interrupt vectors located. must always specify reset vector. good practice also specify interrupt vectors, even expect interrupts. 5.8.5 Reserve Memory Byte (RMB)
this assembler directive aside space program variables. directive does generate object code, normally generates entry assembler's internal cross-reference table.
705JICSUM/D
More Information This Product, www.freescale.com
5-17
CASM05W ASSEMBLER
ASSEMBLER ERROR MESSAGES
configure CASM05W assembler highlight errors that encounters during assembly, display error message prompt line. Table summarizes these messages. Table 5-6. Assembler Error Messages
Message Probable Cause variable IFNOT statement been declared SETNOT directive. label highlighted line already been used. Insufficient disk space other reason prevents creation .LST .MAP file. Corrective Action Declare variable using SETNOT directive. Change label used already. Make sure there sufficient disk space. Make sure that your CONFIG.SYS file lets multiple files open same time (see your Windows manual commands). Make sure there sufficient disk space. Make sure your CONFIG.SYS file allows multiple files open same time (see your Windows manual commands). Nest includes more than levels deep. Make sure that quotes enclose file name included; necessary, specify full path name well. qualifier prefix suffix value, change default base. Correct opcode. Change label have more than characters, Send sufficient parameter values macro.
Conditional assembly variable found Duplicate label Error writing .LST .MAP file- check disk space
Error writing object file-check disk space
Insufficient disk space other reason prevents creation object file.
Include directives nested deep INCLUDE file found
Includes nested more levels deep. Assembler could find file specified INCLUDE directive
Invalid base value
Value inconsistent with current default base (binary, octal, decimal, hexadecimal) opcode highlighted line wrong. label macro more characters. macro receive sufficient parameter values.
Invalid opcode, long MACRO label long MACRO parameter error
5-18
More Information This Product, www.freescale.com
705JICSUM/D
CASM05W ASSEMBLER
Table 5-6. Assembler Error Messages (Continued)
Message memory Probable Cause assembler system memory Corrective Action Create file that consists only INCLUDE directive, which specifies your primary file. Assembling this file leaves maximum memory available assembler. Correct representation change parameter value.
Parameter invalid, large, missing range
Operand field highlighted line invalid number representation. parameter value evaluates number large memory space allocated command. There more conditional variables.
many conditional assembly variables many labels
Limit conditional variables fewer.
assembler system memory.
Create file that consists only INCLUDE directive, which specifies your primary file. Assembling this file leaves maximum memory available assembler. Declare label. Correct opcode make consistent with parameters. Insert closing brace.
Undefined label Unrecognized operation found
label parameter highlighted line been declared. highlighted opcode unknown inconsistent with number type parameters. mathematical expression missing closing brace.
705JICSUM/D
More Information This Product, www.freescale.com
5-19
CASM05W ASSEMBLER
5.10 USING FILES FROM OTHER ASSEMBLERS
prepare source file made another assembler with CASM05W, follow these steps: Divide large files into smaller files larger than 75K. Typically, file system variables EQUates, another file routines. main file should called. Remember that include filenames must quotes must contain file extensions. Make sure comments source file preceded semicolon. global find-and-replace operation editor change assembler directives, listing directives, and/or pseudo operations, they exist source code. Remember that assembler directives must begin with character /,., must start column necessary, BASE directive change default base operands (CASM05W defaults hexadecimal).
5-20
More Information This Product, www.freescale.com
705JICSUM/D
ICS05JW SIMULATOR USER INTERFACE
CHAPTER ICS05JW SIMULATOR USER INTERFACE OVERVIEW
This chapter describes in-circuit simulator user interface, toolbar buttons, windows, subwindows, messages, menu options.
ICS05JW IN-CIRCUIT SIMULATOR
ICS05JW.EXE in-circuit simulator Motorola 68HC05J1 microcontroller that runs Windows Windows ICS05JW inputs outputs (I/O) target device from external pod, M68HC705JICS board, that attached host computer. actual inputs outputs (I/O) from your target board, attach your target board using supplied extension cable. ICS05JW simulator debugging component complete development environment when used conjunction WinIDE editing environment CASM05W command-line assembler. 6.2.1 ICS05JW Simulation Speed
ICS05JW real-time debugger. speed which simulator executes code much slower than speed which actual processor execute code. Therefore, there critical timing issues resolved, should emulator HC05J devices instead ICS05JW. Alternately, simulate using slow mode, then program EPROM device check full speed operation. NOTE actual speed 10KHz indicates that simulator your host running same speed real with 20KHz crystal divide-by-2 attached internal oscillator output). Typical values actual speed KHz.
705JICSUM/D
More Information This Product, www.freescale.com
ICS05JW SIMULATOR USER INTERFACE
calculate actual speed assembled code target MCU, need stopwatch some source code. Follow these steps: Load your code using LOAD command ICS05JW Status Window command line. program counter beginning routine which wish measure speed. Clear cycle counter using CYCLE command with parameter, then press Enter: Ready your stopwatch.
Enter command ICS05JW Status Window command line. Start stopwatch press Enter button simultaneously begin code execution. After seconds, simultaneously stop watch execution (the fastest stop execution press spacebar). Execution halts. enter CYCLES command Status Window command line; decimal value cycle count displayed. Divide cycle count result actual speed KHz. 6.2.2 System Requirements Running ICS05JW
ICS05JW runs under Windows Windows There separate 32-bit version ICS05JW software Windows 95/NT available directly from Microcomputer Systems. Your host computer should have minimum (system memory) available assembly processes, well sufficient disk space store files that ICS05JW creates.
More Information This Product, www.freescale.com
705JICSUM/D
ICS05JW SIMULATOR USER INTERFACE
6.2.3
File Formats
number file types conjunction with ICS05JW simulator. following topics describe structure each type. Project Files: Project files store types information: Desktop information includes information stored concerning files that currently open project. Whenever save project file, WinIDE records information about each window open desktop, including:
Window size Window position Window style (Maximized/Minimized/Normal) Markers currently Environment Settings User settings WinIDE configuration parameters specified Environment Settings dialog tabs When open project, project open when WinIDE starts, files opened with settings stored project file. (Object) Files: ICS05JW software accepts standard Motorola files input simulation. object files created HC05 assembler (such CASM05W), contain actual object code that simulated ICS05JW. Specify files command line load using LOAD command ICS05JW Status window. object file same name file assembled, with extension .HEX .S19, contains actual assembled object) code debug. specify object file environment settings, created during assembly. CASMW (and some other assemblers) product object files .S19 format. Motorola object code format described detail Appendix files Intel 8-bit object code format.
705JICSUM/D
More Information This Product, www.freescale.com
ICS05JW SIMULATOR USER INTERFACE
Files contain source level debugging information. debug symbolic source code code window must also load more map-files. *.MAP source-level file generated specifying option command line when running CASMW assembler, loaded using LOADMAP command ICS05JW Status window. specify file environment settings, created during assembly. NOTE files contain directory information, cannot moved. place files another directory, move file directory reassemble file directory file will contain correct directory information. third party assembly language compiler, must able produce compatible source-level files.
Error Files contain assembly error information. CASMW highlights errors that encounters during assembly, displays error message CASMW window. Depending environment settings, assembler also open file which error encountered, create error file with assembly filename .ERR extension. Script Files plain ASCII text files containing ICS05JW simulator commands. command ICS05JW command script files. Running script file then effect entering commands ICS05JW command line. create script files WinIDE editor, files created other text editors following these rules: Enter each command line. Preface comments with semi-colon. commands from ICS05JW command WAIT.
More Information This Product, www.freescale.com
705JICSUM/D
ICS05JW SIMULATOR USER INTERFACE
Listing Files display each line source code resulting (assembled compiled) object code. Listing files show exactly where each code assembled. specify listing file environment settings, created during assembly. listing file will have same name file being assembled, with .LST extension, will overwrite previous file with same name. Listing files contains these fields following format:
AAAA [CC] VVVVVVVV LLLL Source Code
Where: AAAA [CC] First four hexadecimal digits address command target processor memory. number machine cycles used opcode. This value, which always appears brackets, decimal value. instruction several possible cycle counts would case when assembler encounters branch instruction) assembler cannot determine actual number cycle counts, field will show best case (lowest number). Hexadecimal digits (the number which depends actual opcode) representing values into that memory address. Line count. actual source code
VVVVVVVV
LLLL Source code
listing file symbol table listing every label value. Files simple ASCII text files, sometimes called scratch files. file records sequence content commands executed, debugger responses commands. view files from within WinIDE editor. ICS05JW simulator creates files LOGFILE command active.
705JICSUM/D
More Information This Product, www.freescale.com
ICS05JW SIMULATOR USER INTERFACE
STARTING ICS05JW
start ICS05JW simulator itself standalone mode (with inputs outputs from target), from within WinIDE editor. also modify ICS05JW environment WinIDE editor. simulator standalone mode, double click ICS05JW icon using either these methods: Windows 3.x, Program Manager, double click ICS05JW icon ICS05JW Program Group.
Windows choose ICS05JW icon from ICS05JW group Start menu. simulator from WinIDE editor, either these methods: Click Debugger (EXE1) button WinIDE toolbar Press hotkey modify software starts from WinIDE editor: From WinIDE Environment menu, choose Setup Environment option open Environment Settings dialog. Select EXE1 Debugger heading (see Figure 4-17), already top, options ICS05JW simulator. more information about options tab, paragraph 4.10.5.4. After startup, software will establish communication with board given parameters status will read Attempting contact ICS05JW software communicate with through serial port, status message reads, Contact with established. software able connect with board, Can't Contact Board dialog (Figure 6-1) appears.
Figure 6-1. Can't Contact Board Dialog
More Information This Product, www.freescale.com
705JICSUM/D
ICS05JW SIMULATOR USER INTERFACE
communication parameters communications port baud rate incorrect Can't Contact Board dialog, change them then press Retry button. board connected wish from board, then click Simulation Only button. Otherwise, press Exit Application button. NOTE file named STARTUP.05J exists current directory, WinIDE runs macro file startup. MACRO command more information.
ICS05JW WINDOWS
ICS05JW user interface consists windows which system code information shown into which ICS05JW command entered (Figure 6-2).
Figure 6-2. ICS05JW Windows Default Positions ICS05JW windows described paragraphs 6.5-6-11. ISC05JW sub-windows which shown when appropriate described paragraphs 6.12-6.16.
705JICSUM/D
More Information This Product, www.freescale.com
ICS05JW SIMULATOR USER INTERFACE
CODE WINDOWS
Code windows (Figure 6-3) display source code either source disassembly modes. Code windows give visual cues about source code they contain: blue arrow highlighting gives position current program counter (PC). exclamation mark highlighting indicates breakpoint.
display both code windows simultaneously. Each code window independent: configure each window display different parts your source code, different assembly modes.
Figure 6-3. Code Window Disassembly Mode with Breakpoint Toggled
6.5.1
Display Code Windows Shortcut Menus
Code Window shortcut menu (Figure 6-4) contains options working code windows. display Code Code Windows shortcut menu, position cursor either window click right mouse button.
Figure 6-4. Code Window Shortcut Menu
More Information This Product, www.freescale.com
705JICSUM/D
ICS05JW SIMULATOR USER INTERFACE
6.5.2
Code Window Shortcut Menu Functions Toggle Breakpoint Cursor: Choose this option remove breakpoint current cursor location. Cursor: Choose this option Program Counter (PC) current cursor location. Gotil Address Cursor: Choose this option execute source code until Program Counter (PC) gets line current cursor location. When gets that point, execution stops. Base Address: Choose this option open Window Base Address dialog (Figure 6-5) address first code line Code Window.
Code Window shortcut menu (Figure 6-4) offers these options:
Figure 6-5. Window Base Address Dialog Base Address Choose this option Program Counter (PC) address first line Code Window. Select Source Module: Choose this option select source module file been loaded into memory). Show Disassembly: Choose this option display Code window contents disassembly mode. Show Source/Disassembly: Choose this option display Code window contents both disassembly source modes. NOTE change code Code Code2 windows using ASM, commands, your must reassemble code update contents windows.
705JICSUM/D
More Information This Product, www.freescale.com
ICS05JW SIMULATOR USER INTERFACE
6.5.3
Code Window Keyboard Commands
these keys navigate Code Windows: Press Arrow scroll Code Window contents line. Press Down Arrow scroll Code Window contents down line. Press Home scroll Code Window's base address. Press scroll Code Window's last address. Press Page scroll Code Window page. Press Page Down scroll Code Window down page. Press sho

Other recent searches


S72NxxN - S72NxxN   S72NxxN Datasheet
PCI2050 - PCI2050   PCI2050 Datasheet
PCI2050I - PCI2050I   PCI2050I Datasheet
MBRP30060CT - MBRP30060CT   MBRP30060CT Datasheet
LA76922M - LA76922M   LA76922M Datasheet
ESP020S - ESP020S   ESP020S Datasheet
AN688 - AN688   AN688 Datasheet
1SBD250020E1002 - 1SBD250020E1002   1SBD250020E1002 Datasheet
08F4500 - 08F4500   08F4500 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive