background image

Command-Line Commands

MMDS0508OM/D

162

Command-Line Commands

MOTOROLA

RTMEM

Set Real-Time Memory Block

RTMEM

The RTMEM command enables real-time-memory, starting at a
specified address. The real-time memory consists of 32 bytes of
dual-ported memory that is assigned to any valid memory address by
this command. While the emulator is running, the system displays
enabled real-time memory in the real-time memory window (this window
replaces the memory F3 window). The display updates as the memory
contents change. Entering the RTMEM command without an argument
disables real-time memory, restoring previous memory map attributes.

Real-time memory consists of memory enabled by the RTMEM
command, plus real-time variables created via the RTVAR command. All
this real-time memory must fit within a 1-Kbyte block. If an RTMEM
command would result in real-time memory that would not fit within the
1-Kbyte block (due to established real-time variables), the system will
not accept the RTMEM command.

If any of the real-time memory overlays MCU I/O or EEPROM
addresses, it is available only for monitoring emulation MCU writes. (You
should not try to modify such locations.) You can monitor and modify
real-time memory locations that do not overlay MCU I/O or EEPROM
addresses.

Syntax:

RTMEM [<

address> | <symbol>]]

where:

<

address>

The beginning address of the real-time-memory.

<

symbol>

A symbol loaded from a .MAP file

Example:

>RTMEM 0200

Set the address of the real-time-memory to
0200 through 021F.

 

   

  

F

re

e

sc

a

le

 S

e

m

ic

o

n

d

u

c

to

r,

 I

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

 

Freescale Semiconductor, Inc.

For More Information On This Product,

   Go to: www.freescale.com

n

c

.

..

Summary of Contents for Motorola MMDS0508

Page 1: ... O P M E N T S Y S T E M f o r 6 8 H C 0 5 a n d 6 8 H C 0 8 M I C R O C O N T R O L L E R S O P E R A T I O N S M A N U A L Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 2: ...Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 3: ...MDS0508OM D MOTOROLA 3 MMDS0508 Motorola Modular Development System Operations Manual Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 4: ...es subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part Motorola and the Motorola logo are regist...

Page 5: ...ifferences between this revision and the previous revision of this emulation module user s manual Previous Revision None Current Revision Original release Date 08 96 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 6: ...Revision History MMDS0508OM D 6 MOTOROLA Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 7: ...est Header J1 23 Port Voltage Control Headers J2 J4 24 Installing the EM 25 Removing the EM 25 Making System Connections 26 Host Computer Connection 26 Bus State Analyzer Connection 26 Target Cable Connection 27 Power Connection 27 Reset Switch 28 Serial Connector and Cable Information 28 Serial RS232 Connector 28 Logic Cables and Connectors 30 Power Supply Fuse Replacement 32 Freescale Semiconduc...

Page 8: ...w 47 Source Code F2 Window 47 Code F2 Window 47 Source Window 48 Variables F8 Window 49 Memory F3 Window 50 Debug F10 Window 50 Pop Up Windows 51 Stack Window 52 Set Memory Window 53 Baud Window 54 Emulator Clock Frequency Window 54 Other Windows 55 Mouse Operation 56 Changing Screen Colors 58 Operation Fundamentals Contents 59 Introduction 60 System Initialization 60 Setting Communications Baud R...

Page 9: ...ory Display 71 Reset Control of the Emulation System 72 Using Breakpoints 72 Tracing Instructions 73 Execution Instructions 73 Bus State Analyzer Commands 74 Configuring the Analyzer 74 Capturing Analyzer Data 74 Viewing Analyzer Data 74 Bus State Analysis Contents 77 Introduction 78 Operating the Bus Analyzer 79 Defining Events Terms 79 Selecting the Trigger Mode 84 Selecting Options 86 Collectin...

Page 10: ... Command Syntax 102 Command Explanations 103 S Record Information Contents 199 Introduction 199 S Record Content 200 S Record Types 201 S Record Creation 202 S Record Example 202 Index Index 205 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 11: ...APID software provides an integrated development environment and includes an editor assembler and a user interface to the MMDS system The environment allows for source level debugging and simplifies writing and debugging code for an embedded MCU system These features significantly reduce development time A complete MMDS system contains the station module M68MMDS0508 an emulation module EM and a ta...

Page 12: ...l covers MMDS software hardware and reference information as follows Installation on page 19 explains M68MMDS0508 hardware Loading and Initialization on page 35 explains how to load and initialize the MMDS system software User Screens on page 41 explains the window screens as well as how to use a mouse Operation Fundamentals on page 59 describes command usages Bus State Analysis on page 77 details...

Page 13: ...commodate the largest available ROM size of current HC05 HC08 MCUs 64 hardware instruction breakpoints over the 64 K memory map A DOS personality file for each EM Each personality file provides a memory map definition 64K bytes of emulation memory to accommodate the largest available ROM size of current HC05 HC8 MCUs Latch up resistant design 47 Ω series resistor on I O connections to the target s...

Page 14: ...language source level debugging RS 232 operation speeds as high as 57600 baud On screen context sensitive help via pop up menus and windows CHIPINFO command for memory map vectors register and pin out information pertaining to the device being emulated Emulation that allows multiple types of reset RESET command resets target RESETGO command resets target and begins execution WAIT4RESET command res...

Page 15: ...t system System software RAPID integrated development environment featuring editor assembler and assembly source level debugger 3 5 inch diskettes RAPID documentation A RAPID Integrated Development Environment User s Manual MMDS documentation An MMDS0508 Operations Manual MMDS0508OM D this manual Software Release Guide Documentation on the current release of system software Two logic clip cable as...

Page 16: ...s part of a cable assembly used to connect the target system to the MMDS system Optional target head adapter A separately purchased target head adapter that is part of a cable assembly used to connect the target system to the MMDS system User supplied components include Host computer For further information refer to Host Computer Requirements Host Computer Requirements The host computer for the MM...

Page 17: ...he station module where common hardware for all M68HC05 and M68HC08 emulation resides EM An emulation module that connects to the platform board to customize the MMDS for a particular MCU or family of MCUs RAPID An integrated development environment that includes an editor and allows applications such as assemblers and debuggers to be blended into a single environment MMDS Motorola Modular Evaluat...

Page 18: ...General Description MMDS0508OM D 18 General Description MOTOROLA Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 19: ... EM 25 Making System Connections 26 Host Computer Connection 26 Bus State Analyzer Connection 26 Target Cable Connection 27 Power Connection 27 Reset Switch 28 Serial Connector and Cable Information 28 Serial RS232 Connector 28 Logic Cables and Connectors 30 Power Supply Fuse Replacement 32 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freesca...

Page 20: ...on the front of the station module The logic cable A and B connectors pod A and pod B are on the right as you face the station module When using the logic clip cables always attach the black clip to ground Figure 2 shows the left side of the station module with the access panel closed The power cord socket the power switch and the 9 pin RS 232 serial connector are on the left as you face the stati...

Page 21: ...LA Installation 21 Figure 1 M68MMDS0508 Station Module Right Side Power LED Recessed Pod A Pod B Connector Hardware Reset Switch Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 22: ...n module jumper headers J2 J3 and J4 may control the voltage levels for ports A through D NOTE The factory configures the platform board correctly for virtually all users before shipping the MMDS These platform board jumpers should not be reconfigured unless instructed to do so by an emulation module EM user s manual Panel 5V Out Power Switch 9 Pin Serial Power Cord Socket Connector Freescale Semi...

Page 23: ...y configuration of jumper header J1 The fabricated jumper between pins 1 and 2 is correct for MMDS operation The alternate jumper position has significance only for factory personnel 1 2 3 RUN BOOT J1 FABRICATED JUMPER Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 24: ...ss the EM user s manual says that the EM is a low voltage board If the EM can operate at low voltage any of the ports can be operated at the low voltage level To do so reposition the fabricated jumper of the corresponding header to pins 2 and 3 Jumper header J2 controls the voltage level of port A jumper header J3 controls the voltage level of port B and jumper header J4 controls the voltage level...

Page 25: ...appropriate Reaffix the panel to the station module top NOTE Many EM boards may have 64 pin female DIN connectors If so these will mate with the male DIN connectors on the platform board The keyed plastic on the connector will ensure proper alignment Removing the EM Complete these steps to remove an EM from an MMDS enclosure Ensure station module power is off Remove the panel from the station modu...

