• Keine Ergebnisse gefunden

In-Circuit Debugger ICD33

Step 32) Check the [2 pass] radio button in the make options select part of the [other options] window, then use the [MAKE] button to execute make

3.3 Debugging Environment

3.3.3 In-Circuit Debugger ICD33

0x6FFFFF External RAM

1MB

0x6FFFFF

0x6FF640 MON33 work area 0x600000

0x6FF63F 0x600000 Free area

0x2FFFFF Flash memory 0x2FFFFF

1MB Free area

0x200000 0x200000

0x04FFFF Built-in I/O 0x04FFFF

Control registers of built-in I/O

0x040000 0x040000

0x001FFF Built-in RAM

DMT33005: 8KB

0x000010 Reserved area for MON33 0x00000C R0 stack area

0x000008 PC stack area

0x000000 0x000000 Debugging vector

Fig. 3.3.2.3 DMT33004/33005 memory map

(5) Refer to the "E0C33 Family MON33 Debug Monitor Manual" for more information on the Debug Monitor.

3.3.3 In-Circuit Debugger ICD33

The In-Circuit Debugger ICD33 is a development tool that controls the E0C33 on-chip debugging function according to the command sent from the Debugger db33. It provides a trace function as well as the debugging function the same as the Debug Monitor. This section explains how to debug the program using the ICD33 with the DMT33005 board as a development tool.

System configuration and connection

Figure 3.3.3.1 shows the debugging system configuration using the ICD33 and the DMT33005 board.

COMx

Fig. 3.3.3.1 Debugging system using ICD33 and DMT33005

Note: The ICD33 cannot be used with the Debug Monitor. Do not connect DMT33MON to the DMT33005 board. To use the DMT33005 board with DMT33MON, be sure to turn the [DEBUG]

switch (SW3) of the DMT33MON off.

Starting up and checking operation

The following sample programs are provided to check the system operation:

CHAPTER 3: SOFTWARE DEVELOPMENT PROCEDURES

E0C33 FAMILY EPSON 31

"\cc33\sample\dmt33005\led.srf"

"\cc33\sample\dmt33005\led2.srf"

These programs blink the LED on the DMT33005 board. "led.srf" and "led2.srf" are created to be able to debug in the RAM (0x600000~) and in the Flash memory (0x200000~), respectively.

For the contents of the program, refer to the source file (led.s) in the directory.

It is not necessary to execute Make when modification of the source is not needed since the executable object files ("led.srf," "led2.srf") are provided. When the source is modified, execute Make using the make file provided in the directory.

(1) Starting up the system

Start up the system following the procedure below after connecting the ICD33 and DMT33005 to the personal computer.

1) Set all the DIP switches of the ICD33to OPEN (upper position).

2) Turn the DMT33005 on.

3) Turn the ICD33 on.

4) Turn the personal computer on and start up Windows.

5) Start up the debugger db33 (start-up method is described later).

(2) Debugging in the RAM

The sample program for debugging in the RAM (0x600000~) of the DMT33005 is "led.srf". When starting up the debugger, specify the debug command file "led.cmd" with the -c option. "led.cmd" sets the trap table address to the start address of the RAM and loads "led.srf" to the RAM.

Operating procedure for starting up the Debugger from the DOS prompt is as follows:

1) Start up the system as described above.

2) Set "\cc33\sample\dmt33005\" 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:\cc33\sample\dmt33005\>db33 -icd -b 115200 -p 33104_m.par -c led.cmd The debugger starts in ICD mode and is ready to debug "led.srf". For example, the LED on the DMT33005 board will start blinking by executing the g command.

The ICD33 supports the key break function. The program execution can be suspended using the [Key break]

button of the Debugger. Also the trace function is available. Refer to Chapter 16, "Debugger", for tracing.

(3) Debugging in the Flash memory

The sample program for debugging in the Flash memory (0x200000~) of the DMT33005 is "led2.srf".

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 for starting up the Debugger from the DOS prompt is as follows:

1) Start up the system as described above.

2) Set "\cc33\sample\dmt33005\" 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:\cc33\sample\dmt33005\>db33 -icd -b 115200 -p 33104_m.par -c led2.cmd

CHAPTER 3: SOFTWARE DEVELOPMENT PROCEDURES

(4) Executing from wb33

1) Start up the system as described above.

2) Start up wb33 and then select the parameter file "\cc33\sample\dmt33005\33104_m.par" on the execution window.

3) Select DB33 options on the [Other options] windows.

ICD, 115200 bps, command file "led.cmd" or "led2.cmd"

4) Start up the Debugger using the [DB33] button.

This procedure starts debugging the same as in items (2) and (3) above.

Precautions

When debugging the program using the ICD33 and DMT33005 board, observe the precautions described below.

(1) The program to be debugged should be created so that it can be loaded and executed in the free area of the RAM or the Flash memory on the DMT33005. The program load address must be specified when linking since it cannot be specified by the Debugger. See Figure 3.3.2.3 for the DMT33005 memory map.

(2) The debugging functions are restricted compared to the ICE33. Refer to Chapter 16, "Debugger", for the functions and commands that are supported by the ICD33.

(3) All the ICD33 functions can be used even if the ICD33 is only connected to the COM port using the RS232C cable. The parallel cable should be used to connect the ICD33 to the LPT port when high-speed file downloading is required. The following shows the typical downloading speed of the different ports (the values may vary according to the PC used and operating conditions).

Serial transfer: Downloading to RAM 8KB/S Downloading to Flash memory 7KB/S

Parallel transfer: Downloading to RAM 30KB/S

Downloading to Flash memory 20KB/S

(4) Refer to the "E0C33 Family In-Circuit Debugger (ICD33) Manual " for more information on the ICD33.

CHAPTER 3: SOFTWARE DEVELOPMENT PROCEDURES

E0C33 FAMILY EPSON 33