Epson S1C33 Computer Monitor User Manual


 
APPENDIX S5U1C330MXD1 BOARD
EPSON S1C33 FAMILY DEBUG MONITOR
OPERATION MANUAL
20
Debugging in the Flash memory
The sample program for debugging in the Flash memory (0x200000~) of the S5U1C33104Dx/S5U1C33209Dx
is "led2.srf".
The debugger db33 ver. 1.72 or later version supports debugging in the Flash memory. Refer to the
"Debugger" section of the "S1C33 Family C Compiler Package Manual" for details of operations.
To write the sample program to the Flash memory, first load the Flash erase/write routine "am29f800.srf". Then
initialize the Flash memory functions using the fls and fle commands and load the sample program into the
Flash memory using the lf command. Refer to the sample debug command file "led2.cmd" for executing
procedure.
When starting up the debugger, specify the debug command file "led2.cmd" with the -c option. "led2.cmd"
contains debug commands for loading the Flash erase/write routine, setting the trap table address and loading
"led2.srf" to the Flash memory.
Operating procedure is as follows:
1) Start up the debug monitor as described above.
2) Set "\dmt33004\sample\" (or "\dmt33005\sample\") as the current directory.
3) Set a path to db33.exe.
4) Start up the debugger with the following command at the DOS prompt.
C:\...\SAMPLE\>db33 -mon -b 115200 -p 33104_m.par -c led2.cmd
The debugger starts in debug monitor mode and is ready to debug "led2.srf". For example, the LED on the
S5U1C33104Dx/S5U1C33209Dx board will start blinking by executing the g command.
Refer to "3. Debugging in the Flash memory" in Section 3.4, "Debugging Method", for the contents of the
command file.
When debugging in the Flash memory, be aware that the software PC break function (bs command), memory
edit/fill/move commands and commands not supported by the debug monitor cannot be used.
Forced break
The debug monitor does not support forced break functions such as key break.
In the sample program, the label ESC is described in the NMI processing routine of the source ("led.s"). When
the debug command file ("led.cmd", "led2.cmd") is executed, a hardware PC break point is set at the ESC
location after the program has been loaded.
When the SW2 of the S5U1C330MxD1 is turned on, a NMI is generated and it suspends the program
execution forcibly.
Notes on debugging the user program on the S5U1C33104Dx/S5U1C33209Dx board
Wh e n d eb ug gi ng t he u se r p ro gr a m o n t he S5 U1 C33 10 4D x/ S5U 1C3 32 09 Dx b oa r d, c r e a te t he p ro gr a m s o
t ha t i t c a n b e l oa de d a nd e xe c u te d i n t he f r e e a r e a o f t he RA M o r t he Fl as h me mor y i n t he s ame wa y a s t he
sample file. (See Figure A.5.1)
Th e d eb ug mo ni to r o n t he S5 U1 C33 10 4D x h as b ee n i mpl eme n te d b y l in ki ng wi th t he " mon 33 c h1 .li b" .
Therefore, the built-in serial interface Ch.1 cannot be used from the user program.
Th e d eb ug mo ni to r o n t he S5 U1 C33 20 9D x h as b ee n i mpl eme n te d b y l in ki ng wi th t he " mon 33 c h0 .li b" .
Therefore, the built-in serial interface Ch.0 cannot be used from the user program.