Home

Using D-Bug12 Commands

image

Contents

1. C 2F80 C592 gt BR Breakpoints 35EC 2F80 C592 gt NOBR Remove Breakpoints The NOBR command can be used to remove one or more previously entered breakpoints syntax NOBR lt Address gt lt Address gt The following example will illustrate the BR command gt BR 800 810 820 830 Breakpoints 0800 0810 0820 0830 gt NOBR 810 820 Breakpoints 0800 0830 gt T Trace The Trace command is used to execute one or more user program instructions beginning at the current Program Counter PC location As each program instruction is executed the CPU12 s register contents are displayed and the next instruction to be executed is displayed The following example will illustrate the Trace command gt T PC SP X Y D A B CCR SXHI NZVC 0803 O9FE 057C 0000 10 00 1001 0000 0803 830001 SUBD 0001
2. ENGG3864 Microcomputer Interfacing Lab 0 M68HC12A Evaluation Board and Software School of Engineering University of Guelph Fall 2009 Start Date Thur Week 2 Due Date No Report is Required 1 Objectives e Learn how to configure and setup the Evaluation Board e Understand the usage of the D Bugl2 commands 2 Introduction The M68HC12A4EVB is an economical tool for designing and debugging code for and evaluating the operation of the MC68HC12 MCU family By providing the essential MCU timing and I O circuitry the EVB simplifies user evaluation of prototype hardware and software 2 1 Startup The following startup procedure includes a checklist of configuration and setup items To begin operating the M68HC12A4EVB follow these steps 1 2 3 4 5 6 T Connect the EVB to the external power supply Connect the EVB to the PC using COM1 Start MiniIDE Configure the terminal communication interface to use COM1 and 9600 baud rate terminal options terminal tab Check terminal connected Reset the EVB by pressing and releasing the on board reset switch Please check the MiniIDE Tutorial on the web for further detailed instructions Since the EVB is configured to execute D Bug12 upon reset you will see the following message gt D Bugi2 v1 0 4 Copyright 1995 1996 Motorola Semiconductor For Commands type Help If the prompt does not appear check all connections and verify that startup
3. cord Data Table 1 D Bug12 Command Set Summary 5 Appendix B D Bug12 Commands Useful Commands BF Block Fill The Block Fill command is used to place a single 8 bit value into a range of memory locations syntax BF lt StartAddress gt lt EndAddress gt lt Data gt The following example will fill memory from location 4000 to 4100 with zeros gt BF 4000 4100 0 CALL Call Subroutine The CALL command is used to execute a subroutine and return to the D Bugl2 monitor program when the final RTS of the subroutine is executed When control is returned to D Bug12 the CPU register contents are displayed syntax CALL lt Address gt The following example will illustrate the CALL operation gt CALL 820 Subroutine Call Returned PC SP X Y D A B CCR SXHI NZVC 0820 OA0O0 057C 0000 OF F9 1001 0000 gt BR Breakpoint Set The BR command is used to set a software breakpoint at a specified address or to display any previously set breakpoints The function of a breakpoint is to halt user program execution when the program reaches the breakpoint address When a breakpoint address is encountered D Bug12 disassembles the instruction at the breakpoint address prints the CPU12 s register contents and waits for a D Bug12 command to be entered by the user syntax BR lt Address gt lt Address gt The following example will illustrate the BR command gt BR 35ec 2f80 c592 Breakpoints 35E
4. hool and Dean of the college for action Please refer to the regulations outlined in the student handbook regarding academic misconduct 4 Appendix A D Bug12 Commands Table G CALL lt Address gt Execute a user subroutine return to D Bug12 GT lt address gt Go Till set a temp breakpoint and begin execution of user program HELP Display D Bug12 command set and command syntax Go begin execution of user program LOAD lt AddressOf fest gt Load user program in S record format MD lt StartAddress gt lt EndAddress gt Memory Display display memory contents in BP SEE TSAO nectar orm os n MDW lt StartAddress gt lt EndAddress gt Memory Display Word display memory contents NOE wiechya asc oma MM lt Address gt lt data gt Memory Modify interactively examine change MMW lt Address gt lt data gt Memory Modify Word interactively MOVE lt StartAddress gt lt EndAddress gt Move a block of memory patdiirans Le NOBR lt Address gt lt Address gt Remove individual user breakpoint Register Display dieplay the CPU rezete D RM Register Modify interactively examine change CPU register contents T lt Count gt Trace execute an instruction disassemble it and display the CPU registers UPLOAD lt StartAddress gt lt EndAddress gt Display memory contents in S Record format VERF lt AddressOf f set gt Verify memory contents against S Re
5. program s record s19 gt LOAD 1000 FG kk k k k k A AC AK k OK 2 2 2 G Go Execute a User Program The G command is used to begin the execution of user code The program will begin execution at the address supplied The location of the program in memory can be set using assembler directive e g ORG Execution of the user program continues until a user breakpoint is encountered a CPU exception occurs or the EVB s reset or program abort switch is pressed syntax G lt Address gt The following example will illustrate the GO operation gt G 800 User Breakpoint Encountered PC SP X Y D A B CCR SXHI NZVC 0820 OA0O0 057C 0000 00 00 1001 0000 0820 08 INX gt Appendix B gives some more examples 2 2 3 MD Memory Display The memory Display command displays the contents of memory as both hexadecimal bytes and ASCII char acters 16 bytes on each line The lt StartAddress gt parameter must be supplied the lt EndAddress gt parameter is optional syntax MD lt StartAddress gt lt EndAddress gt 2 2 4 MM Memory Modify This command allows us to examine and modify the contents of memory location one byte at a time syntax MM lt StartAddress gt lt Data gt If no optional data is provided then D bug12 enters the interactive memory modify mode In this mode each byte is displayed on a separate line following the address of data Once the memory modify command has been entered
6. single character sub commands are used for the modification and verification of memory contents These sub commands have the following format e lt Data gt lt CR gt Optionally update current location and display the next loc e lt Data gt lt gt Optionally update current location and redisplay the same loc e lt Data gt lt gt Optionally update current location and display the previous loc e lt Data gt lt gt Optionally update current location and exit Memory Modify 2 2 5 RD Register Display The Register Display command is used to display the CPU12 s registers syntax RD The following example will illustrate the RD operation gt RD PC SP X Y D A B CCR SXHI NZVC 0206 O3FF 1000 3700 27 EF 1001 0001 2 2 6 Help On Screen Help Summary The HELP command is used to display a summary of the D Bugl2 command set Each command is shown with its command line format and a brief description of its function 3 Academic Misconduct The policy for this course is zero tolerance for any form of academic misconduct Consultation with other students is encouraged especially on design issues However directly copying another student s work or copying portions of code for example assembly language code is an honour code violation and will result in a failing grade and may result in a failing grade in the course Students will automatically be referred to the Director of the Sc
7. steps 1 through 5 above have been performed correctly When the prompt appears D Bug12 is ready to accept commands from the terminal All information in this document are borrowed from the 68HC12 Evaluation Board User s Manual by Motorola 2 2 Using D Bug12 Commands D Bug12 the EVB s firmware resident monitor program provides a self contained operating environment that allows writing evaluation and debugging of user programs Commands are typed on the terminal s D Bug12 prompt line and executed when the carriage return EN TER key is pressed D Bugl2 then displays either the appropriate response to the command or an error indication The D Bug12 command line prompt is the greater sign gt Table 1 in Appendix A summarizes the D Bug12 commands In the following section we will just look at a few of these commands Please check 1 The tutorial on the MiniIDE in LabO Section on the web for more information on how to utilize the D Bug12 commands 2 Your text book Section 3 6 on page 84 for using the D Bug12 commands 2 2 1 LOAD Load S Record File The LOAD command is used to load S Record object files into memory from an external device The address offset if supplied is added to the load address of each S Record before its data bytes are placed in memory syntax Load lt AddressOffset gt To load a program type load at the prompt then press the download button in the Mini DE GUI and select your

Download Pdf Manuals

image

Related Search

Related Contents

Z10PA-D8 Series  Kenmore 36'' Sealed Gas Cooktop 3243 Specifications  Document title: fill in the title of your SOP  4-Channel Voice Receiver - Safety Technology International Inc.  Philips Stand complete CRP204  Télécharger ce fichier  

Copyright © All rights reserved.
Failed to retrieve file