Datasheet
V850ES/JG3-H, V850ES/JH3-H CHAPTER 32 ON-CHIP DEBUG FUNCTION
R01UH0042EJ0500 Rev.5.00 Page 1401 of 1513
Aug 12, 2011
(4) Securement of area for debug monitor program
The shaded portions in Figure 32-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 "INTCF0R"
.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 512 KB (end address is 007FFFFH) and internal
RAM has 56 KB (end address is 3FFEFFFH).
MROMSEG : !LOAD ?R V0x07f800{
MonitorROM = $PROGBITS ?A MonitorROM;
};
MRAMSEG : !LOAD ?RW V0x03ffeff0{
MonitorRAM = $NOBITS ?AW MonitorRAM;
};