Page 26: ...e Analyzer Connection If your work session includes bus state analysis you may need the logic clip cable assemblies The two logic clip connectors referred to as pods A and B allow external events to be captured in the analyzer External clock signals for the emulator and for the analyzer also can be input through logic clip connections The pod A and pod B connectors are located on the right side of...

Page 27: ...t side of the EM module Connect one end of the target cable to the EM target connector and the other end of the target cable to the user s target system before power up See the specific EM user s manual for specific information on the target head adapter and the appropriate target cable Make sure that the target head adapter and target cable mate correctly Consult the EM manual for proper connecti...

Page 28: ...f the host serial port does not implement handshaking reset the MMDS manually Press gently to trip the switch Serial Connector and Cable Information This section contains pin identification and signal names for connectors common to all MMDS systems For pinout information for a particular EM connector refer to the corresponding EM user s manual Serial RS232 Connector This diagram shows pin numberin...

Page 29: ...line 3 TX TRANSMIT DATA Serial data input line 4 DTR DATA TERMINAL READY Input signal that indicates on line in line active status 5 GND GROUND 6 DSR DATA SET READY Output signal that indicates on line in line service active status 7 RTS REQUEST TO SEND Input signal that requests permission to transfer data 8 CTS CLEAR TO SEND Output signal that indicates a ready to transfer data status Freescale ...

Page 30: ...ator clock and bus state analyzer timetag The table also provides color code information for each pod The external clock inputs are through pin 17 of each pod Pod A pin 17 is the external clock input for the emulator To use this source make the desired clock connection to the white probe tip and use the OSC command to select an external source Pod B pin 17 is the external timetag input for the bus...

Page 31: ... GND 3 LC1 LC9 Red RED 4 GND GND 5 LC2 LC10 Orange ORG 6 GND GND 7 LC3 LC11 Yellow YEL 8 GND GND 9 LC4 LC12 Green GRN 10 GND GND 11 LC5 LC13 Blue BLU 12 GND GND 13 LC6 LC14 Purple PUR 14 GND GND 15 LC7 LC15 Gray GRY 16 GND GND 17 EXT_OSC TT_OSC White 18 GND GND 19 GND GND Black 20 GND GND Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale...

Page 32: ...tandard 1 4 x 1 1 4 inch 1 6 ampere 250 volt ceramic time delay fuse Figure 3 shows this assembly with its door open for fuse replacement Figure 3 Power Switch Connector Assembly Power Cord Socket Fuse Door Fuse Power Switch Tab Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 33: ...iver Gently pry open the assembly door which swings open to the left Remove the fuse holder from the switch connector assembly Remove the fuse from the holder Insert the replacement fuse into the holder Then re install the holder in the switch connector assembly Make sure that the fuse holder arrow points down Close the assembly door Reconnect the power cord This completes fuse replacement Freesca...

Page 34: ...Installation MMDS0508OM D 34 Installation MOTOROLA Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 35: ...ents Software Distribution Format 36 Installing MMDS Software 36 Personality Files 37 Using MMDS Software 37 Running MMDS05 38 Running MMDS08 39 MMDS Communication 40 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 36: ...nsert the distribution diskettes into an active drive Make the installation drive active by typing the drive letter followed by a colon and press CR Type INSTALL and press CR Follow the directions as prompted by the install software Refer to the Software Release Guide for further information on the installation process Table 3 MMDS Software Files File Name Description MMDS05 EXE MMDS05 host softwa...

Page 37: ...rsonality file that corresponds to the currently connected EM module As discussed in the following paragraph other personality files can be loaded via the LOADMEM command or through use of the M option Using MMDS Software The correct executable file to run is dependent on which type EM is installed on the MMDS platform board If an HC05 EM is installed the MMDS05 EXE file should be run If an HC08 E...

Page 38: ...option followed by the filename Do not put a space between the M and the filename If the specified personality file has a MEM extension the MEM extension may be omitted from the filename C MMDS05 MMDS05 M filename 4 To specify an S record file and any map file with the same name to be loaded automatically add the filename option If the specified S record file has a S19 extension the S19 extension ...

Page 39: ...add the M option followed by the filename Do not put a space between the M and the filename If the specified personality file has a MEM extension the MEM extension may be omitted from the filename C MMDS08 MMDS08 M filename 4 To specify an S record file and any map file with the same name to be loaded automatically add the filename option If the specified S record file has a S19 extension the S19 ...

Page 40: ...ween the host and the station module should be at the maximum available baud rate At power up the host software automatically sets the maximum baud for the system Reduce the baud rate if a communication error message appears Refer to Running MMDS05 and Running MMDS08 on the preceding pages to set the start up baud rate at 9600 If communication errors persist turn off the disk cache SMARTDRV EXE on...

Page 41: ... 47 Source Window 48 Variables F8 Window 49 Memory F3 Window 50 Debug F10 Window 50 Pop Up Windows 51 Stack Window 52 Set Memory Window 53 Baud Window 54 Emulator Clock Frequency Window 54 Other Windows 55 Mouse Operation 56 Changing Screen Colors 58 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 42: ...ons of the software except for the CPU window The screen consists of a status area and five static windows which display source or object code variables the command line and the contents of the CPU registers or memory To carry out actions associated with a window of the debug screen select the window To select a window press the numbered function key included in the window title For instance press...

Page 43: ...LKTIME CURVAL DISLINE1 0000 0 30 00110000 00 00000000 S1 DCHAR delete SOURCE init asm begin lda sta pc resetin logfile COM1 57600 clrbgn ldx clra sta B incx cpx bne 40 tcr flag 0 x rslt 4 clrbgn clears br go stop gotil step info zoom idle Inst brkpt Illegal Address DEBUG F10 BR 0029 g idle Inst brkpt Illegal Address F1 Help F2 Code F3 Mem F4 BSA_data F5 BSA_setup F8 vars F9 rpt F10 Debug Armed A B...

Page 44: ...SLINE1 0000 0 30 00110000 E7 11100111 S1 DCHAR delete SOURCE init asm begin lda sta pc resetin logfile COM1 57600 B clrbgn ldx clra sta incx cpx bne 40 tcr flag 0 x rslt 4 clrbgn clears br go stop gotil step info zoom idle Inst brkpt Illegal Address DEBUG F10 BR 00A7 g idle Inst brkpt Illegal Address F8 vars F9 rpt F10 Debug F1 Xreg targetpwr F1 Help F2 Code F3 Mem F4 BSA_data F5 BSA_setup Armed A...

Page 45: ...reen F5 View the bus state analyzer setup screen F8 Activate the Variables F8 window F9 Repeat the preceding command F10 or ESC Returns to debug F10 window Scrolls the window down one line same as clicking on the symbol at window edge Scrolls the window up one line same as clicking on the symbol at window edge Page Down Scrolls the window down one page Page Up Scrolls the window up one page Alt X ...

Page 46: ...ing MCU blank Target system cannot reset emulating MCU RESETOUT signal state between variables F8 and memory F3 windows Resetout RESET command resets emulating MCU and the target system blank RESET command resets only the emulating MCU Logging state between variables F8 and memory F3 windows Logfile Logging in progress blank Logging not in progress Target system power between variables F8 and memo...

Page 47: ...Instead this window shows changes made via other windows or changes that occur due to running code Source Code F2 Window The window located in the upper right corner of the screen has two operating modes The functionality of the window is different for each of the operating modes Under certain conditions explained below you may toggle between the operating modes One mode Code F2 displays the objec...

Page 48: ... and object code If a mouse is installed the symbols that appear at the bottom of the source window can be selected Use the mouse or arrow keys to scroll through the information in the window There are several Alt commands associated with the source window The list of Alt commands appears at the bottom of the debug screen when the Alt key is pushed Table 6 lists the key commands available in this ...

Page 49: ...via the VAR and RTVAR commands The variables appear with their current values in hexadecimal binary decimal or ASCII format Refer to the section entitled Command Line Commands for more information about the RTVAR and VAR commands Table 6 Source Window Key Commands Name Key Description Breakpoint Alt B Sets or removes a breakpoint at highlighted line Exit Alt X Terminates debug session Find Alt F F...

Page 50: ... stops Refer to the section entitled Command Line Commands for more information about the RTMEM command Debug F10 Window The debug F10 window located at the bottom of the debug screen is the default active window This window contains the command line identified by the command prompt Enter type a command at the prompt To process the command press CR that is press the ENTER RETURN or carriage return...

