Epson S5U1C17001C Manual page 546

Cmos 16-bit single chip microcomputer, c compiler package for s1c17 family
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

10 DEBUggEr
Notes
• Software PC breakpoints can be set at up to 200 locations. If this limit is exceeded, an error is assumed. Note
that this break count includes the software PC breakpoints used by the debugger in other functions.
• C source lines that are not expanded to mnemonic cannot be specified as a location at which to set a software
PC breakpoint. Specifying such a C line sets a software PC breakpoint at the address of the first instruction to
be executed next.
• When a function name or the beginning C source line in a function is specified as the position where to set
a software PC breakpoint, the program execution will break at the start address of the first C source (i.e.,
instruction to be expanded to mnemonic) in the function. Although a ld instruction to save register contents
is inserted at the beginning of the function during compilation, this instruction is executed before the program
breaks. To make the program break before executing this instruction, specify a software PC breakpoint using
the address value of that instruction.
• No software PC breakpoints can be set at the following lines.
- Extended instruction lines (except for the ext instruction at the beginning)
- Delayed instruction lines (next line after a delayed branch instruction)
• If software PC breakpoints are specified using a nonexistent function name or line number, an error is
assumed.
• When specifying a software PC breakpoint by an address value, the specified address will be adjusted to
the 16-bit boundary by assuming LSB = 0 if it is an odd value. Furthermore, an error occurs if the specified
address exceeds the 24-bit range.
• Software PC breaks are implemented by an embedded brk instruction and therefore cannot be used for
target board ROM in which instructions cannot be embedded. In such case, use hardware PC breaks instead.
• Processing resulting from the embedment of BRK command in source
When a BRK command embedded in a user application source, instead of a break command, PC+=2 is
automatically performed following a software break ((1)+2 results in (2) in the following example). The
C17 can be set with only one hardware break. By embedding a BRK command in a source, a break can be
implemented at multiple locations when ROM such as flash memory is used for execution.
Example:
sample.c
void main()
{
a = b + 1
iRet = sub( a )
asm( "brk" )
if ( iRet == 1 ) {
b -= 2
}
In the above example, if a software break is set at (1), the process stops at (1). This is because the debugger
cannot determine whether the BRK command embedded in memory is by a break command or one
embedded in the source. Note that the breakpoint setting must be cleared before the next execution.
When a hardware break is set at (1), the process stops at (2). After (3) is processed by "next," the process
stops at (2).
10-96
;
< Continues here.
;
;
< (3)
;
< (1) Embedment of brk command
;
< (2) Stops here. (BRK command address + 2)
;
EPSOn
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
S5U1C17001C ManUal

Advertisement

Table of Contents
loading

Table of Contents