Debugging Procedure; Debugging Procedure For Cpu Rewrite Mode (Microcomputer Mode) - Renesas M30220TF-PRB User Manual

Pod probe for m30220 and m30221 group mcus
Table of Contents

Advertisement

4.3 Debugging Procedure

(1) Debugging Procedure for CPU Rewrite Mode (Microcomputer Mode)

Here following describe the debugging procedure in microcomputer mode. Figure 4.2 shows the
memory map when debugging.
Figure 4.2 Memory map when debugging in microcomputer mode
Procedure
00000h
00400h
DE000h
E0000h
FFFFFh
Downloading the control program for CPU rewrite mode
• You must execute custom command dbg_reset before debugging the control program for
CPU rewrite mode.
• Set the MAP for addresses E0000h to FFFDFh to "INT" (to enable emulation memory).
(1)
• Download the control program for CPU rewrite mode to be debugged to emulation memory.
• After downloading the control program, set a breakpoint as indicated below. (See the next
page, Table 4.1 for an example.)
"Stop after jumping to the RAM area, and before setting the CPU rewrite mode select bit to "1"."
Transfer the control program for CPU rewrite mode to the RAM area.
• Running the program transfers the control program for CPU rewrite mode to the RAM area
(2)
(emulation memory).
Set the map for user ROM area E0000h to FFFDFh to "EXT".
• Using the breakpoint set in (1), stop program execution after jumping to RAM area, and
before the CPU rewrite mode select bit is set to "1".
(3)
• Set the MAP for addresses E0000h to FFFDFh to "EXT" (to enable the evaluation MCU).
• Set a breakpoint as indicated below. (See the next page, Table 4.1 for an example).
"Stop immediately before jumping to user ROM area."
Write to flash memory.
• Flash memory is rewritten to by running the control program. See "4.5 Precautions for CPU
Rewrite Mode" (page 37) for notes.
(4)
• Using the breakpoint set in step (3), stop at the end of the control program for CPU rewrite
mode.
Check the contents of MCU's internal flash memory after rewriting.
• In step (4), by changing the settings as shown below, you can read the contents of the
MCU's internal flash memory using the script command, dump window and RAM monitor
window. For details on how to access, refer to Section 4.4 (page 36) and the precautions
to Section 4.5 (page 37).
(5)
Map of addresses E0000h - FFFDFh
CPU rewrite mode select bit (FMCR1)
Mode of flash memory
SFR area
RAM area
(4)
Boot ROM area
(5)
User ROM area
Inside of MCU
(MAP: "EXT")
Description
Item
( 32 / 54 )
Unused
(3)
(1)
Emulation memory
(MAP: "INT")
Setting
EXT
1
Read array mode
(2)

Advertisement

Table of Contents
loading

Table of Contents