CHAPTER 6 HOW TO USE MINICUBE2 WITH 78K0R MICROCONTROLLER
User’s Manual U18371EJ1V0UM
152
6.2.6 Cautions on debugging
This section describes cautions on performing on-chip debugging for a 78K0R microcontroller.
Be sure to read the following to use MINICUBE2 properly.
(1) Handling of device that was used for debugging
Do not mount a device that was used for debugging on a mass-produced product, because the flash memory
was rewritten during debugging and the number of rewrites of the flash memory cannot be guaranteed.
Moreover, do not embed the debug monitor program into mass-produced products.
(2) Flash self programming
If a space where the debug monitor program is allocated is rewritten by flash self programming, the debugger
can no longer operate normally. This caution also applies to boot swapping for such an area.
(3) Operation after reset
After an external pin reset or internal reset, the monitor program performs debug initialization processing.
Consequently, the time from reset occurrence until user program execution differs from that in the actual
device operation. If Not Permit is selected in the Flash Programming area in the Configuration dialog box of
the debugger, the time until the user program is executed compared with the time when Permit is selected is
delayed several 100 ms.
(4) Debugging with real machine running without using MINICUBE2
If debugging is performed with a real machine running, without using MINICUBE2, write the user program
using the QB-Programmer. Programs downloaded by the debugger include the monitor program, and such a
program malfunctions if it includes processing to make the TOOL0 pin low level.
(5) Step execution
If step execution is performed for the following instructions, an extra instruction is executed.
a. RETI/RETB instruction
Immediately after returning from the interrupt servicing, an instruction is executed and then the execution
breaks.
b. Conditional skip instruction (condition is not satisfied)
The instruction following the conditional skip instruction is executed and then the execution breaks.
(6) Operation when debugger starts
When the debugger is started, if the Target Device Connection setting in the Configuration dialog box of the
debugger is different from the setting for the previous debugging, the internal flash memory is erased.
(7) Debugging after program is written by flash programming
If a program is written to the internal flash memory using the QB-Programmer or PG-FP4, on-chip debugging
is disabled even if it is enabled in the on-chip debugging option byte setting. To perform debugging of the
target device after that, erase the internal flash memory using the QB-Programmer or PG-FP4 and then
download the program using the debugger.
(8) LVI default start function setting (address C1H)
The LVI setting at address C1H in the internal flash memory during debugging is set as follows.
- When MINICUBE2 is connected: The LVI default start function is available.
- When MINICUBE2 is not connected: The LVI default start function is unavailable.