( 34 / 54 )
(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.
Figure 4.3 Memory map when debugging in boot mode
(4)
(2)
Inside of MCU
(MAP: "EXT")
Emulation memory
(MAP: "INT")
SFR area
RAM area
Boot ROM area
(5)
User ROM area
00000h
00400h
DE000h
E0000h
FFFFFh
Procedure
Description
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,
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.
• 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".
• 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.
• 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).
(1)
(2)
(3)
(4)
(5)
Unused
(3)
(1)
Item
Setting
Map of addresses E0000h - FFFDFh
EXT
CPU rewrite mode select bit (FMCR1)
1
Mode of flash memory
Read array mode
Summary of Contents for M30220TF-PRB
Page 14: ...12 54 MEMO...
Page 18: ...16 54 MEMO...
Page 42: ...40 54 MEMO...
Page 54: ...52 54 MEMO...