Hints, Notes, and Limitations for ICD08SW/ICD08SZ -------------------------------------------------- This document describes limitations inherent in monitor mode debugging. The ICD08SW/ICD08SZ in-circuit debugger allows the user to load code into ram, step in ROM or RAM, set breakpoints in ROM or RAM, inspect and modify memory, execute in real-time, and more. See the on-line documentation and manual for more details. The Limitations and Notes are as follows: (1) You must not change the data direction or data value of PORTA Bit 0. When written, these bits should be set to 0. (2) You must not enable keyboard interrupts for PORTA Bit 0. (3) You may not: step an instruction which branches to itself. (4) You may not: step an SWI instruction. (5) The hardware breakpoint registers are reserved for use by the ICD08SW, attempting to use these registers may not work. (6) Be careful of showing peripheral status / data registers in the memory or variables window. A refresh of the window will read these registers, and may cause the clearing of flags. (7) The debug monitor built into the HC08 processor will use up to thirteen bytes of the stack. Do not write the addresses from SP-13 to SP. If you wish to load a program into ram, it is suggested that you move the stack to the end of the RAM, in the case of the 908GP20, you would use the command 'SP 23F'. You can put this command in the startup.icd file if you wish this command executed everytime you enter the debugger. Otherwise, the processor will use 13 bytes of RAM in the middle of your RAM block. In the case of the 908RK2 the stack is automatically at the end of RAM. (8) If you turn on interrupts and step, the ICD08SW will not step into the interrupt but rather execute the whole interrupt and stop on the instruction returned to after the interrupt. Some Hints follow: (9) Single stepping is allowed in both RAM or ROM. (10) The first breakpoint set is always a hardware breakpoint, and any additional breakpoints set are software breakpoints. To make sure you are setting a hardware breakpoint, use the NOBR command before setting a breakpoint. A hardware breakpoint will stop execution in ROM or RAM. A software breakpoint will stop execution only in RAM. (11) Make sure you try the register interpreter. Use the 'R' command. (12) You may load code only into RAM. To load code into the FLASH use the PROG08SW software package included in the kit. When loading code into RAM, see #7. (13) Executing an SWI instruction while running will be functionally equivalent to hitting a breakpoint, except execution will stop on the instruction following the SWI. (14) You may use the hardware breakpoint to trap a data read/write to anywhere is the memory map. The ICD08SW will stop on the instruction after the one which accesses the data location. If you wanted to trap a read/write to address 22, you would first make sure there were no breakpoints set by using the 'NOBR' command. Then you would set the hardware breakpoint by using 'BR 22'. This is the same way you would set a hardware instruction breakpoint. Clear the hardware breakpoint by using the 'NOBR' command. (15) Note: The LOADALL command in the ICD08SW is the same as LOAD in the ICS08xxW. The LOAD command in the ICD08SW only loads the object information, not the debug information. (16) If you wish to do debugging out of ROM, and wish to see your source code as you step, use the LOADMAP command. This loads the source level information of you source file without loading the object file, which you should have programmed into the FLASH with PROG08SW. Files with the extension .MAP are P&E's mapfile debug format. P&E will be supporting the IEEE695 debug format with Microtek/HP extensions in the future, in addition to .MAP files. (17) To write a byte to memory, use the 'MM addr value' command. e.g. to write a $00 to address $4 you would type 'MM 4 0' (18) The default base of the debugger is hexadecimal. See the help for prefixes and suffixes to override the default. (19) To create a variable type 'VAR'. To clear all variables type 'CLEARVAR'. (20) CPU register values can be changed simply by typing a register name followed by a value. For example, to set the accumulator to $44, you could type either 'A 44' or 'ACCA 44'. (21) When the board is reset BY the debugger, the power to the microcontroller will be turned off for a short duration. Although much of RAM may look the same, some values may have changed. You can verify any code you have loaded using the 'VERIFY' command. (22) All windows have right mouse menus which give you access to much of the debugger's functionality. To open, place the mouse over the window, and click the right mouse button. (23) If you do a GO without setting a breakpoint, the only way to regain control of the processor is to reset the processor (which will be an option in the "can't communicate" dialog). (24) The watchdog is not active while running ICD08SW. When you program a device and power the device without the debugger (i.e. on your own target board), the watchdog will be active by default. (25) If the security bytes are programmed in the PROG08SW programmer, the ICD08SW will automatically know the security bytes. In this way, ICD08SW will be able to reset the processor even if it has been programmed. All security information is stored in SECURITY.INI. (26) You can save the desktop settings of the ICD08SW using the 'SAVEDESK' command, and retrieve them using the 'LOADDESK' command. The desktop settings are automatically retrieved upon startup.