
MPC8BUG USER'S MANUAL MPC8BUG USER'S MANUAL APRIL 27, 1996 REVISION 0.6 1 MPC8BUG USER'S MANUAL CHAPTER 1 MPC8BUG OVERVIEW 1.1 INTRODUCTION This document describes the monitor debugger for the Motorola MPC860 PowerQUICC processor device. This debugger runs on a host machince such as an IBM-PC or Sun and controls the PowerQUICC on the 860 Application Development System (860ADS) board. The generic name for a family of host-based PowerPC debuggers is "MPCbug". The name for this debugger as specifically implemented for the MPC8xx series of devices (such as the MPC860) is "MPC8bug". In this document both terms are used since most of the features of MPC8bug apply to the more generic "MPCbug". 1.2 FEATURES • Works through the debug port on the MPC860. • Communication between the host and the ADS board is through an ADI card. • Hosted on Sun Sparcstations and IBM-PC (486 and higher) compatible platforms. • User interface consists of mnemonic type commands. • Allows the user to modify and display board memory and MPC860 registers in a variety of formats. • An on-line assembler is provided (extended mnemonics not included) • Provides an interface to the MPC860 breakpoint logic. • Loads programs in COFF, XCOFF, ELF, or Srecords format. • Provides aliases, command files, automatic initialization command file and log files. • Disassembled instructions provide symbolic information (which can also be used in address expressions). • Supports system calls, program I/O and command line arguments. 2 MPC8BUG USER'S MANUAL CHAPTER 2 STARTING THE DEBUGGER 2.1 COMMAND LINE ARGUMENTS mpc8bug ADI ADS [-nosem] [object_file] [-c command_file] [-o log_file] ADI- a number in the range 1-3. On a Sparcstation: The number of the SBus slot of the ADI card. On a PC: address of the port of the ADI card divided by 0x100. ADS- address of ADS board (0-7). (determined by dip switches on the board.) nosem - suppress semaphore allocation upon activation. (By default, allows only one debugger to be activated per each ADI port.) This argument is not applicable in IBM-compatible PCs. object_file - name of a program to load. command_file - name of a file containing debugger commands. log_file - name of a file to which session history will be logged. Example: mpc8bug 1 7 IMPORTANT NOTE: If this is the first use of the debugger since the 860ADS has been powered up from a cold start, the first command issued to the debugger should be a hard reset: "RESET :H". NOTE: It is suggested not to use the ABORT or RESET buttons on the 860ADS board, but rather use the abort and reset commands provided within this debugger. If any buttons on the board are pressed, the first command issued to the debugger should be a hard reset: "RESET :H". This avoids any synchronization problems between the debugger and the 860ADS board. 2.2 PC CONFIGURATION The PC version requires: • A 486/586 processor, at least 4MB of memory, Dos6.0 or later. • The frequency of the ISA bus in the BIOS setup must be set to no more than 8Mhz to ensure correct operation of the ADI card. Otherwise mpc8bug will not work. • The length of the flat cable should not exceed 1 meter. 3 MPC8BUG USER'S MANUAL CHAPTER 3 MPC860 INITIALIZATION 3.1 INITIALIZATION VALUES When mpc8bug is activated, it resets the ADS board. After reset, assuming the board is populated with the default memories, the following register initializations take place: Core registers: MSR and SRR1 = 0x00001002 DER = 0xffe74c0f IMMR = 0x0220XXXX ICTRL = 0x00000007 SIU registers: SIUMCR = The old value bitwise OR’ed with 0x00032640 SYPCR = 0xffffff88 TBSCR = 0x0002 RTCSC = 0x0102 PISCR = 0x0002 The UPM and Memory Controller are initialized only after a hard reset. Memory Controller: OR0 = 0xffe00954 OR1 = 0xffff8110 OR2 = 0xffc00800 BR0 = 0x02800001 BR1 = 0x02100001 BR2 = 0x00000081 MPTPR = 0x0800 MAMR = 0x9ca21114 UPM contents for the default ADS memory configuration: Read Single Beat Cycle: 00: 8fffec24 0fffec04 0cffec04 00ffec04 04: 00ffec00 37ffec47 ffffffff ffffffff Read Burst Cycle: 08: 0fffec24 0fffec04 08ffec04 00ffec0c 4 MPC8BUG USER'S MANUAL 0c: 03ffec00 00ffec44 00ffcc08 0cffcc44 10: 00ffec0c 03ffec00 00ffec44 00ffcc00 14: 3fffc847 3fffec47 ffffffff ffffffff Write Single Beat Cycle: 18: 8fafcc24 0fafcc04 0cafcc00 11bfcc47 1c: c0ffcc84 ffffffff ffffffff ffffffff Write Burst Cycle: 20: 8fafcc24 0fafcc04 0cafcc00 03afcc4c 24: 0cafcc00 03afcc4c 0cafcc00 03afcc4c 28: 0cafcc00 33bfcc4f ffffffff ffffffff 2c: ffffffff ffffffff ffffffff ffffffff Periodic Timer Expired: 30: c0ffcc84 00ffcc04 07ffcc04 3fffcc06 34: ffffcc85 ffffcc05 ffffcc05 ffffffff 38: ffffffff ffffffff ffffffff ffffffff Exception: 3c: 33ffcc07 ffffffff ffffffff ffffffff 3.2 INITIAL ADS MEMORY MAP The initial ADS memory map is the following: Chip Select 0 - Flash Memory - 0x02800000 - 0x029fffff Chip Select 1 - Board Control and Status register - 0x02100000 - 0x02103fff Chip Select 2 - DRAM - 0x00000000 - 0x003fffff Internal memory - 0x02200000 3.3 INITIALIZATION COMMAND FILE When mpc8bug is activated, following reset and register initializations, it automatically executes the commands included in a configuration file. The configuration file is used to define aliases and memory mapped registers. It can also be used for other purposes, such as to reach a predefined state in a debug session. The name of the automatic command file on a Sparcstation is: .mpc860.cfg On a PC the name is mpc860.cfg The EX command allows the user to execute other command files besides the default ones above. 5 MPC8BUG USER'S MANUAL CHAPTER 4 DEBUG MONITOR COMMANDS 4.1 ENTERING DEBUGGER COMMAND LINES MPC8bug performs various operations in response to user commands entered at the keyboard. When the debugger prompt MPC860> appears on the terminal screen the debugger is ready to accept commands. As the command line is entered it is stored in an internal buffer. Execution begins only after the carriage return is entered. The debugger executes commands and returns the MPC860> prompt. However, if the entered command causes execution of user target code, (i.e., GO), then control may or may not return to the debugger. This depends upon the user program function. For example, if a breakpoint is specified, then control returns to the debugger when the breakpoint is encountered. Also refer to the paragraphs which detail elements of the GO commands. In general debugger commands include: A command identifier (i.e., MD or md for the memory display command). Both upper- or lower-case characters are allowed for command identifiers and options. At least one intervening space before the first argument. Any required arguments, as specified by command. An option field, set off by a semicolon (:) to specify conditions other than the default conditions of the command. Multiple debugger commands may be entered on a single command line by separating the commands with the explanation point (;) character. The meta-symbols are: <> Angled brackets enclose a parameter value. The enclosed symbol may occur zero or one time. In some cases, where noted, characters in angled brackets are required. [] Square brackets enclose an optional symbol. The enclosed symbol may occur zero or one time. []... Square brackets followed by periods enclose a symbol that is optional/repetitive. The symbol within the brackets may appear zero or more times. 6 MPC8BUG USER'S MANUAL | This symbol indicates that a choice is to be made. Select one of several symbols separated by a straight line. / Select one or more of the symbols separated by the slash. {} Brackets enclose optional symbols that may occur zero or more times. 4.1.1 User Interface Command names, keywords, alias names, register names, data formats, and data constants are not case sensitive, while program symbols are case sensitive. An address (addr) denotes an expression which consists of: Operators consisting of: plus (+), minus (-), asterisk (*), slash (/), modulu (%), parenthesis (()), and period (.) Constants (in hex/decimal/binary/char format). General register names. Special purpose registers: lr ctr iar Symbol names – global variables and functions of the program. Symbol name can be specified as they appear in the symbol table, or preceded by a $ sign. A space is allowed between operators. Example: .main+12+(r1*2) When integer constants are expected as inputs, the default base is hexadecimal in all cases except: In-line assembly where the default is decimal. Anytime the constant's base is explicitly specified by a prefix: 0x - hex 0b - binary & - decimal. A constant can also be specified as a string: 'ccc' / "ccc" When expecting an address, the debugger first tries to identify the input as a constant, then as register name, and then as a symbol. So symbol names, such as 'r1' 'a0', should be preceded by a '$' sign. An address range is defined as start_range end_range. Group names, register names, subfield names must be alphanumeric and start with a character. 7 MPC8BUG USER'S MANUAL Symbol and alias names can start with an alpha character (a-z or A-Z), period (.), underscore (_), slash (/), and tilde (~). While all characters after the first character can be alphanumeric characters (a-z, A-Z, and 0-9), period (.), underscore (_), slash (/), and tilde (~). Symbol and alias name patterns can contain all previously defined characters as well as the wildcard characters: question marks (?) or asterisk (*). File names can contain alphanumeric characters (a-z, A-Z, and 0-9), period (.), underscore (_), slash (/), tilde (~), caret (^), exclamation mark (!), at sign (@), percent (%), ampersand (&), plus (+), minus (-), equals (=), or the dollar sign ($) or colon (:). The pattern is a string of alphanumeric characters. The string may include the wildcard characters: question marks (?) or asterisk (*). If the command contains a pattern value, the command cannot contain name or text values. Many commands use <addr> as a parameter. All control addressing modes are allowed. An address+offset register mode is also allowed. The table below summarizes the address formats which are acceptable for address parameters in debugger command lines.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages75 Page
-
File Size-