Datasheet
V850ES/JG3 CHAPTER 28 ON-CHIP DEBUG FUNCTION
R01UH0015EJ0300 Rev.3.00 Page 757 of 870
Sep 30, 2010
(4) Securement of area for debug monitor program
The shaded portions in Figure 28-4 are the areas where the debug monitor program is allocated. The monitor
program performs initialization processing for debug communication interface and RUN or break processing for the
CPU. The internal ROM area must be filled with 0xFF. This area must not be rewritten by the user program.
[How to secure areas]
It is not necessarily required to secure this area if the user program does not use this area.
To avoid problems that may occur during the debugger startup, however, it is recommended to secure this area in
advance, using the compiler.
The following shows examples for securing the area, using the Renesas Electronics compiler CA850. Add the
assemble source file and link directive code, as shown below.
• Assemble source (Add the following code as an assemble source file.)
-- Secures 2 KB space for monitor ROM section
.section “MonitorROM”, const
.space 0x800, 0xff
-- Secures interrupt vector for debugging
.section “DBG0”
.space 4, 0xff
-- Secures interrupt vector for serial communication
-- Change the section name according to the serial communication mode used
.section “INTCB0R”
.space 4, 0xff
-- Secures 16-byte space for monitor RAM section
.section “MonitorRAM”, bss
.lcomm monitorramsym, 16, 4 -- defines symbol monitorramsym
• Link directive (Add the following code to the link directive file.)
The following shows an example when the internal ROM has 1024 KB (end address is 00FFFFFH) and internal
RAM has 60 KB (end address is 3FFEFFFH).
MROMSEG : !LOAD ?R V0x0ff800{
MonitorROM = $PROGBITS ?A MonitorROM;
};
MRAMSEG : !LOAD ?RW V0x03ffeff0{
MonitorRAM = $NOBITS ?AW MonitorRAM;
};