Debugging Method - Epson S1C33 Series Operation Manual

Debug monitor
Hide thumbs Also See for S1C33 Series:
Table of Contents

Advertisement

3 TARGET PROGRAM AND DEBUGGING

3.4 Debugging Method

The following three methods are available for debugging the target program.
1. Debugging in the ROM
Map the target program in the ROM after linking to the debug monitor. The target program can be executed and
debugged in the ROM.
Since the [Source] window of the debugger displays the disassembled content of the ROM on the target system,
it is not necessary to load the target program with the lf command. To display the source, load the same
absolute object file as the one written to the ROM. In this case, by using the ld command instead of the lf
command, the db33, except for the object code, loads only the debugging information.
After starting the debugger, follow the process below before starting to debug:
1. Load the debugging information (when displaying the source or using symbols).
2. Set up a hardware PC break point for the forced break function.
Example: command file example of the above description
ld sample.srf
bh ESC
For example, an NMI input switch can be used for the forced break function.
*
Example: NMI processing routine example for forced break function
NMI:
nop
.global
ESC:
reti
Note: When debugging the target program in the ROM, the software PC break function (bs command)
cannot be used.
2. Debugging in the RAM
Load the target program into the RAM of the target system with the lf command to debug the program in the
RAM.
After starting the debugger, follow the process below before starting to debug:
1. Set the trap table base address (only when placing the trap table in the RAM).
2. Load the target program.
3. Reset the CPU.
4. Set up a hardware PC break point for the forced break function.
The following shows a debug-command file example in which the above process is described.
Example: "dmt33004\sample\led.cmd"
eb 4812d
59
q
ew 48134
600000
q
lf led.srf
rsth
bh ESC
12
; Load the debugging information of the target program
; Set up a hardware PC break point at the label ESC (for forced break)*
; nmi
ESC
; Label set as a hardware PC break point for the forced break function
; Set up TBRP (TTBR write protection register)
; Remove TTBR write protection
; Set up TTBR (trap table base register)
; Set up the base address to 0x600000 (external RAM)
; Load the target program (0x600000~)
; Reset the CPU (reset vector at 0x600000 is set to the PC)
; Set up a hardware PC break at the label ESC (for forced break)
EPSON
S1C33 FAMILY DEBUG MONITOR
OPERATION MANUAL

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5u1c330m2s

Table of Contents