Epson S1C33 Series Operation Manual page 19

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

Advertisement

3. Debugging in the Flash memory
In the target system in which a Flash memory has mounted, the target program can be debugged by writing it
into the Flash memory using the debugger.
Notes: • When debugging the target program in the Flash memory, the software break function (bs
command) cannot be used.
• The debugger db33 ver. 1.72 or later version supports data writing to the Flash memory on the
target board. To debug using the Flash memory, create Flash erase and Flash write routines in
the user program and write the program following the instructions below:
After starting the debugger, follow the process below before starting to debug:
1. Load and initialize the Flash erase/write routines.
2. Erase the Flash memory.
3. Set up the trap table base address.
4. Load the target program.
5. Reset the CPU.
6. 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\led2.cmd"
lf ..\sample\flsh\am29f800.srf
fls
1
200000
2fffff
FLASH_ERASE
FLASH_LOAD
fle
0x200000
0
0
eb 4812d
59
q
ew 48134
200000
q
lf led2.srf
rsth
bh ESC
*1: "am29f800.srf" is created so as to operate by loading into the built-in RAM (2KB).
When using this source for the S1C33104 after modifying, use the patch tool "cc33\utility\filter".
* 2 : Th i s s a mp l e ( " d mt 3 3 0 0 4 \ s a mp l e \ l e d 2 .s r f " ) a s s u me s t h a t a Fl a s h me mo r y o f 1 MB i s l o c a t e d a t
0 x 2 0 0 0 0 0 – 0 x 2 f f f f f .
S1C33 FAMILY DEBUG MONITOR
OPERATION MANUAL
3 TARGET PROGRAM AND DEBUGGING
; Load the Flash erase/write routines to the built-in RAM
; Flash set up command
; 1: Set up 2: Clear
; Flash memory start address = 0x200000 ( 2)
; Flash memory end address = 0x2fffff ( 2)
; Flash erase routine start address ( 1)
; Flash load routine start address ( 1)
; Flash memory erase command
; Flash control register = 0x200000
; Erase start block, 0 = All area, 1–19 = Start section
; Erase end block, 1–19 = End section, 0 = Ignored
; Set up TBRP (TTBR write protection register)
; Remove TTBR write protection
; Set up TTBR (trap table base register)
; Set up base address to 0x200000 (Flash memory start address)
; Load the target program (0x200000~)
; Reset the CPU (reset vector at 0x200000 is set to PC)
; Set up a hardware PC break at the label ESC (for forced break)
EPSON
13

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5u1c330m2s

Table of Contents