Page 51: ... Description Moves cursor down one line Moves cursor up one line Moves cursor left Moves cursor right Home Moves cursor to top line of window End Moves cursor to bottom line of window Page Down Scrolls down one page HELP only Page Up Scrolls up one page HELP only F6 Saves memory map to file SETMEM only and applies memory map to the MMDS F7 Applies memory map to emulator and returns to debug screen...

Page 52: ...interrupt Press the ESC key to remove the stack window and return to the debug window NOTE The interrupt stack data to the right side of the window is an interpretation of the top five bytes on the stack If the last push to the stack was due to a BSR or JSR instruction five bytes were not pushed to the stack and the interrupt stack information is invalid Figure 6 Stack Window STACK Stack Pointer 0...

Page 53: ...s mapping over memory defined as RAM ROM or undefined However mapping over internal resources such as option RAM I O or EEPROM is not allowed Figure 7 Set Memory Window RAM1 XXXX XXXX RAM2 XXXX XXXX RAM3 XXXX XXXX ROM0 0020 004F ROM1 0100 08FF ROM2 1FF0 1FFF ROM3 XXXX XXXX F6 SAVE F7 EXECUTE ESC CANCEL Vector 1FFE Custom Map RAM0 0080 00FF Freescale Semiconductor I Freescale Semiconductor Inc For ...

Page 54: ...er configuration in order to use the platform board clock source Refer to the EM user s manual for the availability of this feature For the MMDS05 five clock frequencies are available The four internally generated clock frequencies are 8 MHz 4 MHz 2 MHz and 1 MHz and an external clock source Entering emulator clock OSC command without the designated frequency brings up the temporary MMDS emulator ...

Page 55: ...on to the screen windows described in this section several other transient dialog windows will be encountered Those windows encountered while using the bus state analyzer will be discussed in the Bus State Analysis section Many are for file search selections in which the directory paths can be scanned for a desired file Other windows will appear when using help commands To select an item from a me...

Page 56: ...he source window variables F8 memory F3 the bus state analyzer data F4 and debug F10 windows Clicking on an item means positioning the mouse cursor on the item then quickly pressing and releasing the left mouse button The mouse operations are General Scroll through a window Click on the and symbols to right edge of the selected window Variable F8 Window Highlight items in the source and variables ...

Page 57: ...uctions beginning with the instruction at the address in the PC and stopping at the highlighted instruction in the source F2 window Click on GOTIL at the bottom of the source window Execute the instruction at the address in the PC Click on STEP at the bottom of the source window Display the source file line number of the highlighted line of the source F2 window along with its address disassembled ...

Page 58: ...lected for the last screen element or when ESC is pressed In the color matrix rows correspond to background colors and columns correspond to foreground colors This means that color choices from the same row result in differently colored letters and numbers against the same background color Making the background of highlights and help screens a different color sets these elements off from the main ...

Page 59: ...y Data 65 System Commands 66 Script Commands 66 Information Commands 67 Log File Commands 68 Debug Screen Control 69 Exit the Environment 70 Debug Commands 71 Setting CPU Registers 71 Memory Display 71 Reset Control of the Emulation System 72 Using Breakpoints 72 Tracing Instructions 73 Execution Instructions 73 Bus State Analyzer Commands 74 Configuring the Analyzer 74 Capturing Analyzer Data 74 ...

Page 60: ...te Analyzer Operation A start up script file described in Script Commands on page 66 can be set up to perform a set of commands automatically each time the MMDS software is run This start up file must have the name STARTUP 05 or STARTUP 08 System Initialization Initializing the MMDS system includes Initializing the communications baud rate Setting the memory map Initializing the clock speed Loadin...

Page 61: ...s over the debug screen To select a rate from this window use the arrow keys to highlight the rate then press CR or double click the mouse when the cursor is on the desired baud rate Standard Memory Mapping Various MCU designs require different memory map configurations of the MMDS system The appropriate memory map is specified in a personality file for each MCU that the EM supports These files ar...

Page 62: ...map to a file press the F6 function key then enter a filename in response to the prompt To prevent loss of system files a custom filename should not duplicate any files shipped with an EM module Press the F7 key to apply the map to memory without saving the map to a file for future use To cancel the command press ESC Use the load personality file LOADMEM command to load a stored custom map during ...

Page 63: ...d 1 MHz and an external clock source Loading User Software Software for the target system must be available on the host computer in S record format Use the LOAD command to load an S record file into the emulator and the accompanying map symbol file into the host computer The assembler shipped with the MMDS CASM has the ability to generate a current map each time an assembly program is assembled Th...

Page 64: ...e and the ASM command is used to modify the code the source code F2 window continues to show unmodified source code Enter the CLEARMAP command to delete the source code display To incorporate modifications into source code reassemble the code and download again The disassemble instructions DASM command complements the ASM command The DASM command allows memory contents to be disassembled displayin...

Page 65: ...tores the values beginning at the specified address When only an address is supplied the command displays the contents of the address followed by a prompt Enter the value and press CR The command displays the next address and its contents The command continues to store the values entered until a period is entered Both the BF and MM writes to memory are verified a write did not verify message is di...

Page 66: ...otes accuracy A script file is a text file of MMDS commands and is appropriate for any sequence of commands that is used often A special script file given the filename STARTUP 05 or STARTUP 08 executes automatically each time the MMDS software is loaded Sometimes a script file must contain a pause between commands The pause WAIT command causes the command interpreter to wait before processing subs...

Page 67: ...ACK command is entered This window displays the contents of the SP register at the top of the window The 12 bytes at the top of the stack are displayed to the left The interpretation of the stack shown to right in the window is valid only if the last push to the stack was caused by an interrupt NOTE The interrupt stack data to the right side of the window is an interpretation of the top five bytes...

Page 68: ...ing help information The view file VF command allows for text file viewing within a pop up screen Log File Commands The MMDS can maintain a log file that will capture events displayed on the debug screen Entries in the log include Commands entered on the command line Commands read from a script file Responses to commands Error messages Notifications of changes in status such as breakpoints and WAI...

Page 69: ...ght of the debug screen On entering MMDS software the window defaults to disassembled code the window title is CODE F2 and window contents are a disassembled representation of MCU memory In this object code display the disassembled instructions change when corresponding bytes of memory change Source code will be displayed if an S record file and its corresponding map file are loaded and the PC poi...

Page 70: ... to alter the default screen colors displayed in the various windows of the emulation environment To return to the default colors delete the filename COLORS 05 or COLORS 08 in the MMDS working directory Exit the Environment The debug environment can be exited either temporarily or permanently To shell to DOS temporarily use the SHELL command Type EXIT at the DOS prompt to return to the MMDS enviro...

Page 71: ...odify CPU register values Memory Display Memory contents are displayed in the memory F3 window When code execution is stopped 32 consecutive bytes of memory are displayed in both hexadecimal and ASCII format The memory display MD command specifies the beginning location of the 32 bytes displayed The window can be scrolled via the mouse or by selecting the window F3 and using page up down keys to v...

Page 72: ...N command allows the reset signal to enter into the emulation system through the target cable this signal must be enabled for correct operation of the WAIT4RESET command The RESETOUT command allows the RESET command to send a reset signal out the target cable Using Breakpoints The set instruction breakpoint BR command sets a breakpoint at a specific address or at each address of a range Breakpoint...

Page 73: ...TEP STEPFOR STEPTIL or T if the PC points to internal RAM such as option RAM or EEPROM or if the code branches into internal RAM or EEPROM The step commands are not real time They execute one instruction at a time then return control to the monitor Do not rely on timer values Execution Instructions The go G or GO command starts emulation at the address in the PC or at an address entered with the c...

Page 74: ...et multiplexer SXB command controls the option to either increase the bandwidth of the free running timer counter or enable capturing additional target test points through pod B Capturing Analyzer Data Once the analyzer is set up to a desired trigger configuration the arm bus state analyzer ARM command enables the analyzer to begin capturing bus cycles in the trace buffers The analyzer can be conf...

Page 75: ... If no more events exist the last captured cycle is displayed Identical commands for events B C and D are also available The go to next event NEXTE command searches for and displays the next occurrence of any of the four possible events The print trigger SHOWTRIGGER command finds the first occurrence of a trigger event in the bus state analyzer data The first and last 20 records of analyzer data c...

