Renesas M30220TF-PRB Network Card User Manual


 
( 28 / 54 )
Chapter 4. Debugging Procedure for CPU Rewrite Mode
4.1 Outline of Debugging Procedure
You can use the flash memory in the evaluation MCU on the M30220TF-PRB to debug the control
program for CPU rewrite mode. Figure 4.1 shows a flow chart of the process.
Figure 4.1 Flowchart of CPU Rewrite Mode Control Program Debugging
The process shown in this flowchart is not required for normal program debugging.
<- Once registered in the M3T-PD30, there
is no need to register again. (See section
4.2.)
<- This command must be executed once
at M3T-PD30 startup. (See section 4.2.)
Debugging is enabled in
CPU rewrite mode. See
notes in section 4.5.
Register custom commands dbg_reset and fmcr1set.
Execute custom command dbg_reset.
Execute the script command "MAP E0000, FFFDF, INT".
(emulation memory enabled)
Run the control program and transfer the rewrite program to the
RAM area (emulation memory).
Execute the script command "MAP E0000, FFFDF, EXT". (MCU
enabled)
Execute the rewrite program to set the CPU rewrite mode select
bit to "1" (MCU's internal flash memory enabled), and rewrite to
the flash memory.
Using the preset breakpoint, stop the control program immediately
before jumping to the user ROM area (addresses E0000h to
FFFFFh).
Set a breakpoint so that the program can be stopped after
jumping to the RAM area, and before the CPU rewrite mode
select bit is set to "1".
Set a breakpoint so that the program stops immediately before
jumping to the user ROM area.
Start M3T-PD30.
Download the control program for CPU rewrite mode into the user
ROM area or boot ROM area (emulation memory).
Stop the control program using the preset breakpoint immediately
before the CPU rewrite mode select bit is set to "1" and when the
program counter (PC) value is in the internal RAM area.