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

Pod probe for m30220 and m30221 group mcus
Table of Contents

Advertisement

(2) Debugging Procedure for CPU Rewrite Mode (Boot Mode)

Here following describe the debugging procedure in boot mode. Figure 4.3 shows the memory map
when debugging.
00000h
00400h
DE000h
E0000h
FFFFFh
Figure 4.3 Memory map when debugging in boot mode
Procedure
Downloading the control program for CPU rewrite mode
• You must execute custom command dbg_reset before debugging the control program for
CPU rewrite mode.
• Download the control program for CPU rewrite mode into emulation memory. Also,
(1)
download the value of the reset vector, DE000h. When you do not download the value of
the reset vector, write "DE000h" in the reset vector area using Fill command.
• After downloading the control program, set a breakpoint as indicated below. (See the next
page, Table 4.3 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.
(2)
• Running the program transfers the control program for CPU rewrite mode to the RAM area
(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.3 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.
• Set the program window to disassemble display mode (DIS) and execute the instruction
that jumps to the user ROM area in step 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)
SFR area
RAM area
Boot ROM area
(5)
User ROM area
Inside of MCU
(MAP: "EXT")
Item
Mode of flash memory
( 34 / 54 )
Unused
(3)
(4)
(1)
Emulation memory
(MAP: "INT")
Description
Setting
EXT
1
Read array mode
(2)

Advertisement

Table of Contents
loading

Table of Contents