Page 76: ...Operation Fundamentals MMDS0508OM D 76 Operation Fundamentals MOTOROLA Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 77: ...e Bus Analyzer 79 Defining Events 79 Selecting the Trigger Mode 84 Selecting Options 86 Collecting Bus Data 87 Viewing Data 88 Searching the Trace Buffer 95 Using the Time Tag Clock 96 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 78: ...es Note that the analyzer is a bus state analyzer It does not show signal hold or setup times As part of analyzer initialization you define certain patterns of logical states as events or terms Then you select the analyzer mode continuous counted or any of five sequential modes This determines which cycles the analyzer stores Data collection cycle storage begins when you arm the analyzer and start...

Page 79: ...d term Press the space bar or point to the space with the cursor and click the left mouse button to put an X in this space Then move the cursor to other fields to enter values that define the rest of the event For control signal and logic clip fields type 0 1 or X don t care For the address and data use either the hexadecimal field or the binary field Type a hexadecimal digit or X in the hexadecim...

Page 80: ...Bus Analyzer MMDS0508OM D 80 Bus State Analysis MOTOROLA Figure 11 Bus State Analyzer Setup Screen Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 81: ... term R W Read Write 0 1 X MCU write cycle MCU read cycle Either read or write cycle D I Data Instruction 0 1 X Instruction fetch Data Don t care Pod A Clips GRN Green YEL Yellow ORG Orange RED Red BRN Brown 0 1 X Logic level 0 Logic level 1 Don t care Address Hex 0 F X Hexadecimal address value X is don t care Address Binary 0 1 X Binary address value X is don t care Data Hex 0 F X Hexadecimal da...

Page 82: ...right Next Item Tab Moves cursor to next item Preceding Item Shift Tab Moves cursor to preceding item HELP F1 Displays Help window LOAD F5 Loads a trigger file SET SAVE F6 Writes definitions to a trigger file SET EXECUTE F7 Applies definitions to bus analyzer and returns to Debug screen CLEAR F8 Clears definitions CANCEL ESC Cancels definitions and returns to Debug screen Freescale Semiconductor I...

Page 83: ...d C to D Put Xs in the range fields of events B and D Also note that you need not define all four terms When you have defined all appropriate terms you are ready to select the bus state analyzer trigger mode per Selecting the Trigger Mode Remember that the MMDS stores event definitions as 32 bit values The R W bit is the most significant bit MSB the D0 bit is the least significant bit LSB A range ...

Page 84: ...specified number of cycles as can the DARM or STOP command Counted events only When you enter the ARM and GO commands the trace buffer begins storing data that match an event definition for the specified number of cycles A breakpoint can stop storage before the analyzer stores the specified number of cycles as can the DARM or STOP command A B C D When you enter the ARM and GO commands the trace bu...

Page 85: ... occurrence of three events A B and C in order if event D does not occur If D occurs the sequencer starts again looking for event A Data storage ends after the specified number of post triggert cycles If you select this mode you must enable events A B and C Otherwise the bus state analyzer never can be triggered If you disable event D you convert this mode to a simple three event sequence A B C D ...

Page 86: ...part of analyzer setup is specifying the frequency and source of the time tag clock This clock provides a time reference value in each frame of the trace buffer Using the Time Tag Clock gives more information about the time tag clock Enter the time tag clock source TIMETAG command this command brings up the small time tag window in the center of the debug screen This window gives you these choices...

Page 87: ...ram execution The MCU status changes to Running If you are in a sequential mode you may be able to follow the occurrence of events from the highlighting changes Such highlighting changes may be too fast to be helpful Data collection continues through the specified number of counted events or post trigger cycles or until code execution stops NOTE The GO command is not the only program execution com...

Page 88: ...ss the F4 key repeatedly to change the display from one form to another Table 11 explains other key commands for the data screen If the data capture mode was sequential the data screen includes a trigger indicator T This screen indicator separates the pre trigger and post trigger cycles The F1 and F2 keys mark cycles 1 and 2 respectively The bus state analyzer uses these marked cycles in time tag ...

Page 89: ...ating the Bus Analyzer MMDS0508OM D MOTOROLA Bus State Analysis 89 Figure 12 Bus State Analyzer Data Screen Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 90: ... 2 F2 Marks highlighted frame as cursor 2 Go to cursor 1 Alt F1 Scrolls to cursor 1 Go to cursor 2 Alt F2 Scrolls to cursor 2 Go to trigger Alt T Scrolls to trigger frame Find F3 Defines a search pattern and scrolls to frame that matches pattern Disp F4 Changes display mode to next in sequence Raw Instructions Mixed Source data F7 Toggles display in Data column between hexadecimal and binary tt F8...

Page 91: ...tion display includes only the frames that contain instruction fetch cycles the instructions are displayed in disassembled form A frame is one line of BSA data valid at the end of a bus cycle Frames are numbered sequentially from the first bus cycle For a source code display Figure 15 the source file must be in the directory with the object file The source code display shows information similar to...

Page 92: ... the Bus Analyzer MMDS0508OM D 92 Bus State Analysis MOTOROLA Figure 13 Instructions Display Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 93: ... the Bus Analyzer MMDS0508OM D MOTOROLA Bus State Analysis 93 Figure 14 Mixed Raw Cycles and Instructions Delay Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 94: ...g the Bus Analyzer MMDS0508OM D 94 Bus State Analysis MOTOROLA Figure 15 Source Code Display Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 95: ...y commands for the find pattern window The frame field is decimal To scroll directly to a specific frame enter the frame number in this field If this is a don t care entry put a string of four Xs in this field Figure 16 Find Pattern Window Table 12 Find Pattern Window Key Commands Name Key Description Move Left Moves cursor one character to the left Move Right Moves cursor one character to the rig...

Page 96: ...uffer To clear the fields of the screen press the F8 key Using the Time Tag Clock There are four time tag display modes absolute relative cycles and none An absolute display mode shows the time reference from the first bus cycle A relative display mode shows the time between bus cycles A cycle display mode shows the cycle reference from the first bus cycle None blanks the timetag display You can c...

Page 97: ...the time tag clock period to obtain the elapsed time between the beginning and ending cycles For example if the beginning time tag value is 219 and the ending time tag value is 234 the difference is 15 time tag cycles At a time tag clock frequency of 4 MHz the time tag clock period is 0 25 µs and the elapsed time is 3 75 µs Had the same time tag values been obtained with a time tag clock frequency...

Page 98: ...Bus State Analysis MMDS0508OM D 98 Bus State Analysis MOTOROLA Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 99: ...5 BSATT BSA Timetag Mode 116 C Set Clear C Bit 117 CCR Set Condition Code Register 118 CHIPINFO Chip Help Information 119 CLEARMAP Remove Symbols 120 COLORS Set Screen Colors 121 DARM Disarm Bus State Analyzer 122 DASM Disassemble Instructions 123 ENDBSA Go to Trace Buffer End 124 EVAL Evaluate Argument 125 EXIT Terminate Host Session 126 G Begin Program Execution 127 GETBSA Upload Trace Buffer 12...

Page 100: ...t 149 NEXTD Go to Next D Event 150 NEXTE Go to Next Event 151 NOBR Clear Breakpoints 152 OSC Select Emulator Clock Frequency 153 PC Set Program Counter 154 QUIT Terminate Host Session 155 REG Display Registers 156 REM Add Comment to Script File 157 RESET Reset Emulation MCU 158 RESETGO Reset and Restart MCU 159 RESETIN Reset Input Enable 160 RESETOUT Reset Output Enable 161 RTMEM Set Real Time Mem...

Page 101: ...tion 180 SXB Set Multiplexer 181 SYSINFO System Information 182 T Single Step Trace 183 TIMETAG Time Tag Clock Source 184 V Set Clear V Bit 186 VAR Display Variable 187 VAR Display Variable 188 VER Display Version 189 VERSION Display Version 190 VF View File 191 WAIT Pause between Commands 192 WAIT4RESET Wait for Target Reset 193 WHEREIS Display Symbol Value 194 X Set X Index Register 195 XREG Set...

Page 102: ... command line command is a line of ASCII text that is entered via the computer keyboard Press CR to terminate each line activating the command The typical command syntax is command argument Where The command prompt The system displays this prompt in the debug F10 window when ready for another command command A command name in upper or lower case letters Refer to Table 14 for command choices argume...

