APPENDIX S5U1C330MXD1 BOARD

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

When debugging the user program on the S5U1C33104Dx/S5U1C33209Dx board, create the program so that it can be loaded and executed in the free area of the RAM or the Flash memory in the same way as the sample file. (See Figure A.5.1)

The debug monitor on the S5U1C33104Dx has been implemented by linking with the "mon33ch1.lib". Therefore, the built-in serial interface Ch.1 cannot be used from the user program.

The debug monitor on the S5U1C33209Dx has been implemented by linking with the "mon33ch0.lib". Therefore, the built-in serial interface Ch.0 cannot be used from the user program.

20

EPSON

S1C33 FAMILY DEBUG MONITOR

 

 

OPERATION MANUAL