Page 103: ...Specify the low value then the high value separated by a space Leading zeros can be omitted Symbol symbol label Symbols of ASCII characters usually symbols from source code Filename filename The name of a file in DOS format eight or fewer ASCII characters An optional extension three or fewer characters can be included after a period If the file is not in the current directory precede the file name...

Page 104: ...it HELP Display Help Information HOMEBSA Go to Trace Buffer Start HREG Set H Register HX Set HX index register I Set Clear I Bit INFO Display Line Information LF Log File LOAD Load S19 File LOADMAP Load Symbols LOADMEM Load Personality File LOADTRIGGERS Load Bus State Analyzer Setup MD Memory Display MM Memory Modify N Set Clear N Bit NEXTA Go to Next A Event NEXTB Go to Next B Event NEXTC Go to N...

Page 105: ... to Address STOP Stop Program Execution SXB Set Multiplexer Table 14 Command Sumary Continued Mnemonic Description SYSINFO System Information T Single Step Trace TIMETAG Timetag Clock Source V Set Clear V Bit VAR Display Variable VER Display Version VERSION Display Version VF View a File WAIT Pause between Commands WAIT4RESET Wait for Target Reset WHEREIS Display Symbol Value X Set X Index Registe...

Page 106: ...and sets the accumulator to a specified value The A and ACC commands are identical Syntax A n Where n The value to be loaded into the accumulator Example A 10 Set the accumulator to 10 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 107: ...he ACC command sets the accumulator to a specified value The ACC and A commands are identical Syntax ACC n Where n The value to be loaded into the accumulator Example ACC 20 Set the accumulator to 20 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 108: ... cycles while the emulator is executing user code Arming the analyzer clears the current contents of the analyzer trace buffer The word armed appears in the status area of the debug screen Syntax ARM Example ARM Arm the bus state analyzer for user code bus cycles Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 109: ...eriod Syntax ASM address Where address An address at which the assembler places the first machine code generated If address is not specified the system checks the address used by the previous ASM command then uses the following address for this ASM command Examples The first example shows the ASM command with an address argument asm 100 01009D NOP CLRA 01004F CLRA 01019D NOP The second example sho...

Page 110: ... the baud rate window A baud rate can be selected via this window NOTE At power up MMDS software automatically sets the maximum baud rate for the system If the baud rate is reduced but communication errors persist turn off the disk cache for instance SMARTDRV EXE Syntax BAUD rate Where rate One of these decimal baud rate values 2400 4800 9600 19 200 38 400 57 600 Example BAUD 9600 Change the commu...

Page 111: ...m The command first checks communication at the maximum possible rate of 57600 baud and successively lowers the rate until communication with the MMDS is established Syntax BAUDCHK Example BAUDCHK 57600 baud communicates well The command displays a message indicating the maximum available baud rate Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www...

Page 112: ... once if an argument is not entered To turn off the bell as it is sounding press any key Syntax BELL n Where n The hexadecimal number of times to sound the bell Examples BELL Sound the bell once BELL C Sound the bell 12 decimal times BELL 12 Sound the bell 18 decimal times Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 113: ...fault W n is a 16 bit value range A block range of memory defined by beginning and ending addresses n A value to be stored in a byte or word of the specified block If type is specified to be a byte value then n is an 8 bit value If type is specified to be a word value then n is a 16 bit value and is stored in each word of the block Examples BF 200 20F FF Store FF hexadecimal in bytes at addresses ...

Page 114: ...in the range defined by a previous BR command or if the range of a new BR command overlaps the range of an existing BR command An error message also appears if setting a 65th breakpoint is attempted Syntax BR address range symbol Where address The address for a breakpoint range The range of addresses for breakpoints a beginning address and an ending address separated by a space symbol The label of...

Page 115: ...ay mode to raw instruction mixed or source This command is equivalent to the BSA data screen F4 key Syntax Display BSA n Where n One of the following decimal values 1 Raw 2 Instruction 3 Mixed Raw and Instruction 4 Source Example C 0 Clear the C bit of the CCR Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 116: ...ode to absolute relative none or cycles This command is equivalent to the BSA data screen F8 key Syntax BSA TT n Where n One of the following decimal values 1 Absolute 2 Relative 3 None 4 Cycles Example C 0 Clear the C bit of the CCR Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 117: ...ZC V is two s complement overflow for M68HC08 MCU only and is 1 for M68HC05 MCU H is half carry I is IRQ interrupt mask N is negative Z is zero and C is carry A letter in these designators means that the corresponding bit of the CCR is set a period means that the corresponding bit is clear Syntax C 0 1 Where 0 Clears the C bit 1 Sets the C bit Example C 0 Clear the C bit of the CCR Freescale Semic...

Page 118: ...s complement overflow for M68HC08 MCU only and is 1 for M68HC05 MCU H is half carry I is IRQ interrupt mask N is negative Z is zero and C is carry A letter in these designators means that the corresponding bit of the CCR is set a period means that the corresponding bit is clear Syntax CCR n Where n The new hexadecimal value for the CCR Example CCR E4 Set the CCR to E4 N bit set others clear Freesc...

Page 119: ... topic then press CR The subordinate windows and their contents are REGISTERS Register addresses of the MCU being emulated Selecting an address opens another subordinate window that displays each bit of the register MEMORY MAP The memory map for the MCU being emulated VECTORS The vectors for the MCU being emulated PIN OUT The pin outs for the MCU being emulated Figure 17 Topics Window Syntax CHIPI...

Page 120: ...ol definitions in the host computer If a map file is loaded symbols or labels from the source code can be used as arguments for many other commands Syntax CLEARMAP Example CLEARMAP Clear symbols and their address definitions Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 121: ...same way The command ends when a color for the last screen element is selected or when ESC is pressed In the color matrix rows correspond to background colors and columns correspond to foreground colors This means that color choices from the same row result in differently colored letters and numbers against the same background color Making the background of highlights and help screens a different ...

Page 122: ... disarmed the analyzer does not record bus cycles The word Disarmed appears in the status area of the debug screen If the bus state analyzer is already disarmed this command does nothing Syntax DARM Example DARM Disarm the bus state analyzer Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 123: ...value is entered the system disassembles three instructions address2 The ending address for disassembly If an address2 value is entered disassembly begins at address1 and continues through address2 The screen scrolls upward as addresses and their contents are displayed leaving the last instructions in the range displayed in the window Example Disassemble and display three instructions beginning at...

Page 124: ...ed uploaded trace buffer data Subsequent execution of the SCREENBSA command logs the last 20 records of analyzer data to the open log file Syntax ENDBSA Example LF filename Open a log file GETBSA Upload captured analyzer ENDBSA Position trace buffer pointer to last record SCREENBSA Log first 20 records to open log file Freescale Semiconductor I Freescale Semiconductor Inc For More Information On T...

Page 125: ...ddition subtraction multiplication and division Syntax EVAL n1 op n2 Where n1 A number to be evaluated or the first operand of a simple expression to be evaluated op The arithmetic operator or of a simple expression to be evaluated n2 The second operand of a simple expression to be evaluated Example Evaluate the sum of hexadecimal numbers 45 and 32 then display the result in four bases and as an A...

Page 126: ...terminates the host session and returns to DOS The EXIT and QUIT commands are identical Another way to end a host session is to enter the ALT X keyboard combination Syntax EXIT Example EXIT Return to DOS Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 127: ...s the value into the program counter PC then starts execution at the address in the PC If an address1 value is not entered execution begins at the address already in the PC address2 Execution stop address The address2 value must be an instruction fetch address if it is not code execution continues as if the command had no address2 value symbol The label of an instruction in source code NOTE Be car...

Page 128: ... host computer This is convenient when using a script file in conjunction with the bus state analyzer Alternatively the trace buffer data can be retrieved and displayed using the F4 function key Syntax GETBSA Example GETBSA Upload trace buffer contents to the host computer Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 129: ...s the value into the program counter PC then starts execution at the address in the PC If an address1 value is not entered execution begins at the address already in the PC address2 Execution stop address The address2 value must be an instruction fetch address if it is not code execution continues as if the command had no address2 value symbol The label of an instruction in source code NOTE Be car...

Page 130: ...tax GOTIL address symbol Where address Execution stop address The address value must be an instruction fetch address if it is not code execution continues as if the command had no address value symbol The label of an instruction in source code NOTE Be careful about using the G GO or GOTIL commands if the code branches into internal RAM for instance option RAM or EEPROM An execution stop address is...

Page 131: ...V is two s complement overflow for M68HC08 MCU only and is 1 for M68HC05 MCU H is half carry I is IRQ interrupt mask N is negative Z is zero and C is carry A letter in these designators means that the corresponding bit of the CCR is set a period means that the corresponding bit is clear Syntax H 0 1 Where 0 Clears the H bit 1 Sets the H bit Example H 1 Set the H bit of the CCR Freescale Semiconduc...

Page 132: ...e the description includes examples and clarifying notes Selecting key commands brings up a list of screens in which function key assignments differ Select a screen to see its function key assignments Use the arrow keys to scroll within the page use the page up and page down keys to see other pages To exit the HELP data base and return to the previous screen press the ESC key Syntax HELP command W...

Page 133: ...le and loaded uploaded trace buffer data Subsequent execution of the SCREENBSA command logs the first 20 records of analyzer data to the open log file Syntax HOMEBSA Example LF filename Open a log file GETBSA Upload captured analyzer HOMEBSA Position trace buffer pointer to first record SCREENBSA Log first 20 records to open log file Freescale Semiconductor I Freescale Semiconductor Inc For More I...

Page 134: ...r the MMDS08 only The HREG command sets the upper byte of the index register to the specified value Syntax HREG n Where n The new value for the H register Example HREG F0 Set the H register value to F0 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 135: ... is for the MMDS08 only The HX command sets both bytes of the concatenated index register H X to the specified value Syntax HX n Where n The new value for the H X register Example HX 0400 Set the H X index register to 400 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 136: ... complement overflow for M68HC08 MCU only and is 1 for M68HC05 MCU H is half carry I is IRQ interrupt mask N is negative Z is zero and C is carry A letter in these designators means that the corresponding bit of the CCR is set a period means that the corresponding bit is clear Syntax I 0 1 Where 0 Clears the I bit 1 Sets the I bit Example I 1 Set the I bit of the CCR Freescale Semiconductor I Free...

Page 137: ...ss corresponding object code and the disassembled instruction Syntax INFO Example INFO Filename 05TESTCO ASM Line number 117 Address 0100 Disassembly 0100 99 SEC If a map file is loaded and the highlighted instruction has a label the label will be displayed in the disassembly line in place of the address Example INFO Filename 05TESTCO ASM Line number 117 Address 0100 Disassembly START 99 SEC Frees...

Page 138: ...the file If the specified file does exist already the command prompts for overwrite or append File exists Rewrite or Append R If CR accept the default is pressed or R and CR the log entries overwrite the data in the existing file If A and CR are pressed the system appends log entries to the file Syntax LF filename Where filename The DOS filename of the log file the command interpreter does not ass...

Page 139: ...or files with other extensions A path name followed by the asterisk wildcard character can be entered In that case the command displays a window that lists the files in the specified directory that have the S19 extension Examples LOAD PROG1 S19 Load file PROG1 S19 and its map file into the emulator at the load addresses in the file LOAD PROG2 Load file PROG2 S19 and its map file into the emulator ...

Page 140: ...ion must be specified for files with other extensions A pathname followed by the asterisk wildcard character can be entered In that case the command displays a window that lists the files in the specified directory that have the MAP extension Examples LOADMAP PROG1 MAP Load map file PROG1 MAP into the host computer LOADMAP PROG2 Load map file PROG2 MAP into the host computer LOADMAP A Display the ...

Page 141: ...of the memory mapping file to be loaded An extension of MEM is the default and can be omitted If a pathname followed by the asterisk wildcard character is entered the command displays a window that lists the files in the specified directory that have the MEM extension If a MEM file is selected that is not appropriate for the current EM installed an error will be generated Examples LOADMEM 000P4V01...

Page 142: ... the default and can be omitted The extension must be specified for files with other extensions You can enter a pathname followed by the asterisk wildcard character In that case the command displays a window that lists the files in the specified directory that have the SET extension Examples LOADTRIGGERS BSA SET Make BSA SET the current BSA setup file LOADTRIGGERS BSA8 Make BSA8 SET the current BS...

Page 143: ... address is the first of the 32 locations If a log file is open this command also writes the first 16 values to the log file Syntax MD address Where address The starting memory address for display in the memory window Example MD 1000 Display the contents of 32 bytes of memory beginning at address 1000 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to ...

Page 144: ...the specified address This command does not alter the contents of CPU registers such as the program counter PC Syntax MM address data data Where address The address of a memory location to be modified data The value s to be stored at the address location If more than one data byte is supplied the two data bytes are stored in consecutive memory locations starting at the address argument If data is ...

Page 145: ... c If the carat character is entered flow will sequence backward to the previous address d If the period character is entered flow will terminate and return to the command line prompt Examples The first example does not have a data value in the command line permitting entry of new values for consecutive addresses Entering a period instead of a new value stops the command MM 1000 1000 0F 05 1001 10...

Page 146: ... complement overflow for M68HC08 MCU only and is 1 for M68HC05 MCU H is half carry I is IRQ interrupt mask N is negative Z is zero and C is carry A letter in these designators means that the corresponding bit of the CCR is set a period means that the corresponding bit is clear Syntax N 0 1 Where 0 Clears the N bit 1 Sets the N bit Example N 1 Set the N bit of the CCR Freescale Semiconductor I Free...

Page 147: ...open this command also writes that frame to the log file If the NEXTA event cannot be found the last captured event in the trace buffer is displayed Syntax NEXTA Example NEXTA Scroll the bus state analyzer display to the next A event Related Key Command Alt A while in the bus state analyzer data window Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to...

Page 148: ...ommand also writes that frame to the log file If the NEXTB event cannot be found the last captured event in the trace buffer is displayed Syntax NEXTB Example NEXTB Scroll the bus state analyzer display to the next B event Related Key Command Alt B while in the bus state analyzer data window Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freesc...

Page 149: ...open this command also writes that frame to the log file If the NEXTC event cannot be found the last captured event in the trace buffer is displayed Syntax NEXTC Example NEXTC Scroll the bus state analyzer display to the next C event Related Key Command Alt C while in the bus state analyzer data window Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to...

Page 150: ...ommand also writes that frame to the log file If the NEXTD event cannot be found the last captured event in the trace buffer is displayed Syntax NEXTD Example NEXTD Scroll the bus state analyzer display to the next D event Related Key Command Alt D while in the bus state analyzer data window Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freesc...

Page 151: ...the debug window If a log file is open this command also writes that frame to the log file If another event is not found the last captured event in the trace buffer is displayed Syntax NEXTE Example NEXTE Scroll the bus state analyzer display to the next event Related Key Command Alt E while in the bus state analyzer data window Freescale Semiconductor I Freescale Semiconductor Inc For More Inform...

Page 152: ...ddress values it clears all instruction breakpoints in the range the addresses define Syntax NOBR address range symbol Where address The address of a single breakpoint to be removed range The range of addresses from which all breakpoints should be removed symbol The label of an instruction in source code Examples NOBR Clear all current instruction breakpoints NOBR 120 Clear the instruction breakpo...

Page 153: ... clock rate is 2 MHz For the MMDS08 six clock frequencies are available The five internally generated clock frequencies are available 16 MHz 8 MHz 4 MHz 2 MHz and 1 MHz and an external clock source The default emulator clock rate is 4 MHz Entering this command without the rate argument brings up the EM oscillator window An oscillator frequency can be selected via this window NOTE Many EMs require ...

Page 154: ...er PC The PC command sets the program counter PC to the specified address Syntax PC address Where address The new address value for the PC Example PC 0500 Set the PC to 0500 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 155: ...IT command terminates the host session and returns to DOS The QUIT and EXIT commands are identical Another way to end a host session is to enter the ALT X keyboard combination Syntax QUIT Example QUIT Return to DOS Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 156: ...nts of the CPU registers in the debug F10 window The command also will display the instruction pointed to by the current program counter value Syntax REG Example REG PC 1196 A 00 X 90 SP FF CCR FA BRCLR 1 0003 119C Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 157: ...isplay comment to a script file When the script file is executed the system displays this comment Syntax REM text Where text The display comment Example REM Program executing Display program executing only during script file execution Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 158: ...U and sets the program counter to the contents of the reset vector This command does not start execution of user code To reset and execute user code use the RESETGO or WAIT4RESET command Syntax RESET Example RESET Reset the MCU Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 159: ...SETGO The RESETGO command resets the emulation MCU sets the program counter PC to the contents of the reset vector then starts execution from that address Syntax RESETGO Example RESETGO Reset the MCU and go Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 160: ...ed a reset signal from the target system cannot reset the emulating MCU The word Resetin appears in the debug screen status area to show the enabled state The state must be enabled for proper operation of the WAIT4RESET command NOTE Certain EMs include a hardware jumper that governs target resets Such a jumper must be configured correctly to use the RESETIN command Consult the EM user s manual for...

Page 161: ...e word Resetout appears in the debug screen status area to show the enabled state If this state is disabled entering the RESET command resets only the emulating MCU The RESETOUT command also pertains to resets done via the RESETGO command NOTE Certain EMs include a hardware jumper that governs target resets Such a jumper must be configured correctly to use the RESETOUT command Consult your EM user...

Page 162: ...lus real time variables created via the RTVAR command All this real time memory must fit within a 1 Kbyte block If an RTMEM command would result in real time memory that would not fit within the 1 Kbyte block due to established real time variables the system will not accept the RTMEM command If any of the real time memory overlays MCU I O or EEPROM addresses it is available only for monitoring emu...

Page 163: ...rgument enables display of variables in byte word or string format A byte display is hexadecimal and binary a word display is hexadecimal and decimal and a string display is ASCII For an ASCII string the optional n argument specifies the number of characters the default is the maximum 11 characters Control and other non printing characters appear as periods Syntax RTVAR type address symbol n Where...

Page 164: ... VAR commands Real time memory consists of memory enabled by the RTMEM command plus real time variables created via the RTVAR command All this real time memory must fit within a 1 Kbyte block If an RTVAR command would create a real time variable that would not fit within the 1 Kbyte block due to established real time variables or memory enabled by the RTMEM command the system will not accept the R...

Page 165: ...nalyzer Screen SCREENBSA The SCREENBSA command copies the current bus state analyzer display to an open log file Syntax SCREENBSA Example SCREENBSA Copy the bus state analyzer display to the log file Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 166: ... levels deep If the script file has the filename STARTUP 05 the script file will be executed each time the MMDS is started Syntax SCRIPT filename Where filename The name of the script file to be executed An extension of SCR is the default and can be omitted The extension must be specified for files with other extensions A path name followed by the asterisk wildcard character can be entered In that...

Page 167: ...name at the prompt The system saves the new MEM file under the specified name If a file by the specified name already exists a notice is made with the option to overwrite The emulator can load this file using the LOADMEM instruction at a future time Pressing Execute F7 will use the newly defined memory map for the current debug session only Figure 18 Custom Map Window RAM1 XXXX XXXX RAM2 XXXX XXXX...

Page 168: ... normal RAM and ROM ranges temporarily during debugging Be sure to restore the original size and configuration of the MCU memory before final debugging Otherwise the code could fail to fit or run in an MCU s memory space The SETMEM and SHOWMEM commands only show MMDS resources That is memory that is resident on the control board during emulation Use the CHIPINFO command memory map feature to view ...

Page 169: ...to MMDS from DOS enter EXIT at the DOS prompt MMDS continues to run during the shell to DOS This could mean that the memory for other software is insufficient Syntax SHELL Example SHELL Access the DOS shell To return to the emulator session type EXIT at the DOS prompt Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 170: ...pies a specified range of the current BSA display to the debug window and an open log file Syntax SHOWBSA range Where range The range of BSA frames a beginning frame and an ending frame separated by a space Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 171: ... MMDS resources That is memory that is resident on the control board during emulation Use the CHIPINFO command memory map feature to view internal I O option RAM and EEPROM locations Syntax SHOWMEM Example SHOWMEM Display current memory map blocks Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 172: ...lays the trigger frame of the bus state analyzer buffer If a log file is open this command also writes the trigger frame to the log file Syntax SHOWTRIGGER Example SHOWTRIGGER Display the bus state analyzer trigger frame Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 173: ...en or this command has no effect NOTE The main screen includes certain extended ASCII characters When subsequently viewing a screen snapshot a standard ASCII editor will display a few characters that do not match the original screen Syntax SNAPSHOT Example SNAPSHOT Capture screen save to a log file Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www...

Page 174: ...LOAD command and 2 The program counter PC points to a memory area covered by the map file Once a MAP file has been loaded and the PC points to an area of user code the SOURCE command can be used to toggle between source code and object code If a mouse is installed the symbols that appear at the bottom of the window can be selected Use the mouse or arrow keys to scroll through the information in th...

Page 175: ...ructions to be executed Hexadecimal 7FF is the maximum value NOTE Do not use any step command ST STEP STEPFOR STEPTIL or T if the PC points to internal RAM or EEPROM or if the code branches into internal RAM or EEPROM The step commands are not real time They execute one instruction at a time then return control to the monitor Do not rely on timer values Examples ST Execute the instruction at the c...

Page 176: ... ESC key to remove the stack window and return to the debug window Syntax STACK Example STACK Display the current configuration of the stack NOTE The interrupt stack data to the right side of the window is an interpretation of the top five bytes on the stack If the last push to the stack was due to a BSR or JSR instruction five bytes were not pushed to the stack and the interrupt stack information...

Page 177: ...structions to be executed Hexadecimal 7FF is the maximum value NOTE Do not use any step command ST STEP STEPFOR STEPTIL or T if the PC points to internal RAM or EEPROM or if the code branches into internal RAM or EEPROM The step commands are not real time They execute one instruction at a time then return control to the monitor Do not rely on timer values Examples STEP Execute the instruction at t...

Page 178: ...ep command ST STEP STEPFOR STEPTIL or T if the PC points to internal RAM for instance option RAM or EEPROM or if the code branches into internal RAM or EEPROM The step commands are not real time They execute one instruction at a time then return control to the monitor Do not rely on timer values Example STEPFOR Execute instructions continuously until the user presses a key Freescale Semiconductor ...

Page 179: ...his location must be an instruction address NOTE Do not use any step command ST STEP STEPFOR STEPTIL or T if the PC points to internal RAM or EEPROM or if the code branches into internal RAM or EEPROM The step commands are not real time They execute one instruction at a time then return control to the monitor Do not rely on timer values Example STEPTIL 0400 Execute instructions continuously until ...

Page 180: ...ion STOP The STOP command stops user program execution and updates the debug screens with current data Syntax STOP Example STOP Stop program execution and update the debug screen Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 181: ...ult is to use the 16 bit timetag and pod B NOTE When using the logic clip cables always attach the black clip to ground Syntax SXB CLIPS TAGS Where CLIPS Directs the analyzer to capture the pod B logic clips with 16 bit timetag counter TAGS Directs the analyzer to capture a 24 bit timetag counter Example SXB TAGS Select extended time tag bits Freescale Semiconductor I Freescale Semiconductor Inc F...

Page 182: ...lls to DOS for the amount of memory available then displays this information in the debug F10 window Syntax SYSINFO Example SYSINFO Show system information Total memory available 187488 Largest free block 187488 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 183: ... executed Hexadecimal 7FF is the maximum value NOTE Do not use any step command ST STEP STEPFOR STEPTIL or T if the PC points to internal RAM for instance option RAM or EEPROM or if the code branches into internal RAM or EEPROM The step commands are not real time They execute one instruction at a time then return control to the monitor Do not rely on timer values Examples T Execute the instruction...

Page 184: ...k source The pod B connector is the closest to the front of the station module NOTE When using the logic clip cables always attach the black clip to ground Syntax TIMETAG source rate Where source The source for the analyzer timetag clock The clock can be provided from one of four sources 1 Internal MMDS platform board programmable external or emulation module With no source specified the internal ...

Page 185: ...n external source or the MCU bus clock are used for the timetag clock the rate value entered is only used for timing calculations displayed in the analyzer data screen Examples TIMETAG Display the time tag window for user selection of a frequency or source TIMETAG 8 Select the 8 MHz time tag frequency TIMETAG PR 120 Select a 120 Hz programmable source TIMETAG EX 32768 Select the external source an...

Page 186: ... CPU window The CCR pattern is V11HINZC V is overflow H is half carry I is IRQ interrupt mask N is negative Z is zero and C is carry A letter in these designators means that the corresponding bit of the CCR is set a period means that the corresponding bit is clear Syntax V 0 1 Where 0 Clears the V bit 1 Sets the V bit Example V 0 Clears the V bit in the CCR Freescale Semiconductor I Freescale Semi...

Page 187: ...The type argument enables display of variables in byte word or string format A byte display is hexadecimal and binary a word display is hexadecimal and decimal and a string display is ASCII For an ASCII string the optional n argument specifies the number of characters the default is the maximum 11 characters Control and other non printing characters appear as periods Syntax VAR type address symbol...

Page 188: ...he byte at address 100 VAR B 110 Display in hexadecimal and binary the byte at address 110 VAR W 102 Display in hexadecimal and decimal the word at address 102 VAR S 200 5Display the 5 character ASCII string starting at address 200 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 189: ...n of the host software and of the current personality MEM file The abbreviated VER is equivalent to the VERSION command Syntax VER Example VER Display the version numbers of the host software and the currently loaded personality file Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 190: ...host software and of the current personality MEM file The abbreviated VER form of this command also can be used Syntax VERSION Example VERSION Display the version numbers of the host software and the currently loaded personality file Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 191: ... filename Where filename Any text file Examples VF test log Displays test log in view file screen VF asm Displays the names of the asm files NOTE The view file buffer size is determined by the total memory available see SYSINFO command if the selected file exceeds memory resources The entire file will not be viewed Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This ...

Page 192: ...e for a specified hexadecimal number of seconds The default is five This command is useful primarily in script files Syntax WAIT n Where n The hexadecimal number of seconds to pause Example WAIT A Pause the command interpreter for 10 seconds Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 193: ... system provides a reset signal For this command to function properly enable the state of the MMDS with a reset signal from the target system See the explanation of the RESETIN command To restore the emulator to the IDLE state enter the RESET command Syntax WAIT4RESET Example WAIT4RESET Wait for reset Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to ...

Page 194: ...f one is assigned If the symbol is the same as a hexadecimal address the command shows the hexadecimal address not the address of the symbol Syntax WHEREIS symbol address Where symbol A symbol listed in the symbol table address An address for which a symbol is desired Examples WHEREIS START Display the symbol START and its value WHEREIS 0100 Display the value 0100 and its symbol if any Freescale S...

Page 195: ... command sets the index register X to the specified value The X command is identical to the XREG command Syntax X n Where n The new value for the X register Example X 05 Set the index register value to 05 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 196: ...sets the index register X to the specified value The XREG command is identical to the X command Syntax XREG n Where n The new value for the X register Example XREG F0 Set the index register value to F0 Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 197: ... s complement overflow for M68HC08 MCU only and is 1 for M68HC05 MCU H is half carry I is IRQ interrupt mask N is negative Z is zero V is overflow and C is carry A letter in these designators means that the corresponding bit of the CCR is set a period means that the corresponding bit is clear Syntax Z 0 1 Where 0 Clears the Z bit 1 Sets the Z bit Example Z 0 Clears the Z bit in the CCR Freescale S...

Page 198: ...d toggles the size of the source window between normal and enlarged Another way to resize the source window is to enter the ALT Z keyboard combination Syntax ZOOM Example ZOOM Resize the source window Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 199: ...troduction The Motorola S record format was devised for the purpose of encoding programs or data files in a printable format for transportation between computer systems This transportation process can therefore be monitored and the S records can be easily edited Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 200: ...smission is ensured by the record length byte count and checksum fields TYPE RECORD LENGTH ADDRESS CODE DATA CHECKSUM Table 15 S Record Field Description Field Printable Character s Contents Type 2 S record type S0 S1 etc Record Length 2 Character pair count in the record excluding the type and record length Address 4 6 or 8 2 3 or 4 byte address at which the data field is to be loaded into memory...

Page 201: ...9 record which terminates data transfer An S record format may contain the following record types Only one termination record is used for each block of s records Normally only one header record is used although it is possible for multiple header records to occur S0 Header record for each block of S records The code data field may contain any descriptive information identifying the following block ...

Page 202: ...0084E42234300182342000824A952 S107003000144ED492 S9030000FC The above format consists of an S0 header record four S1 code data records and an S9 termination record The S0 header record is described in Table 16 Table 16 S0 Record Description Field S Record Entry Description Type S0 S record type S0 indicating a header record Record Length 06 Hexadecimal 06 decimal 6 indicating six character pairs o...

Page 203: ...ld S Record Entry Description Type S1 S record type S1 indicating a code data record to be loaded verified at a two byte address Record Length 13 Hexadecimal 13 decimal 19 indicating 19 character pairs representing 19 bytes of binary data follow Address 0000 Four character two byte address field hexadecimal address 0000 indicates location where the following data is to be loaded Code Data Opcode I...

Page 204: ...ting a termination record Record Length 03 Hexadecimal 03 indicating three character pairs three bytes follow Address 0000 Four character two byte address field zeroes Code Data There is no code data in a S9 record Checksum FC Checksum of S9 record Table 19 Example of S Record Encoding TYPE LENGTH ADDRESS CODE DATA CHECKSUM S 1 1 3 0 0 0 0 2 8 5 F 2 A 5 3 3 1 3 1 3 3 3 0 3 0 3 0 3 0 3 2 3 8 3 5 4 ...

Page 205: ... 96 Viewing Data 88 C C 117 Cables Connecting Host Computer 26 Power 27 Target 27 CCR 118 CHIPINFO 119 CLEARMAP 120 COLORS 121 Colors Changing Screen 58 70 121 Command Lines A 106 ACC 107 ARM 108 ASM 64 109 BAUD 54 61 110 BAUDCHK 61 111 BELL 66 112 BF 65 113 BR 57 72 114 BSAMODE 115 BSATT 116 C 117 CCR 118 CHIPINFO 68 119 CLEARMAP 120 COLORS 58 70 121 Commands 102 DARM 122 DASM 64 123 ENDBSA 124 E...

Page 206: ...53 62 167 168 SHELL 70 169 SHOWBSA 170 SHOWMEM 68 171 SHOWTRIGGER 172 SNAPSHOT 69 173 SOURCE 48 69 174 ST 73 175 STACK 52 176 STEP 57 73 177 STEPFOR 73 178 STEPTIL 73 179 STOP 57 180 Summary Table 103 SXB 181 Syntax 102 SYSINFO 67 182 T 73 183 TIMETAG 184 V 186 VAR 49 188 VER 67 189 VERSION 67 190 VF 191 WAIT 66 192 WAIT4RESET 72 193 WHEREIS 67 194 X 195 XREG 196 Z 197 ZOOM 57 70 198 Command Types...

Page 207: ...the EM 25 Reset Switch 28 Signal Descriptions Connector 28 HELP 132 HOMEBSA 133 Host Computer Requirements 16 HREG 134 HX 135 I I 136 INFO 137 Initialization and Loading 35 Clock Speed 63 Memory 63 Initialization Commands 60 Introduction 11 J Jumper Headers Factory Test J1 23 Port Voltage Control J2 J4 24 K Key Commands Debug Screen Windows 45 Main Windows 42 Pop Up Windows 51 Source Code F2 Windo...

Page 208: ...Assignments Connector 28 Platform Board Configuration 22 Pod 31 Port Voltage Control Jumper Headers J2 J4 24 Q QUIT 155 R REG 156 REM 157 RESET 158 RESETGO 159 RESETIN 160 RESETOUT 161 RTMEM 162 RTVAR 163 S SCREENBSA 165 Screens Baud Window 54 CPU Window 47 Debug F10 Window 50 Emulator Clock Frequency Window 54 Emulator Clock Frequency Window MMDS05 54 153 Emulator Clock Frequency Window MMDS08 55...

Page 209: ...6 Installation 36 Personality Files 37 Target Loading 63 Using 37 SOURCE 174 ST 175 STACK 176 STARTUP 05 Script File 60 66 STARTUP 08 Script File 60 66 STEP 177 STEPFOR 178 STEPTIL 179 STOP 180 SXB 181 SYSINFO 182 System Commands 66 Components 15 Connections 26 T T 183 TIMETAG 184 V V 186 VAR 187 188 VER 189 VERSION 190 VF 191 W WAIT 192 WAIT4RESET 193 WHEREIS 194 Windows Operation 37 X X 195 XREG...

Page 210: ...Index MMDS0508OM D 210 Index MOTOROLA Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 211: ...Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc ...

Page 212: ...d create a situation where personal injury or death may occur Should Buyer purchase or use Motorola products for any such unintended or unauthorized application Buyer shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim...

Reviews: