17.01.2015 Views

OCD Debugger - abov.co.kr

OCD Debugger - abov.co.kr

OCD Debugger - abov.co.kr

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>OCD</strong> <strong>Debugger</strong><br />

<strong>OCD</strong> <strong>Debugger</strong><br />

Version 1.01 (May. 2011)<br />

English version ------------------------------------------------------------------ Page 2 ~ 46<br />

Chinese version ------------------------------------------------------------------ Page 47 ~ 87<br />

Korean version ------------------------------------------------------------------ Page 88 ~ 133<br />

May, 2011 Ver. 1.01 1


<strong>OCD</strong> <strong>Debugger</strong><br />

<strong>OCD</strong> <strong>Debugger</strong><br />

<strong>Debugger</strong> for ABOV Semi<strong>co</strong>nductor’s 8bit MCU <strong>OCD</strong> devices<br />

1. About the <strong>OCD</strong><br />

1.1 Preface<br />

<strong>OCD</strong> (On Chip Debug) <strong>Debugger</strong> program has been developed to support 8bit MCU which<br />

adopted <strong>OCD</strong>, of ABOV Semi<strong>co</strong>nductor.<br />

Most of ABOV Semi<strong>co</strong>nductor’s M8051 series and DCD8051 series MCU (Micro Controller Unit)<br />

devices adopted <strong>OCD</strong>.<br />

<strong>OCD</strong> <strong>Debugger</strong> requires <strong>OCD</strong> interface hardware dongle of ABOV Semi<strong>co</strong>nductor.<br />

<strong>OCD</strong> interface uses two wires interfacing between PC and a MCU which is attached to user’s<br />

system.<br />

<strong>OCD</strong> can read or change the value of MCU internal memory and I/O peripherals.<br />

And more, <strong>OCD</strong> <strong>co</strong>ntrols MCU internal debugging logic, it means <strong>OCD</strong> <strong>co</strong>ntrols emulation, step<br />

run, monitoring, etc.<br />

<strong>OCD</strong> debugging does not require expansive emulator system.<br />

frequency of the MCU and can support ISP (In System Programming) too.<br />

<strong>OCD</strong> can emulate maximum<br />

<strong>OCD</strong> <strong>Debugger</strong> program works Microsoft®-Windows NT, 2000, XP, Vista, Windows-7 (32bit &<br />

64bit) operating system.<br />

Installing <strong>OCD</strong> H/W and S/W to 64bit OS is bothersome.<br />

The demerit of <strong>OCD</strong> is that software developer can not examine two interface ports during<br />

software developing and debugging.<br />

May, 2011 Ver. 1.01 2


<strong>OCD</strong> <strong>Debugger</strong><br />

Ex) <strong>OCD</strong> debugger 의 screen capture<br />

May, 2011 Ver. 1.01 3


<strong>OCD</strong> <strong>Debugger</strong><br />

1.2 Features<br />

Supports all of ABOV Semi<strong>co</strong>nductor‘s<br />

8bit MCU which adopted <strong>OCD</strong>, most of<br />

Mentor8051 and DCD8051 series<br />

Loads HEX file and map/symbol file<br />

Symbolic debugging<br />

Supports all of internal <strong>co</strong>de memory of<br />

the target MCU<br />

Can use ISP(In System Programming)<br />

only tool<br />

Displays <strong>co</strong>de area using dis-assembler<br />

Support line assemble<br />

Toggle PC break<br />

Support display and modification of<br />

RAM,<br />

SFR, register, etc<br />

Displays Code, XDATA area using dump<br />

format<br />

Device auto detect<br />

– Device <strong>co</strong>nfiguration is not needed<br />

Operating frequency<br />

– Supports the maximum frequency of the<br />

target MCU<br />

Operating voltage<br />

– Supports all range of the target MCU<br />

Clock source<br />

– All of Xin, internal/external RC, etc<br />

Display emulation clock<br />

– Counts and displays the executed<br />

machine cycle<br />

Supports emulation and debugging<br />

– Free run, step run, auto step run, etc<br />

Save and load the development<br />

environment<br />

Operating system<br />

– Microsoft® Windows NT<br />

– Microsoft® Windows 2000<br />

– Microsoft® Windows XP (32bit, 64bit)<br />

– Microsoft® Windows Vista (32bit, 64bit)<br />

– Microsoft® Windows7 (32bit, 64bit)<br />

About the software<br />

– Abov Semi<strong>co</strong>nductor MDS<br />

– Email address : seungduk.ha@<strong>abov</strong>.<strong>co</strong>.<strong>kr</strong><br />

May, 2011 Ver. 1.01 4


<strong>OCD</strong> <strong>Debugger</strong><br />

2. Installation<br />

You can download the install program from our website (http://www.<strong>abov</strong>.<strong>co</strong>.<strong>kr</strong>/).<br />

You have better to keep newest <strong>OCD</strong> software version. Because we will <strong>co</strong>ntinuously add new<br />

devices and update software functions.<br />

We do not release install CD.<br />

You have to setup application software setup first.<br />

<strong>co</strong>pied during application software installation.<br />

Because of the device driver program is<br />

Do not plug in the <strong>OCD</strong> interface hardware dongle to your PC.<br />

First of all, you have to know your PC OS (operating system) is 32bit or 64bit.<br />

And then, download & install appropriate setup program.<br />

To examine PC OS<br />

- Open Control Panel<br />

- Find System i<strong>co</strong>n and select it.<br />

ex) XP 32bit OS<br />

ex) XP 64bit OS<br />

May, 2011 Ver. 1.01 5


<strong>OCD</strong> <strong>Debugger</strong><br />

Following picture shows a set of <strong>OCD</strong> hardware dongle.<br />

From left side, USB cable to <strong>co</strong>nnect PC, flex cable to <strong>co</strong>nnect target system, <strong>OCD</strong> dongle.<br />

Flex cable pin assignment is as following.<br />

Pin #5 is option by each <strong>OCD</strong> device series.<br />

Caution when installing<br />

Install sequence is important.<br />

Install <strong>OCD</strong> setup software first. And then, <strong>co</strong>nnect <strong>OCD</strong> dongle hardware.<br />

<strong>OCD</strong> driver and application software are needed before hardware installation.<br />

Caution when using<br />

<strong>OCD</strong> dongle hardware does not support target system HOT-PLUG (hardware plugging<br />

during target system power is ON). It may destroy <strong>OCD</strong> dongle hardware permanently.<br />

Target system must be power OFF when you plug <strong>OCD</strong> dongle hardware.<br />

May, 2011 Ver. 1.01 6


<strong>OCD</strong> <strong>Debugger</strong><br />

2.1 Software install (32bit)<br />

You have to setup application software setup first.<br />

<strong>co</strong>pied during application software installation.<br />

Because of the device driver program is<br />

Do not plug in the <strong>OCD</strong> interface hardware to your PC.<br />

2.1.1 Sequence<br />

When the setup program is executed,<br />

following dialog box will be pop upped.<br />

Click the “Next” button.<br />

When the install type dialog box is pop<br />

upped, select “Complete”, and click the<br />

“Next” button.<br />

When the license agreement dialog box is<br />

pop upped, select “I accept the items of the<br />

license agreement” and click the “Next”<br />

button.<br />

Click “Install” button of following dialog box.<br />

When the following dialog box is pop upped,<br />

fill the user name and you <strong>co</strong>mpany name,<br />

and click the “Next” button.<br />

Installation progress bar shows the status of<br />

installation.<br />

May, 2011 Ver. 1.01 7


<strong>OCD</strong> <strong>Debugger</strong><br />

Wait until it installs all of the program<br />

<strong>co</strong>mponents.<br />

2.1.2 Copied directory<br />

Setup program will install <strong>OCD</strong> application<br />

programs to following path, unless you<br />

change it.<br />

C:\Program Files\ABOV Semi<strong>co</strong>nductor<br />

\<strong>OCD</strong>_debugger<br />

If installation is <strong>co</strong>mpleted, following dialog<br />

box is pop upped. Click the “Finish” button.<br />

Application program path will be used when<br />

<strong>OCD</strong> device’s driver installation time.<br />

May, 2011 Ver. 1.01 8


<strong>OCD</strong> <strong>Debugger</strong><br />

2.2 <strong>OCD</strong> driver install (32bit)<br />

<strong>OCD</strong> dongle hardware will be worked properly after <strong>OCD</strong> device driver was installed.<br />

<strong>OCD</strong> driver programs are <strong>co</strong>pied during application software installation. So, you have to install<br />

application program first.<br />

Following dialog boxes are using Korean character (Hangeul), it will be displayed English or<br />

Chinese, etc.<br />

Anyway, you can understand following examples.<br />

Windows-XP or previous OS need to setup each USB port, even if the same device driver. If user<br />

changes USB port, you have to install <strong>OCD</strong> driver again.<br />

Windows-Vista does not the problem as <strong>abov</strong>e.<br />

2.2.1 Sequence<br />

Connect <strong>OCD</strong> hardware to USB port of your<br />

PC.<br />

Fill the blank line with the application<br />

directory path and click “Next” button.<br />

After PC detects new hardware, it will pop<br />

up following dialog box.<br />

Select as following and click “Next” button.<br />

Now, Window OS asks to <strong>co</strong>ntinue install or<br />

not.<br />

Click “Continue” button and wait until<br />

installation is <strong>co</strong>mpleted.<br />

And then following dialog box will be pop<br />

upped.<br />

Select as following and click “Next” button.<br />

Some Windows OS asks same <strong>abov</strong>e more<br />

than 1 time. Do the same as <strong>abov</strong>e.<br />

Next dialog box will ask directory of INF file.<br />

May, 2011 Ver. 1.01 9


<strong>OCD</strong> <strong>Debugger</strong><br />

2.2.2 Verify installation<br />

It is not necessary.<br />

Open <strong>co</strong>ntrol panel of OS and select device<br />

manager. You can see serial <strong>co</strong>mmunication<br />

device (USB) has “ABOV <strong>OCD</strong>” device.<br />

Refer to left example screen capture.<br />

May, 2011 Ver. 1.01 10


<strong>OCD</strong> <strong>Debugger</strong><br />

2.3 Software install (64bit)<br />

You have to setup application software setup first.<br />

<strong>co</strong>pied during application software installation.<br />

Because of the device driver program is<br />

Do not plug in the <strong>OCD</strong> interface hardware to your PC.<br />

<strong>OCD</strong> installation flow in 64bit OS is nearly same to the installation flow in 32bit OS.<br />

You can see the warning message as below when you installation.<br />

Click “Yes” button here.<br />

2.3.1 Sequence<br />

When the setup program is executed,<br />

following dialog box will be pop upped.<br />

Click the “Next” button.<br />

When the following dialog box is pop upped,<br />

fill the user name and you <strong>co</strong>mpany name,<br />

and click the “Next” button.<br />

When the license agreement dialog box is<br />

pop upped, select “I accept the items of the<br />

license agreement” and click the “Next”<br />

button.<br />

May, 2011 Ver. 1.01 11


<strong>OCD</strong> <strong>Debugger</strong><br />

When the install type dialog box is pop<br />

upped, select “Complete”, and click the<br />

“Next” button.<br />

If installation is <strong>co</strong>mpleted, following dialog<br />

box is pop upped. Click the “Finish” button.<br />

Click “Install” button of following dialog box.<br />

2.3.2 Copied directory<br />

Installation progress bar shows the status of<br />

installation.<br />

Wait until it installs all of the program<br />

<strong>co</strong>mponents.<br />

Setup program will install <strong>OCD</strong> application<br />

programs to following path, unless you<br />

change it.<br />

C:\Program Files\ABOV Semi<strong>co</strong>nductor<br />

\<strong>OCD</strong>_debugger<br />

Application program path will be used when<br />

<strong>OCD</strong> device’s driver installation time.<br />

May, 2011 Ver. 1.01 12


<strong>OCD</strong> <strong>Debugger</strong><br />

2.4 <strong>OCD</strong> driver install (64bit)<br />

64bit OS of Microsoft® manage drivers more strictly than 32bit OS.<br />

Because of, it maintains itself safely from unauthorized system drivers.<br />

As a result, 64bit OS works very stably.<br />

But, driver installation is not so easy.<br />

<strong>OCD</strong> hardware will be worked properly after device driver was installed.<br />

<strong>OCD</strong> driver programs are <strong>co</strong>pied during application software installation. So, you have to install<br />

application program first.<br />

Following dialog boxes are using Korean character (Hangeul), it will be displayed English or<br />

Chinese, etc.<br />

Anyway, you can understand following examples.<br />

Windows-XP or previous OS need to setup each USB port, even if the same device driver. If you<br />

change USB port, you have to install <strong>OCD</strong> driver again.<br />

Windows-Vista does not the problem as <strong>abov</strong>e.<br />

2.4.1 Sequence<br />

Connect <strong>OCD</strong> hardware to USB port of your PC.<br />

64bit OS helps to install new driver whatever OS knows already.<br />

But, installation is in<strong>co</strong>nvenient what OS’s unknown devices.<br />

Following dialog box will not be shown, even if you plug <strong>OCD</strong> dongle hardware.<br />

So, you have to install manually.<br />

May, 2011 Ver. 1.01 13


<strong>OCD</strong> <strong>Debugger</strong><br />

Control panel is needed because it helps new hardware installation.<br />

Open <strong>co</strong>ntrol panel as following sequence.<br />

- Click “Start menu”, and then execute “Control panel” i<strong>co</strong>n.<br />

- Execute “System” i<strong>co</strong>n in “Control panel”<br />

I<strong>co</strong>n image is slightly different from each OS.<br />

- System window is looks like this.<br />

This capture is System window of Windows-7.<br />

May, 2011 Ver. 1.01 14


<strong>OCD</strong> <strong>Debugger</strong><br />

- Select “Device manager” which is located upper left side of System window.<br />

- “Device manager” shows PC hardware status as following example.<br />

- Select USB (Universal Serial Bus) <strong>co</strong>ntroller then sub devices are displayed.<br />

May, 2011 Ver. 1.01 15


<strong>OCD</strong> <strong>Debugger</strong><br />

- Connect <strong>OCD</strong> hard ware dongle to PC.<br />

USB cable is included with <strong>OCD</strong> hardware dongle.<br />

- If PC detects <strong>OCD</strong> hardware dongle, “Device manager” shows new hardware <strong>co</strong>nnection as<br />

following screen.<br />

May, 2011 Ver. 1.01 16


<strong>OCD</strong> <strong>Debugger</strong><br />

- <strong>OCD</strong> hardware dongle is treated as Unknown device of “Other devices”.<br />

Because of, <strong>OCD</strong> driver file is not installed yet.<br />

- Move mouse pointer on “Unknown device” and click right button.<br />

Select “Update Driver Software” on the sub-menu.<br />

May, 2011 Ver. 1.01 17


<strong>OCD</strong> <strong>Debugger</strong><br />

- “Update Driver software dialog box” is popped<br />

Select “Browse my <strong>co</strong>mputer for driver software”.<br />

- Dialog box asks the path of driver file folder.<br />

Click “Browse” button.<br />

- Select the folder that <strong>OCD</strong> program was installed.<br />

May, 2011 Ver. 1.01 18


<strong>OCD</strong> <strong>Debugger</strong><br />

- Click “Next” button to install <strong>OCD</strong> hardware driver.<br />

- Drivers are installed <strong>co</strong>mpletely. Close dialog box.<br />

- You can <strong>co</strong>nfirm the “Unknown device” is changed to “ABOV <strong>OCD</strong>” in USB <strong>co</strong>ntroller.<br />

May, 2011 Ver. 1.01 19


<strong>OCD</strong> <strong>Debugger</strong><br />

3. Menu function<br />

3.1 File menu<br />

3.1.1 Load hexa<br />

<strong>Debugger</strong> download hexadecimal file from<br />

PC folder to <strong>co</strong>de memory of the target<br />

MCU.<br />

It acts the same to ISP<br />

ISP means “In System Programming “.<br />

Click “Browse” button, then file dialog box<br />

will be pop-upped.<br />

Select hexa file which is you want to load.<br />

If you activate “Do VERIFICATION after<br />

download”, debugger will verify the <strong>co</strong>de<br />

memory and downloaded hex file after ISP.<br />

If you click this menu, Object file dialog box<br />

will be pop upped.<br />

This dialog box is <strong>co</strong>nstructed with banks.<br />

If previous PC breaks are not cleared yet,<br />

following dialog box will be pop upped.<br />

Click one of “Yes” or “No” button.<br />

If you are using linear address mode of<br />

M8051 or DCD8051 series, you do not need<br />

to select other banks. Because of, linear<br />

address mode uses only bank0.<br />

<strong>Debugger</strong> search map/symbol file and load<br />

it into PC memory.<br />

May, 2011 Ver. 1.01 20


<strong>OCD</strong> <strong>Debugger</strong><br />

After file download, debugger reset target<br />

MCU and move MCU program <strong>co</strong>unter to<br />

0000h.<br />

3.1.2 Save hexa<br />

Save the target <strong>OCD</strong> device’s internal <strong>co</strong>de<br />

memory data as a file.<br />

If you input the file name, debugger will<br />

save whole <strong>co</strong>de memory of current <strong>OCD</strong><br />

device.<br />

File format is intel-hexa format.<br />

3.1.3 Exit<br />

Save the last debugging environment to<br />

HDD and terminate debugger software.<br />

May, 2011 Ver. 1.01 21


<strong>OCD</strong> <strong>Debugger</strong><br />

3.2 Emulation menu<br />

This menu <strong>co</strong>ntains all emulation <strong>co</strong>ntrols.<br />

It can start emulation or stop emulation.<br />

Developer can <strong>co</strong>ntrol emulation flow for debugging.<br />

3.2.1 Reset and run<br />

It starts emulation from 0000h address, after<br />

reset the target MCU.<br />

It is the same to the real chip in a system<br />

which is powered on.<br />

Emulation will be <strong>co</strong>ntinued until break is<br />

occurred or developer stop emulation.<br />

This menu is not enabled during emulation.<br />

3.2.2 Run from<br />

It starts emulation from user specified address.<br />

It is used to debug each software module.<br />

It asks emulation start address as below.<br />

Using banked address mode, fill 4bits of<br />

bank and 16bit of address. Each bank size is<br />

smaller or equal to 64KB.<br />

This menu is not enabled during emulation.<br />

3.2.3 Run <strong>co</strong>ntinue<br />

It starts emulation from current address.<br />

Current address means:<br />

- Stopped address of previous emulation<br />

- If break was occurred:<br />

In break before mode, the PC-break<br />

address<br />

In break after mode, the next execution<br />

address of PC-break address<br />

- If MCU was reset, address is 0000h<br />

This menu is not enabled during emulation.<br />

Using linear address mode, you can fill 20bit<br />

address directly.<br />

May, 2011 Ver. 1.01 22


<strong>OCD</strong> <strong>Debugger</strong><br />

3.2.4 Step<br />

Target MCU executes only one machine<br />

instruction and halted. It is used to debug<br />

each instruction flow and process.<br />

If MCU reaches CALL instruction, Step run<br />

into the sub-routine.<br />

If MCU is in STOP mode, Step run is ignored.<br />

This menu is not enabled during emulation.<br />

3.2.5 Step over<br />

3.2.6 Step auto<br />

Step run is executed every 100mS.<br />

Execution will be <strong>co</strong>ntinued unless developer<br />

halts it.<br />

This menu is not enabled during emulation.<br />

3.2.7 Stop<br />

Emulation is halted immediately, even if<br />

MCU is in STOP mode.<br />

This menu is not enabled during emulation.<br />

Step over is nearly same to Step run, except<br />

sub-routine call.<br />

3.2.8 Apply reset<br />

If MCU reaches CALL instruction, debugger<br />

assumes CALL and its sub-routine as one<br />

instruction.<br />

Even if sub-routines are nested, it does not<br />

care.<br />

If Step over reaches PC-break <strong>co</strong>ndition,<br />

emulation will be halted.<br />

Hardware reset signal is released to the<br />

target MCU.<br />

Emulation is not halted when MCU is<br />

emulating.<br />

Target MCU is initialized and do nothing<br />

when target MCU is in idle mode.<br />

This function works whenever emulation or<br />

idle.<br />

It is used to check main program flow when<br />

each sub-routine had been tested already.<br />

This menu is not enabled during emulation.<br />

May, 2011 Ver. 1.01 23


<strong>OCD</strong> <strong>Debugger</strong><br />

3.3 Break/Configure menu<br />

It includes PC-break <strong>co</strong>ntrol and device <strong>co</strong>nfiguration and hardware<br />

test function.<br />

3.3.1 Clear ALL break<br />

Following timing diagram shows it.<br />

PC<br />

Break<br />

PC+1 PC+2 PC+3<br />

It clears all PC-breaks at once.<br />

PC<br />

This menu is not enabled during emulation.<br />

Fetch<br />

signa<br />

l<br />

명령<br />

operan<br />

명령<br />

opera<br />

d<br />

nd<br />

3.3.2 Break BEFORE (AFTER)<br />

It asks PC-break event occurring time to<br />

developer.<br />

This menu is not enabled during emulation.<br />

Break<br />

detec<br />

t<br />

Hand<br />

le<br />

Following dialog box is pop upped and asks<br />

one of two <strong>co</strong>nditions.<br />

If break before execution is selected, PCbreak<br />

will be occurred when PC is reached<br />

PC-break address, but PC-break position is<br />

not executed.<br />

May, 2011 Ver. 1.01 24


<strong>OCD</strong> <strong>Debugger</strong><br />

If break after execution is selected, PC-break<br />

will be occurred when PC is reached PCbreak<br />

address, and PC-break position is<br />

executed.<br />

Following timing diagram shows it.<br />

All peripherals include PLL, AD <strong>co</strong>nvertor will<br />

be stopped when you select STOP.<br />

It <strong>co</strong>ntrols all peripherals not individually. So<br />

you have to care to use this.<br />

PC<br />

Break<br />

PC+1 PC+2 PC+3<br />

PC<br />

3.3.4 Chip <strong>co</strong>nfiguration<br />

Fetch<br />

signal<br />

It is used to <strong>co</strong>nfigure the target MCU I/O<br />

명령<br />

opera<br />

nd<br />

명령<br />

operan<br />

d<br />

pin function, oscillation method, <strong>co</strong>de<br />

protection, etc.<br />

Break<br />

detec<br />

t<br />

Each device series has different <strong>co</strong>nfiguretions.<br />

Handl<br />

e<br />

This menu is not enabled during emulation.<br />

3.3.3 Peripheral <strong>co</strong>ntrol<br />

It asks to developer to select target MCU<br />

peripheral works or not during idle mode.<br />

Following example <strong>co</strong>nfiguration dialog box<br />

is for MC95FG204 device’s.<br />

It may be different with the other device<br />

series.<br />

Target MCU peripheral always works during<br />

emulation.<br />

This menu is not enabled during emulation.<br />

Following dialog box is pop upped and asks<br />

one of two <strong>co</strong>nditions.<br />

If the <strong>co</strong>nfiguration is changed, you have to<br />

power of the target MCU and power on<br />

again.<br />

Because of, <strong>co</strong>nfiguration is influenced when<br />

power is rising to operation voltage.<br />

It is used timer cycle measuring in interrupt<br />

sub-routine with peripheral STOP.<br />

May, 2011 Ver. 1.01 25


<strong>OCD</strong> <strong>Debugger</strong><br />

3.3.5 Clock freq. (95FR464 only)<br />

<strong>OCD</strong> debugger can not detect operation<br />

frequency of target MCU.<br />

MC95FR464 does not have sub-oscillator or<br />

internal PLL. It has Xin only.<br />

If you input Xin frequency, you can see the<br />

calculated emulation time.<br />

This function is enabled when the target<br />

device is MC95FR464.<br />

Please the target system’s power OFF when<br />

you change the target MCU.<br />

3.3.7 H/W test to repair<br />

It is used <strong>OCD</strong> emulator testing and repairing.<br />

All of its sub-function is not for software<br />

developer.<br />

3.3.6 Change <strong>OCD</strong> series<br />

<strong>Debugger</strong> can detect most of <strong>OCD</strong> series<br />

devices automatically.<br />

But, some devices have different <strong>OCD</strong> I/F<br />

and debugger can not detects this.<br />

3.3.8 Configuration Trimming<br />

It is used <strong>OCD</strong> emulator testing and repairing.<br />

All of its sub-function is not for software<br />

developer.<br />

May, 2011 Ver. 1.01 26


<strong>OCD</strong> <strong>Debugger</strong><br />

3.4 View menu<br />

View menu supports opening child windows.<br />

<strong>Debugger</strong> prepared 9 kinds of child windows.<br />

- MCS51 basic registers<br />

- Code disassemble<br />

- Code dump<br />

- XDATA dump<br />

- IRAM dump<br />

- SFR dump<br />

- Watch Global<br />

- Watch Local<br />

- Text file<br />

3.4.1 Toolbar<br />

It shows or hides Toolbar.<br />

Toolbar is located upper and left side of<br />

debugger frame.<br />

Toolbar includes menu buttons which are<br />

frequently used by developer.<br />

3.4.3 Window open bar<br />

It shows or hides Window open bar.<br />

Window open bar is located right side of<br />

Emulation Toolbar.<br />

Window open bar includes menu buttons<br />

which are used to open child windows.<br />

3.4.2 Emulation Toolbar<br />

It shows or hides Emulation Toolbar.<br />

Emulation Toolbar is located right side of<br />

Toolbar.<br />

Emulation Toolbar includes menu buttons<br />

which are frequently used during emulation<br />

<strong>co</strong>ntrol by developer.<br />

3.4.4 Status Bar<br />

It shows or hides Status bar.<br />

Status bar is located bottom side of<br />

debugger frame.<br />

Status bar displays simple help and<br />

emulation clock <strong>co</strong>unt, etc.<br />

May, 2011 Ver. 1.01 27


<strong>OCD</strong> <strong>Debugger</strong><br />

3.4.5 MCS51 basic registers<br />

It opens a window which displays MCS51<br />

series basic registers.<br />

If it was opened already, it will be moved to<br />

top most level of debugger frame.<br />

If it was opened already, it will be moved to<br />

top most level of debugger frame.<br />

This menu is not enabled during emulation.<br />

This menu is not enabled during emulation.<br />

3.4.6 Code disassemble<br />

It opens a window which displays disassembled<br />

<strong>co</strong>de memory.<br />

If it was opened already, it will be moved to<br />

top most level of debugger frame.<br />

3.4.8 XDATA dump<br />

It opens a window which displays dumped<br />

format of XDATA memory.<br />

XDATA means external data memory of<br />

MCS51 series.<br />

If it was opened already, it will be moved to<br />

top most level of debugger frame.<br />

This menu is not enabled during emulation.<br />

This menu is not enabled during emulation.<br />

3.4.7 Code dump<br />

It opens a window which displays dumped<br />

format of <strong>co</strong>de memory.<br />

May, 2011 Ver. 1.01 28


<strong>OCD</strong> <strong>Debugger</strong><br />

3.4.9 IRAM dump<br />

It opens a window which displays dumped<br />

format of IRAM memory.<br />

IRAM means internal data memory of MCS51<br />

series.<br />

3.4.11 Watch Global<br />

It opens a window which displays global<br />

variables.<br />

If it was opened already, it will be moved to<br />

top most level of debugger frame.<br />

If it was opened already, it will be moved to<br />

top most level of debugger frame.<br />

This menu is not enabled during emulation.<br />

3.4.12 Watch Local<br />

This menu is not enabled during emulation.<br />

It opens a window which displays local<br />

variables.<br />

If it was opened already, it will be moved to<br />

top most level of debugger frame.<br />

3.4.10 SFR dump<br />

It opens a window which displays dumped<br />

format of SFR peripherals.<br />

SFR means special function registers of<br />

MCS51 series.<br />

This menu is not enabled during emulation.<br />

If it was opened already, it will be moved to<br />

top most level of debugger frame.<br />

This menu is not enabled during emulation.<br />

May, 2011 Ver. 1.01 29


<strong>OCD</strong> <strong>Debugger</strong><br />

3.4.13 Text file<br />

It opens a window which displays Text file.<br />

If selected text file was opened already, it<br />

will be moved to top most level of debugger<br />

frame. Or not it opens new window.<br />

This menu is not enabled during emulation.<br />

May, 2011 Ver. 1.01 30


<strong>OCD</strong> <strong>Debugger</strong><br />

3.5 Window menu<br />

Window menu is used to change arrangement of child<br />

windows or to select child window directly.<br />

3.5.1 Cascade<br />

It arranges opened child windows as following<br />

example.<br />

3.5.3 Close<br />

It closes top most child window of the debugger<br />

frame.<br />

3.5.2 Tile<br />

It arranges opened child windows as following<br />

example.<br />

3.5.4 Windows 1, 2, 3, etc<br />

<strong>Debugger</strong> assigned serial number 1, 2, 3,…<br />

to each child windows by opened order.<br />

Developer can select opened child window<br />

by the serial number<br />

May, 2011 Ver. 1.01 31


<strong>OCD</strong> <strong>Debugger</strong><br />

4. Child windows<br />

4.1 MCS51 basic registers window<br />

It supports display and edit for MCS51 series registers.<br />

4.1.1 Edit<br />

If developer changes register’s value,<br />

“Modify” button will be enabled.<br />

Modification will be affected to the real chip<br />

when developer clicks “Modify” button.<br />

Above red area is R0~R7 registers.<br />

These are the same area to IRAM address<br />

00h~1Fh.<br />

Developer can change it by using 8bit<br />

hexadecimal number.<br />

Above red area shows current register bank.<br />

Developer can change current register bank.<br />

May, 2011 Ver. 1.01 32


<strong>OCD</strong> <strong>Debugger</strong><br />

Developer can change it by using 8bit<br />

hexadecimal number.<br />

Above red area is PSW (Program Status<br />

Word)는, and it can be changed by bit unit.<br />

Above read area shows DPTR register.<br />

DPTR is displayed and edited by 16bit hexadecimal<br />

number.<br />

Above red area shows Acc (Accumulator), B<br />

(B-register), SP (Stack pointer) registers.<br />

If target MCU have more than two DPTR<br />

registers at the same address, it shows<br />

currently selected register. If each DPTR<br />

registers have different address, you had<br />

better to use SFR window.<br />

May, 2011 Ver. 1.01 33


<strong>OCD</strong> <strong>Debugger</strong><br />

4.2 Code disassemble window<br />

Code disassemble window displays <strong>co</strong>de memory by using disassemble format.<br />

All operand value is using hexadecimal number.<br />

If Map/Symbol file is loaded already, address area shows source line information as a box.<br />

4.2.1 Source file 열기<br />

If Map/Symbol file is loaded already, double<br />

click a box in address area which has source<br />

file information. Then source file will be<br />

opened and move to the line of the address.<br />

4.2.2 Line assemble<br />

Line assemble means developer can change<br />

<strong>co</strong>de area by using assemble language.<br />

Move mouse cursor to the line where you<br />

want to change. Click mouse’s right button.<br />

Change the line by input instruction and<br />

operand, etc. Use hexadecimal number.<br />

It changes target MCU <strong>co</strong>de area directly,<br />

but not change source program file.<br />

It supports line assemble function.<br />

May, 2011 Ver. 1.01 34


<strong>OCD</strong> <strong>Debugger</strong><br />

PC-break <strong>co</strong>unt differs from each device<br />

series, normally eight breaks are prepared.<br />

Red line means PC-break line.<br />

Blue line means current PC.<br />

4.2.3 PC break toggle<br />

PC is target MCU internal Program Counter.<br />

It sets or clears PC-break setting.<br />

Double click mouse’s left button where you<br />

want to set or clear PC-break.<br />

May, 2011 Ver. 1.01 35


<strong>OCD</strong> <strong>Debugger</strong><br />

4.3 Code dump window<br />

Code dump windows display each 8bit data of <strong>co</strong>de memory by using hexadecimal number.<br />

And it supports data editing.<br />

Upper side of this window displays address of current cursor position and checksum of current<br />

page.<br />

Current page number is displayed center of this window.<br />

Each page is <strong>co</strong>nstructed with 256bytes and its address is xx00~xxFFh (xx is page number).<br />

4.3.1 Edit<br />

Developer can change the data value<br />

whenever except being emulation.<br />

If you want to cancel these inputs, press ESC<br />

key.<br />

Modification is affected by pressing Enter<br />

key, and then character <strong>co</strong>lor is changed to<br />

black.<br />

4.3.2 Bank<br />

MCS51 series have 16bit <strong>co</strong>de address and<br />

support maximum 64KB area.<br />

Editing method is very simple. Just move<br />

the cursor where you want to edit and write<br />

hexadecimal number<br />

Character <strong>co</strong>lor will be changed from black<br />

to red,<br />

To over<strong>co</strong>me this limit, banked address is<br />

used.<br />

ABOV’s MCS51 series does not use banked<br />

address but linear address.<br />

Anyway, display uses page unit in 64KB<br />

range.<br />

May, 2011 Ver. 1.01 36


<strong>OCD</strong> <strong>Debugger</strong><br />

Bank is just upper 4bit address of 20bit<br />

address.<br />

4.3.5 Save<br />

4.3.3 Goto<br />

Code 영역의 지정된 구간을 pattern file 로<br />

save 하는 기능입니다.<br />

“Goto” is used to move 16bit address range.<br />

So, its range is 0000~FFFFh.<br />

It is used when developer to save user<br />

pattern as a file.<br />

4.3.4 Load<br />

It is used to load pattern data to <strong>co</strong>de area.<br />

4.3.6 Fill<br />

It fills <strong>co</strong>de area with same data.<br />

Of <strong>co</strong>urse, developer can download by using<br />

“Load hexa” in File menu. But this is used to<br />

load user specified data pattern only. It<br />

does not clear entire <strong>co</strong>de area.<br />

May, 2011 Ver. 1.01 37


<strong>OCD</strong> <strong>Debugger</strong><br />

4.4 XDATA dump window<br />

XDATA dump windows display each 8bit data of <strong>co</strong>de memory by using hexadecimal number.<br />

And it supports data editing.<br />

Upper side of this window displays address of current cursor position and checksum of current<br />

page.<br />

Current page number is displayed center of this window.<br />

Each page is <strong>co</strong>nstructed with 256bytes and its address is xx00~xxFFh (xx is page number).<br />

4.4.1 Edit<br />

Developer can change the data value<br />

whenever except being emulation.<br />

If you want to cancel these inputs, press ESC<br />

key.<br />

Modification is affected by pressing Enter<br />

key, and then character <strong>co</strong>lor is changed to<br />

black.<br />

4.4.2 Bank<br />

MCS51 series have 16bit XDATA address and<br />

support maximum 64KB area.<br />

Editing method is very simple. Just move<br />

the cursor where you want to edit and write<br />

hexadecimal number<br />

Character <strong>co</strong>lor will be changed from black<br />

to red,<br />

To over<strong>co</strong>me this limit, banked address is<br />

used.<br />

ABOV’s MCS51 series does not use banked<br />

address but linear address.<br />

Anyway, display uses page unit in 64KB<br />

range.<br />

May, 2011 Ver. 1.01 38


<strong>OCD</strong> <strong>Debugger</strong><br />

Bank is just upper 4bit address of 20bit<br />

address.<br />

4.4.5 Save<br />

4.4.3 Goto<br />

It saves XDATA area as a pattern file.<br />

“Goto” is used to move 16bit address range.<br />

So, its range is 0000~FFFFh.<br />

It is used when developer to save user<br />

pattern as a file.<br />

4.4.4 Load<br />

It is used to load pattern data to <strong>co</strong>de area.<br />

4.4.6 Fill<br />

It fills XDATA area with same data.<br />

It is used to load user specified data pattern<br />

only. It does not clear entire XDATA area.<br />

May, 2011 Ver. 1.01 39


<strong>OCD</strong> <strong>Debugger</strong><br />

4.5 IRAM dump window<br />

IRAM dump windows display each 8bit data of <strong>co</strong>de memory by using hexadecimal number.<br />

And it supports data editing.<br />

Upper side of this window displays address of current cursor position and checksum of current<br />

page.<br />

Large “IR” is displayed center of this window.<br />

IRAM 00~7Fh is direct area and its character is black/<br />

IRAM 80~FFh is indirect area and its character is cyan/<br />

Please refer device manual about direct / indirect area.<br />

4.5.1 Edit<br />

Developer can change the data value<br />

whenever except being emulation.<br />

the cursor where you want to edit and write<br />

hexadecimal number<br />

Character <strong>co</strong>lor will be changed from black<br />

to red,<br />

If you want to cancel these inputs, press ESC<br />

key. Modification is affected by pressing<br />

Enter key, and then character <strong>co</strong>lor is<br />

changed to black.<br />

4.5.2 Save<br />

Editing method is very simple.<br />

Just move<br />

It saves IRAM area as a pattern file.<br />

May, 2011 Ver. 1.01 40


<strong>OCD</strong> <strong>Debugger</strong><br />

4.6 SFR dump window<br />

SFR (Special Function Register) dump windows display each 8bit data of <strong>co</strong>de memory by using<br />

hexadecimal number.<br />

And it supports data editing.<br />

Upper side of this window displays address of current cursor position.<br />

SFR 80~FFh is direct area of IRAM.<br />

Please refer device manual about SFR. Because of, SFR differs from each device series.<br />

4.6.1 Edit<br />

Developer can change the data value<br />

whenever except being emulation.<br />

4.6.2 Refresh<br />

SFR area includes static registers like stack<br />

pointer, accumulator, etc. But most of SFRs<br />

are dynamic various registers as timer, I/O,<br />

etc.<br />

“Refresh” button renewals displayed data.<br />

Editing method is very simple. Just move<br />

the cursor where you want to edit and write<br />

hexadecimal number<br />

Character <strong>co</strong>lor will be changed from black<br />

to red,<br />

If you want to cancel these inputs, press ESC<br />

key. Modification is affected by pressing<br />

Enter key, and then character <strong>co</strong>lor is<br />

changed to black.<br />

4.6.3 Save<br />

It saves SFR area as a pattern file.<br />

May, 2011 Ver. 1.01 41


<strong>OCD</strong> <strong>Debugger</strong><br />

4.7 Watch Global window<br />

Watch Global window shows and support modification for global variables of developer’s C-<br />

language based source program.<br />

Each variable are located on Code, XDATA, IRAM, SFR, etc . So developer know its location,<br />

developer can edit it directly. Bur it is too bothersome to find variable.<br />

Watch Global window helps it.<br />

Map/Symbol file is needed to use this window.<br />

4.7.1 Add symbol<br />

Add global variable to Watch Global window<br />

display list.<br />

4.7.3 Edit<br />

Move mouse cursor on the line where you<br />

want to edit.<br />

Double click mouse’s left button.<br />

Edit dialog box will be pop upped.<br />

4.7.2 Remove symbol<br />

Change data and click “Modify” button.<br />

Remove global variable from Watch Global<br />

window display list.<br />

May, 2011 Ver. 1.01 42


<strong>OCD</strong> <strong>Debugger</strong><br />

4.8 Watch Local window<br />

Watch Local window shows and support modification for local variables of developer’s C-<br />

language based source program.<br />

Each variable are located on Code, XDATA, IRAM, SFR, etc . So developer know its location,<br />

developer can edit it directly. Bur it is too bothersome to find variable.<br />

Watch Local window helps it.<br />

Map/Symbol file is needed to use this window.<br />

4.8.1 Edit<br />

Following screen capture shows C source<br />

program module. Current program <strong>co</strong>unter<br />

is located in function module “delay(UINT<br />

uCnt)”, then local variable window displays<br />

module name to upper side and its variable.<br />

Move mouse cursor on the line where you<br />

want to edit.<br />

Double click mouse’s left button.<br />

Edit dialog box will be pop upped.<br />

Change data and click “Modify” button.<br />

4.8.2 변수의 추가, 삭제<br />

Local variable is dynamic.<br />

each program module.<br />

It depends on<br />

<strong>Debugger</strong> check current C module and find<br />

its local variables automatically. So<br />

developer does not need to add or remove<br />

it.<br />

May, 2011 Ver. 1.01 43


<strong>OCD</strong> <strong>Debugger</strong><br />

If program flow is changed to another<br />

module, then local variable list is changed.<br />

May, 2011 Ver. 1.01 44


<strong>OCD</strong> <strong>Debugger</strong><br />

4.9 Text file window<br />

It displays text file, but file edit is not supported.<br />

If Map/Symbol file was loaded already, source program file shows real hardware address at the<br />

line number area.<br />

Ex) If Map/Symbol file was not loaded, or file does not include symbol information.<br />

Only line number is displayed.<br />

Ex) If Map/Symbol file was loaded, and file includes symbol information.<br />

Line number and address are displayed.<br />

May, 2011 Ver. 1.01 45


<strong>OCD</strong> <strong>Debugger</strong><br />

4.9.1 Goto line<br />

Move current display line.<br />

Double click mouse’s left button in the text<br />

area, then PC-break will be toggled.<br />

Map/Symbol information is not needed. It<br />

asks only a line number.<br />

4.9.2 Disassemble window 연동<br />

If Map/Symbol file was loaded already and<br />

text file have its information, then text file<br />

shows address lather than line number.<br />

PC-break line <strong>co</strong>lor is RED.<br />

Current program <strong>co</strong>unter address line <strong>co</strong>lor<br />

is BLUE.<br />

Double click mouse’s left button in the<br />

address area, then disassemble window will<br />

be opened and moved to that address.<br />

4.9.3 Break toggle<br />

If Map/Symbol file was loaded already and<br />

text file have its information, then text file<br />

shows address lather than line number.<br />

May, 2011 Ver. 1.01 46


<strong>OCD</strong> <strong>Debugger</strong><br />

<strong>OCD</strong> 调 试 器<br />

ABOV Semi<strong>co</strong>nductor’s 8 位 单 片 机 的 的 调 试 器<br />

5. 关关 于 <strong>OCD</strong><br />

5.1 前 言<br />

-<strong>OCD</strong> ( 在 线 调 试 器 ) 调 试 器 可 以 支 持 现 代 8 位 的 单 片 机 仿 真 .<br />

-ABOV 大 多 数 M8051 和 DCD8051 系 列 的 MCU 可 用 <strong>OCD</strong> 调 试 .<br />

-<strong>OCD</strong> 调 试 器 需 要 使 用 现 代 公 司 的 <strong>OCD</strong> 硬 件 设 备 .<br />

-<strong>OCD</strong> 调 试 器 的 接 口 采 用 两 线 制 连 接 PC 和 MCU 用 户 系 统统 .<br />

-<strong>OCD</strong> 可 以 读 写写 MCU 内内 部 存 储 器 和 I/O 寄 存 器 的 数 据 .<br />

- 还 有 ,<strong>OCD</strong> 可 控 制 内内 部 仿 真 逻 辑 , 实 现 MCU 单 步 和 全全 速 , 检 测 寄 存 器 等 .<br />

-<strong>OCD</strong> 调 试 器 不 需 要 昂 贵 的 仿 真 设 备 , <strong>OCD</strong> 可 实 现 MCU 仿 真 最 大 效 能 , 还 可 在 线 下 载 程 序 (ISP).<br />

-<strong>OCD</strong> 可 以 在 Microsoft®-Windows NT, 2000, XP, Vista, Windows-7 (32bit & 64bit) 多 种 操 作 系 统统 下<br />

运 行 .<br />

在 64 位 系 统统 下 安 装 <strong>OCD</strong> 的 硬 件 和 软 件 会 比比 较 繁 琐 .<br />

<strong>OCD</strong> 进 行 软 件 开 发 和 调 试 时 被 接 口 通 讯 占 用 的 两 个 I/O 不 能 被 调 试 .<br />

May, 2011 Ver. 1.01 47


<strong>OCD</strong> <strong>Debugger</strong><br />

例 ) <strong>OCD</strong> 调 试 器 操 作 界 面<br />

May, 2011 Ver. 1.01 48


<strong>OCD</strong> <strong>Debugger</strong><br />

5.2 特 点<br />

支 持 所 有 ABOV<br />

八 位 单 片 机 和 大 多 数<br />

Mentor8051 和 DCD8051 系 列 单 片 机<br />

加 载 HEX 和 map/symbol 的 文 件 类 型<br />

图 形 仿 真 界 面<br />

可 以 看 到 目 标 MCU 的 所 有 程 序 码<br />

可 以 在 线 下 载 程 序<br />

显 示 程 序 的 反 汇汇 编编 代 码<br />

在 线 仿 真<br />

查 找 断 点<br />

支 持 显 示 和 修 改 数 据 存 储 器 和 特 殊 功 能 寄 存<br />

器 等 .<br />

可 以 显 示 代 码 区 和 外 部 数 据 存 储 区 .<br />

自 动 检 测 MCU 设 备<br />

– 不 用 选 择 设 备 配 置置<br />

仿 真 频 率<br />

– 实 现 目 标 MCU 最 大 效 能<br />

仿 真 电 压<br />

– 支 持 目 标 MCU 的 工 作 电 压 范 围<br />

仿 真 时 钟<br />

– 所 有 的 外 部 晶 体 , 内内 部 / 外 部 RC 等<br />

显 示 仿 真 时 间<br />

– 计 算 和 显 示 已 执 行 机 器 周 期<br />

支 持 的 仿 真 模 式<br />

– 全全 速 , 单 步 , 半 自 动 等<br />

存 储 和 装 载 开 发 系 统统<br />

操 作 系 统统<br />

– Microsoft® Windows NT<br />

– Microsoft® Windows 2000<br />

– Microsoft® Windows XP (32bit, 64bit)<br />

– Microsoft® Windows Vista (32bit, 64bit)<br />

– Microsoft® Windows7 (32bit, 64bit)<br />

关关 于 软 件<br />

– Abov Semi<strong>co</strong>nductor MDS<br />

– Email address : seungduk.ha@<strong>abov</strong>.<strong>co</strong>.<strong>kr</strong><br />

May, 2011 Ver. 1.01 49


<strong>OCD</strong> <strong>Debugger</strong><br />

6. 安 装<br />

你 可 下 载 安 装 文 件 从 我 们 的 网网 址 (http://www.<strong>abov</strong>.<strong>co</strong>.<strong>kr</strong>/).<br />

你 最 好 及 时 更 新 <strong>OCD</strong> 版 本 , 因 为 我 们 会 不 断 增 加 新 的 型 号 和 新 的 软 件 功 能<br />

我 们 不 提 供 安 装 CD.<br />

你 最 好 先 装 应 用 软 件 , 因 为 <strong>OCD</strong> 的 驱 动 会 在 你 装 软 件 的 时 候 被 安 装 .<br />

装 软 件 时 , 你 最 好 别 插 上 <strong>OCD</strong> 的 硬 件 .<br />

在 你 安 装 软 件 前 , 你 最 好 知 道 你 PC 的 操 作 系 统统 是 32 位 或 是 64 位<br />

然 后 再 下 载 和 安 装 相 关关 的 程 序 .<br />

检 查 PC 的 操 作 系 统统<br />

- 打 开 控 制 版 面<br />

- 找 到 系 统统 图 标 打 开<br />

例 ) XP 32 位 操 作 系 统统<br />

例 ) XP 64 位 操 作 系 统统<br />

May, 2011 Ver. 1.01 50


<strong>OCD</strong> <strong>Debugger</strong><br />

下 面 的 图 片 显 示 <strong>OCD</strong> 的 所 有 硬 件 .<br />

自 左 起 分 别 是 USB 线 , 转 接 线 和 <strong>OCD</strong> 设 备<br />

转 接 线 的 引 脚 分 配 见 下 图 所 示 .<br />

Pin #5 是 选 择 使 用 在 不 同 的 <strong>OCD</strong> 设 备 .<br />

在 安 装 的 时 候 要 注 意<br />

安 装 顺 序 是 非 常 重 要 的 .<br />

先 安 装 <strong>OCD</strong> 仿 真 软 件 , 然 后 再 连 接 <strong>OCD</strong> 的 硬 件 .<br />

安 装 <strong>OCD</strong> 硬 件 之 前 需 安 装 了 <strong>OCD</strong> 的 驱 动 和 应 用 软 件 .<br />

使 用 时 注 意<br />

<strong>OCD</strong> 的 硬 件 系 统统 不 支 持 目 标 系 统统 的 热 拔 插 , 这 样 会 永永 久 性 的 损 坏 <strong>OCD</strong> 的 硬 件 系 统统 .<br />

目 标 系 统统 必 须 关关 闭 电 源 后 , 才 能 拔 插 <strong>OCD</strong> 硬 件 .<br />

May, 2011 Ver. 1.01 51


<strong>OCD</strong> <strong>Debugger</strong><br />

6.1 软 件 安 装 (32 位 )<br />

你 最 好 先 装 应 用 软 件 , 因 为 <strong>OCD</strong> 的 驱 动 会 在 你 装 软 件 的 时 候 被 安 装 .<br />

装 软 件 时 , 你 最 好 别 插 上 <strong>OCD</strong> 的 硬 件 .<br />

6.1.1 操 作 顺 序<br />

1. 当 安 装 程 序 被 执 行 , 下 面 的 对 话 框 就 会 被 弹 出 .<br />

请 点 击 ” 下 一 步 ” 按 钮<br />

4. 当 安 装 类 型 对 话 框 弹 出 , 请 选 择 “ 完 整 安 装 ”, 再<br />

点 击 “ 下 一 步 ” 按 钮 .<br />

2. 当 许 可 允允 许 对 话 框 弹 出 时 , 请 选 择 “ 我 同 意 ”, 再<br />

点 击 “ 下 一 步 ” 按 钮 .<br />

5, 下 面 的 对 话 框 请 点 击 “ 安 装 ” 按 钮 .<br />

3. 当 下 面 的 对 话 框 弹 出 , 请 填 写写 你 的 用 户 名 和 公<br />

司 名 , 再 点 击 “ 下 一 步 ” 按 钮 .<br />

6. 显 示 安 装 的 进 度 , 请 等 待 直 到 完 成 .<br />

May, 2011 Ver. 1.01 52


<strong>OCD</strong> <strong>Debugger</strong><br />

6.1.2 拷 贝 路 径<br />

7 安 装 完 成 , 下 面 的 对 话 框 会 弹 出 , 点 击 ” 完 成 ” 按<br />

钮 .<br />

<strong>OCD</strong> 安 装 程 序 的 路 径 在 程 序 文 件 里 , 除 非 你 改 变<br />

它 .<br />

C:\Program Files\ABOV Semi<strong>co</strong>nductor<br />

\<strong>OCD</strong> 的 仿 真<br />

在 安 装 <strong>OCD</strong> 驱 动 的 时 候 应 用 程 序 的 路 径 会 被 用<br />

到 ,<br />

May, 2011 Ver. 1.01 53


<strong>OCD</strong> <strong>Debugger</strong><br />

<strong>OCD</strong> 安 装 的 顺 序 (32bit)<br />

在 <strong>OCD</strong> 的 驱 动 安 装 完 之 后 <strong>OCD</strong> 的 硬 件 才 会 稳 定 工 作 .<br />

<strong>OCD</strong> 的 驱 动 在 软 件 的 安 装 的 时 候 拷 贝 , 所 以 应 该 先 安 装 软 件 .<br />

下 面 的 的 对 话 框 是 韩 文 的 , 也 可 以 显 示 英 文 或 是 中 文 , 等 .<br />

你 可 以 通 过 下 面 的 例 子 了 解 安 装 过 程 .<br />

Windows-XP 或 是 其 他 预 装 的 OS 需 要 安 装 驱 动 到 每 一 个 USB 口 , 甚 至 是 相 同 的 设 备 , 如 果 你 换 了 一 个<br />

USB 口 , 你 需 要 重 新 安 装 <strong>OCD</strong> 驱 动 .<br />

Windows-Vista 不 会 出 现 上 面 的 问 题 .<br />

6.1.3 安 装 顺 序<br />

1. 连 接 <strong>OCD</strong> 硬 件 到 你 电 脑 的 USB 口 .<br />

5. 现 在 , Window OS 会 询 问 是 否 需 要 继继 续续 安 装 .<br />

点 击 “ 继继 续续 ” 按 钮 , 直 到 安 装 结结 束 .<br />

2.PC 检 测 到 新 的 硬 件 , 将 会 弹 出 下 面 的 对 话 框 .<br />

选 择 向 下 面 一 样 , 再 点 击 “ 下 一 步 ” 按 钮<br />

6. 一 些 Windows 操 作 系 统统 会 问 多 次 像 上 面 一 样 ,<br />

处 理 的 方 法 是 一 样 的 .<br />

3. 下 面 的 对 话 框 会 弹 出 , 与 之 前 一 样 , 再 点 击 “ 下 一<br />

步 ” 按 钮 .<br />

4. 下 一 个 对 话 框 将 会 询 问 INF 文 件 的 路 径 . 在 空<br />

白 处 填 上 路 径 , 再 点 击 “ 下 一 步 ” 按 钮 .<br />

May, 2011 Ver. 1.01 54


<strong>OCD</strong> <strong>Debugger</strong><br />

校 验 安 装<br />

这 一 步 不 是 必 要 的 .<br />

打 开 操 作 系 统统 的 控 制 面 版 , 选 择 设 备 管 理 , 你 会 看<br />

到 串 行 通 讯 设 备 (USB) 中 有 ”ABOV <strong>OCD</strong>” 设 备 .<br />

右 边 是 截 图 .<br />

May, 2011 Ver. 1.01 55


<strong>OCD</strong> <strong>Debugger</strong><br />

6.2 软 件 安 装 (64 位 )<br />

你 最 好 先 装 应 用 软 件 , 因 为 <strong>OCD</strong> 的 驱 动 会 在 你 装 软 件 的 时 候 被 安 装 .<br />

安 装 软 件 时 , 你 最 好 别 插 上 <strong>OCD</strong> 的 硬 件 .<br />

<strong>OCD</strong> 在 64 位 操 作 系 统统 的 安 装 流 程 和 32 位 操 作 系 统统 差 不 多 .<br />

当 你 看 到 下 面 警 告 的 信 息 , 请 点 击 “ 是 ” 按 钮 .<br />

6.2.1 安 装 顺 序<br />

当 你 的 安 装 程 序 已 经 执 行 , 下 面 的 对 话 框 将 会 弹<br />

出 , 请 点 击 “ 下 一 步 ” 按 钮 .<br />

3. 当 下 面 的 对 话 框 弹 出 , 请 填 写写 你 的 用 户 名 和 公<br />

司 名 , 再 点 击 “ 下 一 步 ” 按 钮 .<br />

2. 当 许 可 允允 许 对 话 框 弹 出 时 , 请 选 择 “ 我 同 意 许 可 ”,<br />

再 点 击 “ 下 一 步 ” 按 钮 .<br />

May, 2011 Ver. 1.01 56


<strong>OCD</strong> <strong>Debugger</strong><br />

4. 当 安 装 类 型 对 话 框 弹 出 , 请 选 择 “ 完 整 安 装 ”, 再<br />

点 击 “ 下 一 步 ” 按 钮 .<br />

7 安 装 完 成 , 点 击 “ 完 成 ” 按 钮 .<br />

5, 下 面 的 对 话 框 请 点 击 “ 安 装 ” 按 钮 .<br />

6.2.2 拷 贝 路 径<br />

<strong>OCD</strong> 安 装 程 序 的 路 径 在 程 序 文 件 里 , 除 非 你 改 变<br />

它 .<br />

C:\Program Files\ABOV Semi<strong>co</strong>nductor<br />

\<strong>OCD</strong> 的 仿 真<br />

在 安 装 <strong>OCD</strong> 驱 动 的 时 候 应 用 程 序 的 路 径 会 被 用<br />

到 ,<br />

6. 安 装 进 度 显 示 , 请 等 待 安 装 完 成 .<br />

May, 2011 Ver. 1.01 57


<strong>OCD</strong> <strong>Debugger</strong><br />

6.3 <strong>OCD</strong> 驱 动 的 安 装 (64 安 装 位 )<br />

微 软 64 位 的 操 作 系 统统 的 驱 动 管 理 比比 32 位 的 操 作 系 统统 更 加 严 格 ,<br />

为 保 护 自 己 的 安 全全 , 控 制 安 装 没没 有 授 权 的 系 统统 设 备 ,<br />

这 样 64 位 操 作 系 统统 才 可 以 更 稳 定 的 工 作 ,<br />

但 是 64 位 系 统统 的 <strong>OCD</strong> 驱 动 安 装 比比 较 麻 烦 .<br />

在 <strong>OCD</strong> 的 驱 动 安 装 完 之 后 <strong>OCD</strong> 的 硬 件 才 会 稳 定 工 作 .<br />

<strong>OCD</strong> 的 驱 动 在 软 件 的 安 装 的 时 候 拷 贝 , 所 以 应 该 先 安 装 软 件 .<br />

下 面 的 的 对 话 框 是 韩 文 的 , 也 可 以 显 示 英 文 或 是 中 文 , 等 .<br />

你 可 以 通 过 下 面 的 例 子 了 解 安 装 过 程 .<br />

Windows-XP 或 是 其 他 预 装 的 OS 需 要 安 装 驱 动 到 每 一 个 USB 口 , 甚 至 是 相 同 的 设 备 , 如 果 你 换 了 一 个<br />

USB 口 , 你 需 要 重 新 安 装 <strong>OCD</strong> 驱 动 .<br />

Windows-Vista 不 会 出 现 上 面 的 问 题 .<br />

6.3.1 顺 <br />

1. 连 接 <strong>OCD</strong> 硬 件 到 你 电 脑 的 USB 口 .<br />

2. 64 位 操 作 系 统统 一 旦 检 测 到 新 硬 件 , 就 会 出 现 帮 助 对 话 框 . 但 是 对 于 操 作 系 统统 不 知 道 的 硬 件 , 安 装 并 不 是<br />

很 容 易 .<br />

3. 下 面 的 对 话 框 将 会 出 现 , 即 使 你 拔 掉 硬 件 .<br />

4. 因 此 , 你 需 要 手 动 安 装 .<br />

May, 2011 Ver. 1.01 58


<strong>OCD</strong> <strong>Debugger</strong><br />

在 新 硬 件 的 安 装 过 程 中 , 使 用 控 制 版 面 .<br />

打 开 控 制 版 面 按 照 下 面 的 顺 序 .<br />

- 点 击 “ 开 始 菜 单 ”, 然 后 点 击 “ 控 制 版 面 ” 图 标 .<br />

- 点 击 控 制 版 面 的 “ 系 统统 ” 图 标 .<br />

- 图 标 比比 其 他 图 标 浅 一 些 .<br />

- 系 统统 窗 口 是 这 样 的 .<br />

- 下 面 是 Windows-7 的 系 统统 窗 口 .<br />

May, 2011 Ver. 1.01 59


<strong>OCD</strong> <strong>Debugger</strong><br />

- 选 择 “ 驱 动 管 理 ”, 它 位 于 系 统统 窗 口 的 左 上 角 .<br />

- “ 设 备 管 理 ” 显 示 了 PC 的 硬 件 状 态 , 下 面 是 一 个 例 子 .<br />

- 选 择 USB( 通 用 串 行 总 线 ), 然 后 子 设 备 将 会 显 示 .<br />

May, 2011 Ver. 1.01 60


<strong>OCD</strong> <strong>Debugger</strong><br />

- 连 接 <strong>OCD</strong> 硬 件 到 PC.<br />

USB 线 要 连 接 <strong>OCD</strong> 的 硬 件 .<br />

- 如 果 PC 检 测 到 <strong>OCD</strong> 的 硬 件 , “ 设 备 管 理 ” 将 会 显 示 新 的 硬 件 连 接<br />

像 下 图 一 样 .<br />

May, 2011 Ver. 1.01 61


<strong>OCD</strong> <strong>Debugger</strong><br />

- <strong>OCD</strong> 的 硬 件 被 认 作 未 识 别 设 备 列 在 “ 其 他 设 备 ” 中 .<br />

- 因 为 ,<strong>OCD</strong> 的 驱 动 文 件 还 没没 有 安 装 .<br />

- 移 动 鼠 标 到 “ 未 知 设 备 ” 再 点 击 右 键 .<br />

- 在 子 菜 单 中 选 择 “ 更 新 驱 动 程 序 ”.<br />

May, 2011 Ver. 1.01 62


<strong>OCD</strong> <strong>Debugger</strong><br />

- “ 更 新 设 备 驱 动 ” 将 会 弹 出<br />

选 择 “ 查 看 我 的 电 脑 为 设 备 增 加 驱 动 ”.<br />

- 对 话 框 将 会 询 问 驱 动 文 件 夹 得 路 径 .<br />

点 击 “ 查 看 ” 按 钮 .<br />

- 选 择 <strong>OCD</strong> 的 安 装 目 录 的 文 件 夹 .<br />

May, 2011 Ver. 1.01 63


<strong>OCD</strong> <strong>Debugger</strong><br />

- 点 击 “ 下 一 步 ” 按 钮 , 安 装 <strong>OCD</strong> 的 硬 件 驱 动 .<br />

- 驱 动 安 装 完 成 , 关关 闭 对 话 框 .<br />

- 你 可 以 确 认 USB 控 制 器 中 “ 未 知 设 备 ” 已 经 变 成 “ABOV <strong>OCD</strong>”.<br />

May, 2011 Ver. 1.01 64


<strong>OCD</strong> <strong>Debugger</strong><br />

7. 菜 单 功 能<br />

7.1 文 件 菜 单<br />

7.1.1 下 载 hexa<br />

调 试 器 从 PC 的 文 件 夹 中 下 载 十 六 进 制 文 件 到 目<br />

标 MCU 的 代 码 存 储 器 。<br />

操 作 与 ISP ( 在 线 编编 程 ) 相 同 。<br />

选 择 需 要 下 载 的 hexa 文 件 。<br />

若 最 后 上 次 使 用 PC 断 开 程 序 时 没没 有 清 除 , 则 提<br />

示 以 下 对 话 框 , 单 击 “Yes” 或 “No” 按 钮 。<br />

调 试 器 查 找 map/symbol 本 件 并 下 载 到 PC 存 储<br />

器 。<br />

单 击 此 菜 单 , 将 提 示 目 标 文 件 对 话 框 。<br />

此 对 话 框 由 空 白 栏 建 立 。<br />

若 使 用 M8051 或 DCD8051 系 列 的 线 性 地 址 模<br />

式 , 无 须 选 择 其 他 空 白 栏 。 原 因 是 , 线 性 地 址<br />

模 式 只 能 使 用 内内 存 库 0。<br />

下 载 文 件 后 , 调 试 器 复 位 目 标 MCU 并 更 改<br />

MCU 程 序 计 数 器 为 0000h。<br />

7.1.2 退 出<br />

保 存 最 后 一 次 调 试 环 境 到 HDD 并 停 止 调 试 程<br />

序 。<br />

单 击 “Browse” 按 钮 , 然 后 提 示 文 件 对 话 框 。<br />

May, 2011 Ver. 1.01 65


<strong>OCD</strong> <strong>Debugger</strong><br />

7.2 运 行 菜 单<br />

此 菜 单 包 含 所 有 仿 真 控 制 。<br />

可 以 开 始 或 结结 束 仿 真 。<br />

开 发 者 可 以 控 制 调 试 器 的 仿 真 溢 出 。<br />

7.2.1 复 位 和 运 行<br />

复 位 目 标 MCU 后 , 其 仿 真 开 始 地 址 为 0000h 。<br />

上 电 后 在 系 统统 中 与 真 实 芯 片 相 同 。<br />

直 到 发 生 断 点 或 开 发 者 停 止 仿 真 时 仿 真 才 能 停<br />

止 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

- 上 一 次 仿 真 的 停 止 地 址<br />

- 产 生 断 点 :<br />

在 断 点 前 模 式 , 是 PC- 断 点 地 址<br />

在 断 点 后 模 式 , 是 下 一 个 PC- 断 点 地 址<br />

- 若 MCU 复 位 , 地 址 为 0000h<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.2.2 开 始 运 行<br />

由 用 户 指 定 仿 真 开 始 地 址 。<br />

常 用 于 调 试 软 件 中 的 各 个 模 块 。<br />

如 下 所 示 确 定 仿 真 开 始 的 地 址 。<br />

7.2.4 单 步<br />

目 标 MCU 只 执 行 一 个 机 器 周 期 后 便 暂 停 。 用<br />

来 调 试 每 条 指 令 的 溢 出 和 运 行 。<br />

若 MCU 调 用 CALL 指 令 , 单 步 运 行 跳 至 子 程<br />

序 。<br />

若 MCU 在 STOP 模 式 , 单 步 运 行 被 忽 略 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.2.5 单 步 跳 过<br />

使 用 线 性 地 址 模 式 时 , 可 直 接 输 入入 20 位 地 址 。<br />

使 用 堆 栈 地 址 模 式 时 , 输 入入 4 位 空 格 和 16 位 地<br />

址 。 每 个 空 格 大 小 小 于 或 等 于 64KB。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.2.3 继继 续续 运 行<br />

从 当 前 地 址 开 始 仿 真 。<br />

当 前 地 址 的 意 思 是 :<br />

单 步 跳 过 除 子 程 序 调 用 外 , 与 单 步 运 行 几 乎 相<br />

同 。<br />

若 MCU 调 用 CALL 指 令 , 调 试 器 运 行 CALL<br />

并 将 其 子 程 序 作 为 一 条 指 令 。<br />

即 使 子 程 序 是 嵌 套 程 序 , 也 不 产 生 影 响 。<br />

若 单 步 跳 过 满 足 PC- 断 点 条 件 , 仿 真 被 暂 停 。<br />

当 子 程 序 已 被 检 测 , 用 来 检 查 主 程 序 溢 出 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

May, 2011 Ver. 1.01 66


<strong>OCD</strong> <strong>Debugger</strong><br />

7.2.6 自 动 单 步<br />

单 步 运 行 每 100mS 执 行 一 次 。<br />

除 非 开 发 者 暂 停 , 否 则 将 持 续续 执 行 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.2.7 停 止<br />

仿 真 立 即 停 止 , 即 使 MCU 处 于 STOP 模 式 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.2.8 申 请 复 位<br />

硬 件 复 位 信 号 释 放 到 目 标 MCU。<br />

在 MCU 仿 真 过 程 中 不 能 中 止 仿 真 。<br />

目 标 MCU 被 初 始 化 并 等 待 直 到 目 标 进 入入 空 闲<br />

模 式 。<br />

此 功 能 可 在 仿 真 的 任 何 时 候 或 空 闲 时 工 作 。<br />

May, 2011 Ver. 1.01 67


<strong>OCD</strong> <strong>Debugger</strong><br />

7.3 断 点 / 配 置置 菜 单<br />

包 括 PC- 断 点 控 制 , 芯 片 配 置置 和 硬 件 测 试 功 能 。<br />

7.3.1 清 除 所 有 断 点<br />

一 次 性 清 除 所 有 PC- 断 点 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

时 序 图 如 下 所 示<br />

PC<br />

Break<br />

PC<br />

PC+1 PC+2 PC+3<br />

Fetch<br />

signal<br />

7.3.2 断 点 前 ( 后 )<br />

명령<br />

opera<br />

nd<br />

명령<br />

operand<br />

用 来 确 定 PC- 断 点 相 对 于 开 发 者 发 生 的 时 间 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

Break<br />

detect<br />

Handl<br />

e<br />

提 示 一 下 对 话 框 , 并 在 两 个 条 件 之 中 选 择 一<br />

个 。<br />

7.3.3 模 块 控 制<br />

开 发 者 用 来 选 择 确 定 在 空 闲 模 式 下 目 标 MCU<br />

模 块 是 否 工 作 。<br />

目 标 MCU 模 块 在 仿 真 过 程 中 一 般 是 工 作 的 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

若 选 择 断 点 前 执 行 , 当 PC 到 达 PC- 断 点 地 址 时<br />

产 生 PC- 断 点 , 但 是 PC- 断 点 位 置置 不 被 执 行 。<br />

时 序 图 如 下 所 示 .<br />

提 示 一 下 对 话 框 , 并 在 两 个 条 件 之 中 选 择 一<br />

个 。<br />

PC<br />

Break<br />

PC<br />

PC+1 PC+2 PC+3<br />

Fetch<br />

signal<br />

명령 operand 명령 operan<br />

d<br />

Break<br />

detect<br />

Handl<br />

e<br />

用 于 含 有 STOP 模 块 的 中 断 子 程 序 的 定 时 器 周<br />

期 测 量 。<br />

当 选 择 STOP, 所 有 模 块 包 括 PLL, AD 转 换 器<br />

都 将 停 止 。<br />

如 果 选 择 断 点 后 执 行 , 当 PC 到 达 PC- 断 点 地 址<br />

时 产 生 PC- 断 点 , 但 是 PC- 断 点 位 置置 被 执 行 。<br />

May, 2011 Ver. 1.01 68


<strong>OCD</strong> <strong>Debugger</strong><br />

它 控 制 所 有 模 块 , 而 不 是 个 别 的 。 故 请 谨 慎 使<br />

用 。<br />

7.3.4 芯 片 配 置置<br />

用 来 配 置置 目 标 MCU I/O 引 脚 功 能 , 振 荡 方 法 ,<br />

代 码 保 护 , 等 。<br />

各 系 列 芯 片 都 有 不 同 配 置置 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

下 例 为 MC95FG204 芯 片 配 置置 的 对 话 框 。<br />

可 能 与 其 它 系 列 芯 片 有 所 不 同 。<br />

若 配 置置 改 变 , 需 关关 闭 目 标 MCU 电 源 再 重 新 打<br />

开 。<br />

这 是 因 为 , 当 操 作 电 压 升 高 时 , 其 配 置置 将 受 到<br />

影 响 。<br />

7.3.5 H/W 故 障 检 测<br />

用 于 <strong>OCD</strong> 仿 真 器 的 测 试 及 修 复 。<br />

这 里 的 所 有 子 功 能 都 不 针 对 软 件 开 发 者 。<br />

May, 2011 Ver. 1.01 69


<strong>OCD</strong> <strong>Debugger</strong><br />

7.4 视 图 菜 单<br />

视 图 菜 单 支 持 子 窗 口 操 作 。<br />

调 试 器 共共 有 9 个 子 窗 口 。<br />

- MCS51 基 本 寄 存 器<br />

- 代 码 反 汇汇 编编<br />

- 代 码 转 存<br />

- XDATA 转 存<br />

- IRAM 转 存<br />

- SFR 转 存<br />

- 全全 局 观 察<br />

- 局 部 观 察<br />

- 文 本 文 件<br />

7.4.1 工 具 栏<br />

可 显 示 或 隐 藏 工 具 栏 。<br />

工 具 栏 位 于 调 试 器 框 架 靠 上 左 边 的 位 置置 。<br />

工 具 栏 包 括 开 发 者 常 用 的 菜 单 按 钮 。<br />

状 态 条 显 示 简 单 的 帮 助 和 仿 真 时 钟 数 , 等 。.<br />

7.4.5 MCS51 基 本 寄 存 器<br />

打 开 显 示 MCS51 系 列 基 本 寄 存 器 的 窗 口 。.<br />

如 果 已 经 打 开 , 则 将 该 窗 口 置置 顶 。<br />

7.4.2 仿 真 工 具 栏<br />

可 显 示 或 隐 藏 仿 真 工 具 栏 。<br />

仿 真 工 具 栏 位 于 工 具 栏 的 右 侧 。<br />

仿 真 工 具 栏 包 括 开 发 者 在 仿 真 控 制 中 常 用 的 菜<br />

单 按 钮 。<br />

7.4.3 窗 口 打 开 条<br />

可 显 示 或 隐 藏 窗 口 打 开 条 。<br />

窗 口 打 开 条 位 于 仿 真 工 具 栏 的 右 侧 。<br />

窗 口 打 开 条 包 括 用 于 打 开 子 窗 口 的 菜 单 按 钮 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.4.4 状 态 条<br />

可 显 示 或 隐 藏 状 态 条 。<br />

状 态 条 位 于 调 试 器 框 架 的 底 部 。<br />

May, 2011 Ver. 1.01 70


<strong>OCD</strong> <strong>Debugger</strong><br />

7.4.6 代 码 反 汇汇 编编<br />

打 开 显 示 反 汇汇 编编 代 码 存 储 器 的 窗 口 。<br />

如 果 已 经 打 开 , 则 将 该 窗 口 置置 顶 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.4.9 IRAM 存 储 区<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

打 开 显 示 IRAM 存 储 器 的 窗 口 。<br />

IRAM 指 MCS51 系 列 的 内内 部 数 据 存 储 器 。<br />

如 果 已 经 打 开 , 则 将 该 窗 口 置置 顶 。<br />

7.4.7 代 码 转 存<br />

打 开 显 示 代 码 存 储 器 转 存 区 的 窗 口 。<br />

如 果 已 经 打 开 , 则 将 该 窗 口 置置 顶 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.4.10 SFR 转 存<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.4.8 XDATA 转 存<br />

打 开 显 示 SFR 模 块 转 存 区 的 窗 口 。<br />

SFR 指 MCS51 系 列 的 特 殊 功 能 寄 存 器 。<br />

如 果 已 经 打 开 , 则 将 该 窗 口 置置 顶 。<br />

打 开 显 示 XDATA 存 储 器 转 存 区 的 窗 口 。<br />

XDATA 指 MCS51 系 列 的 外 部 数 据 存 储 器 。<br />

如 果 已 经 打 开 , 则 将 该 窗 口 置置 顶 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

May, 2011 Ver. 1.01 71


<strong>OCD</strong> <strong>Debugger</strong><br />

7.4.11 全全 局 观 察<br />

打 开 显 示 全全 局 变 量 的 窗 口 。<br />

如 果 已 经 打 开 , 则 将 该 窗 口 置置 顶 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.4.13 文 本 文 件<br />

打 开 显 示 文 本 文 件 的 窗 口 。<br />

如 果 已 经 打 开 , 则 将 该 窗 口 置置 顶 , 而 不 打 开 新<br />

的 窗 口 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

7.4.12 局 部 观 察<br />

打 开 显 示 局 部 变 量 的 窗 口 。<br />

如 果 已 经 打 开 , 则 将 该 窗 口 置置 顶 。<br />

此 菜 单 项 在 仿 真 过 程 中 不 可 用 。<br />

May, 2011 Ver. 1.01 72


<strong>OCD</strong> <strong>Debugger</strong><br />

7.5 窗 口 菜 单<br />

窗 口 菜 单 用 于 选 择 子 窗 口 的 排 列 顺 序 或 直 接 选 择 子 窗 口 。<br />

7.5.1 层 叠<br />

如 下 图 所 示 排 列 子 窗 口 。<br />

7.5.3 关关 闭<br />

关关 闭 调 试 器 最 顶 层 的 子 窗 口 。<br />

7.5.2 分 栏<br />

如 下 图 所 示 排 列 子 窗 口 。<br />

7.5.4 窗 口 1, 2, 3, 等<br />

调 试 器 通 过 打 开 顺 序 为 子 窗 口 定 义 一 系 列 连 续续<br />

数 据 1, 2, 3,…<br />

开 发 者 可 直 接 选 择 要 打 开 子 窗 口 的 数 字 。<br />

May, 2011 Ver. 1.01 73


<strong>OCD</strong> <strong>Debugger</strong><br />

8. 子 窗 口<br />

8.1 MCS51 基 本 寄 存 器 窗 口<br />

支 持 显 示 和 编编 辑 MCS51 系 列 寄 存 器 。<br />

8.1.1 编编 辑<br />

若 开 发 者 想 更 改 寄 存 器 的 值 , 请 激 活 “Modify”<br />

按 钮 。<br />

当 开 发 者 单 击 “Modify” 按 钮 , 实 际 芯 片 被 修<br />

改 。<br />

以 上 红 线 区 域 是 R0~R7 寄 存 器 。<br />

与 IRAM 有 着 相 同 的 区 域 , 地 址 为 00h~1Fh。<br />

开 发 者 可 以 通 过 更 改 8 位 十 六 进 制 数 对 其 进 行<br />

修 改 。<br />

以 上 区 域 所 示 为 当 前 寄 存 器 组 。<br />

开 发 者 可 改 变 当 前 寄 存 器 组 。<br />

以 上 红 线 区 域 是 PSW ( 程 序 状 态 字 ), 可 以 位 单<br />

位 进 行 修 改 。<br />

May, 2011 Ver. 1.01 74


<strong>OCD</strong> <strong>Debugger</strong><br />

以 上 红 线 区 域 显 示 Acc ( 累 加 器 ), B (B- 寄 存 器 ),<br />

SP ( 堆 栈 指 针 ) 寄 存 器 。<br />

开 发 者 可 以 通 过 更 改 8 位 十 六 进 制 数 对 其 进 行<br />

修 改 。<br />

以 上 红 线 区 域 显 示 DPTR 寄 存 器 。<br />

DPTR 以 十 六 进 制 数 的 形 式 显 示 和 编编 辑 。<br />

如 果 目 标 MCU 具 有 多 于 两 个 的 DPTRs, 则 只 显<br />

示 当 前 所 选 的 寄 存 器 。 若 每 个 DPTRs 具 有 不 同<br />

的 地 址 , 建 议 使 用 SFR 窗 口 。<br />

May, 2011 Ver. 1.01 75


<strong>OCD</strong> <strong>Debugger</strong><br />

8.2 代 码 反 汇汇 编编 窗 口<br />

代 码 反 汇汇 编编 窗 口 显 示 用 于 反 汇汇 编编 格 式 的 代 码 存 储 器 。<br />

所 有 操 作 值 都 使 用 十 六 进 制 数 。<br />

如 果 已 经 下 载 Map/Symbol 文 件 , 则 在 源 信 息 行 将 地 址 框 起 来 。<br />

8.2.1 打 开 源 文 件<br />

如 果 已 将 下 载 Map/Symbol 文 件 , 双 击 源 信 息 行<br />

地 址 区 域 。 则 源 文 件 可 被 打 开 并 移 动 到 地 址<br />

行 。<br />

可 以 直 接 改 变 目 标 MCU 代 码 区 , 但 是 不 能 改<br />

变 原 程 序 文 件 。<br />

8.2.2 在 线 汇汇 编编<br />

支 持 在 线 汇汇 编编 功 能 。<br />

在 线 汇汇 编编 意 思 是 开 发 者 可 以 使 用 汇汇 编编 语 言 改 变<br />

代 码 区 。<br />

移 动 鼠 标 光 标 到 准准 备 修 改 得 行 。 单 击 鼠 标 右<br />

键 。<br />

改 变 该 行 的 指 令 和 操 作 数 , 等 。 使 用 十 六 进 制<br />

数 。<br />

May, 2011 Ver. 1.01 76


<strong>OCD</strong> <strong>Debugger</strong><br />

8.2.3 PC 断 点 锁 定<br />

蓝 线 是 当 前 PC。<br />

PC 是 目 标 MCU 内内 部 程 序 计 数 器 。<br />

用 来 设 置置 或 清 除 PC- 断 点 。<br />

在 准准 备 设 置置 或 清 除 PC- 断 点 的 地 方 双 击 鼠 标 左<br />

键 。<br />

PC- 断 点 数 根 据 芯 片 的 系 列 而 不 同 , 一 般 备 有 8<br />

个 断 点 。<br />

红 线 是 PC- 断 点 行 。<br />

May, 2011 Ver. 1.01 77


<strong>OCD</strong> <strong>Debugger</strong><br />

8.3 代 码 转 存 窗 口<br />

代 码 转 存 窗 口 用 十 六 进 制 数 显 示 各 8 位 数 据 。<br />

且 支 持 数 据 编编 辑 。<br />

窗 口 的 上 部 显 示 当 前 指 针 位 置置 的 地 址 和 当 前 页 的 校 验 和 。<br />

当 前 页 数 显 示 在 窗 口 中 央 。<br />

每 页 有 256bytes 且 地 址 为 xx00~xxFFh (xx 是 页 数 )。<br />

8.3.1 编 辑<br />

除 非 正 在 进 行 仿 真 , 否 则 开 发 者 在 可 随 时 改 变<br />

数 据 值 。<br />

8.3.2 内内 存 库<br />

MCS51 系 列 有 16 位 代 码 地 址 且 最 大 可 提 供<br />

64KB 空 间 。<br />

为 克克 服 此 限 制 , 可 使 用 内内 存 库 地 址 。<br />

ABOV 的 MCS51 系 列 只 能 使 用 线 性 地 址 而 不<br />

能 使 用 内内 存 库 地 址 。<br />

总 之 , 显 示 用 户 页 单 位 在 64KB 范 围 之 内内 。<br />

内内 存 库 只 是 20 位 地 址 的 前 4 位 地 址 。<br />

编编 辑 方 法 十 分 简 单 。 只 需 移 动 光 标 到 需 要 编编 辑<br />

的 位 置置 并 输 入入 十 六 进 制 数 。<br />

字 符 颜 色 会 由 黑 变 红 。<br />

如 要 取 消 输 入入 , 按 ESC 键 。<br />

确 认 修 改 按 Enter 键 , 且 字 符 颜 色 变 为 黑 色 。<br />

May, 2011 Ver. 1.01 78


<strong>OCD</strong> <strong>Debugger</strong><br />

8.3.3 跳 至<br />

“Goto” 用 于 改 变 16 位 地 址 范 围 。<br />

因 此 , 它 的 范 围 是 0000~FFFFh。<br />

8.3.5 保 存<br />

以 文 件 形 式 保 存 代 码 区 域 。<br />

用 户 保 存 自 己 的 用 户 模 式 为 文 件 时 使 用 。<br />

8.3.4 加 载<br />

用 于 加 载 模 式 数 据 到 代 码 区 域 。<br />

8.3.6 填 充充<br />

以 相 同 的 数 据 填 充充 数 据 区 。.<br />

当 然 , 开 发 者 可 以 使 用 文 件 菜 单 的 “Load hexa”<br />

下 载 。 但 是 这 里 用 的 加 载 指 定 专 门 的 了 数 据 模<br />

式 。 不 会 清 除 全全 部 的 代 码 区 域 。<br />

May, 2011 Ver. 1.01 79


<strong>OCD</strong> <strong>Debugger</strong><br />

8.4 XDATA 转 存 窗 口<br />

XDATA 转 存 窗 口 用 十 六 进 制 数 显 示 各 8 位 数 据 。.<br />

且 支 持 数 据 编编 辑 。<br />

窗 口 的 上 部 显 示 当 前 指 针 位 置置 的 地 址 和 当 前 页 的 校 验 和 。<br />

当 前 页 数 显 示 在 窗 口 中 央 。<br />

每 页 有 256bytes 且 地 址 为 xx00~xxFFh (xx 是 页 数 )。<br />

8.4.1 编编 辑<br />

除 非 正 在 进 行 仿 真 , 否 则 开 发 者 在 可 随 时 改 变<br />

数 据 值 。<br />

8.4.2 内内 存 库<br />

MCS51 系 列 有 16 位 XDATA 地 址 且 最 大 可 提<br />

供 64KB 空 间 。<br />

为 克克 服 此 限 制 , 可 使 用 内内 存 库 地 址 。<br />

ABOV 的 MCS51 系 列 只 能 使 用 线 性 地 址 而 不<br />

能 使 用 内内 存 库 地 址 。<br />

总 之 , 显 示 用 户 页 单 位 在 64KB 范 围 之 内内 。<br />

内内 存 库 只 是 20 位 地 址 的 前 4 位 地 址 。<br />

编编 辑 方 法 十 分 简 单 。 只 需 移 动 光 标 到 需 要 编编 辑<br />

的 位 置置 并 输 入入 十 六 进 制 数 。<br />

字 符 颜 色 会 由 黑 变 红 。<br />

如 要 取 消 输 入入 , 按 ESC 键 。<br />

确 认 修 改 按 Enter 键 , 且 字 符 颜 色 变 为 黑 色 。<br />

May, 2011 Ver. 1.01 80


<strong>OCD</strong> <strong>Debugger</strong><br />

8.4.3 跳 转<br />

“Goto” 用 于 改 变 16 位 地 址 范 围 。<br />

因 此 , 它 的 范 围 是 0000~FFFFh。<br />

8.4.5 保 存<br />

以 文 件 形 式 保 存 XDATA 区 。<br />

用 户 保 存 自 己 的 用 户 模 式 为 文 件 时 使 用 。<br />

8.4.4 加 载<br />

用 于 加 载 模 式 数 据 到 代 码 区 域 。<br />

8.4.6 填 充充<br />

以 相 同 的 数 据 填 充充 XDATA 区 。<br />

只 用 来 下 载 用 户 特 殊 格 式 数 据 。 不 能 全全 部 清 除<br />

XDATA 区 域 。<br />

May, 2011 Ver. 1.01 81


<strong>OCD</strong> <strong>Debugger</strong><br />

8.5 IRAM 转 存 窗 口<br />

IRAM 转 存 窗 口 用 十 六 进 制 数 显 示 各 8 位 数 据 。<br />

且 支 持 数 据 编编 辑 。<br />

窗 口 的 上 部 显 示 当 前 指 针 位 置置 的 地 址 和 当 前 页 的 校 验 和 。<br />

显 示 大 写写 “IR” 在 窗 口 中 央 。<br />

IRAM 00~7Fh 是 直 接 区 域 且 字 符 颜 色 为 黑 色 。<br />

IRAM 80~FFh 是 间 接 区 域 且 字 符 颜 色 为 蓝 绿绿 色 。<br />

关关 于 直 接 / 间 接 区 请 参 考 相 关关 芯 片 手 册 说 明 。<br />

8.5.1 编编 辑<br />

除 非 正 在 进 行 仿 真 , 否 则 开 发 者 在 可 随 时 改 变<br />

数 据 值 。<br />

字 符 颜 色 会 由 黑 变 红 。<br />

如 要 取 消 输 入入 , 按 ESC 键 。<br />

确 认 修 改 按 Enter 键 , 且 字 符 颜 色 变 为 黑 色 。<br />

8.5.2 保 存<br />

以 文 件 形 式 保 存 IRAM 区 。<br />

编编 辑 方 法 十 分 简 单 。 只 需 移 动 光 标 到 需 要 编编 辑<br />

的 位 置置 并 输 入入 十 六 进 制 数 。<br />

May, 2011 Ver. 1.01 82


<strong>OCD</strong> <strong>Debugger</strong><br />

8.6 SFR 转 存 窗 口<br />

SFR ( 特 殊 功 能 寄 存 器 ) 转 存 窗 口 用 十 六 进 制 数 显 示 各 8 位 数 据 。<br />

且 支 持 数 据 编编 辑 。<br />

窗 口 的 上 部 显 示 当 前 指 针 位 置置 的 地 址 和 当 前 页 的 校 验 和 。<br />

SFR 80~FFh 是 IRAM 的 直 接 区 。<br />

请 参 考 相 关关 芯 片 的 SFR, SFR 根 据 芯 片 系 列 不 同 有 所 区 别 。<br />

8.6.1 编编 辑<br />

除 非 正 在 进 行 仿 真 , 否 则 开 发 者 在 可 随 时 改 变<br />

数 据 值 。<br />

8.6.2 更 新<br />

SFR 区 包 括 静 态 寄 存 器 如 堆 栈 指 针 , 累 加 器 ,<br />

等 。 但 多 数 SFRs 是 各 种 动 态 寄 存 器 如 定 时 器 ,<br />

I/O, 等 。<br />

“Refresh” 按 钮 可 更 新 显 示 数 据 。<br />

编编 辑 方 法 十 分 简 单 。 只 需 移 动 光 标 到 需 要 编编 辑<br />

的 位 置置 并 输 入入 十 六 进 制 数 。<br />

字 符 颜 色 会 由 黑 变 红 。<br />

如 要 取 消 输 入入 , 按 ESC 键 。<br />

确 认 修 改 按 Enter 键 , 且 字 符 颜 色 变 为 黑 色 。<br />

8.6.3 保 存<br />

以 文 件 形 式 保 存 SFR 区 。<br />

May, 2011 Ver. 1.01 83


<strong>OCD</strong> <strong>Debugger</strong><br />

8.7 全全 局 观 察 窗 口<br />

全全 局 观 察 窗 口 显 示 并 支 持 修 改 基 于 源 程 序 的 C 语 言 的 全全 局 变 量 。<br />

每 个 变 量 用 代 码 定 义 , XDATA, IRAM, SFR, 等 。 所 以 开 发 者 可 以 确 定 它 的 位 置置 并 对 它 直 接 进 行 编编 辑 。 查<br />

找 变 量 过 于 麻 烦 。<br />

可 在 全全 局 观 察 窗 口 的 帮 助 下 完 成 。<br />

Map/Symbol 文 件 需 要 用 到 此 窗 口 。<br />

8.7.1 添 加 符 号<br />

增 加 全全 局 变 量 到 全全 局 观 察 窗 口 显 示 列 表 。<br />

8.7.3 编编 辑<br />

移 动 鼠 标 光 标 到 准准 备 修 改 的 行 。<br />

双 击 鼠 标 左 键 。<br />

提 示 编编 辑 对 话 框 。<br />

修 改 数 据 并 单 击 “Modify” 按 钮 。<br />

8.7.2 移 除 符 号<br />

从 全全 局 观 察 窗 口 移 除 全全 局 变 量 。<br />

May, 2011 Ver. 1.01 84


<strong>OCD</strong> <strong>Debugger</strong><br />

8.8 局 部 观 察 窗 口<br />

局 部 观 察 窗 口 显 示 并 支 持 修 改 基 于 源 程 序 的 C 语 言 的 局 部 变 量 。<br />

每 个 变 量 用 代 码 定 义 , XDATA, IRAM, SFR, 等 。 所 以 开 发 者 可 以 确 定 它 的 位 置置 并 对 它 直 接 进 行 编编 辑 。 查<br />

找 变 量 过 于 麻 烦 。<br />

可 在 全全 局 观 察 窗 口 的 帮 助 下 完 成 。<br />

Map/Symbol 文 件 需 要 用 到 此 窗 口 。<br />

8.8.1 编编 辑<br />

移 动 鼠 标 光 标 到 准准 备 修 改 的 行 。<br />

双 击 鼠 标 左 键 。<br />

提 示 编编 辑 对 话 框 。<br />

修 改 数 据 并 单 击 “Modify” 按 钮 。<br />

8.8.2 添 加 或 移 除 符 号<br />

如 果 以 下 程 序 改 变 , 则 局 部 变 量 发 生 改 变 。<br />

局 部 变 量 是 动 态 的 。 它 依 存 于 每 个 程 序 模 块 。<br />

调 试 器 检 查 当 前 的 C 模 块 并 自 动 找 出 局 部 变<br />

量 。 因 此 开 发 者 无 需 对 其 进 行 增 加 或 删 除 操<br />

作 。<br />

以 下 屏 幕 捕 捉 显 示 C 源 程 序 模 块 。 当 前 程 序 计<br />

数 器 位 于 功 能 模 块 “delay(UINT uCnt)”, 局 部 变<br />

量 窗 口 显 示 上 面 模 块 的 名 称 及 变 量 。<br />

May, 2011 Ver. 1.01 85


<strong>OCD</strong> <strong>Debugger</strong><br />

8.9 文 本 文 件 窗 口<br />

显 示 文 本 文 件 , 但 不 支 持 文 件 编编 辑 。<br />

如 果 已 经 下 载 Map/Symbol 文 件 , 源 程 序 文 件 行 数 据 区 显 示 真 实 硬 件 地 址<br />

例 ) 如 果 没没 有 下 载 Map/Symbol 文 件 , 或 文 件 不 包 括 符 号 信 息 , 只 显 示 当 前 行 数 据 。<br />

例 ) 如 果 下 载 了 Map/Symbol 文 件 , 且 文 件 包 括 符 号 信 息 。<br />

显 示 行 数 据 和 地 址 。<br />

May, 2011 Ver. 1.01 86


<strong>OCD</strong> <strong>Debugger</strong><br />

8.9.1 行 跳 转<br />

改 变 当 前 显 示 行 。<br />

不 需 要 Map/Symbol 信 息 。 只 要 求求 提 供 一 个 行 数<br />

据 。<br />

8.9.2 反 汇汇 编编 窗 口 链 接<br />

如 果 已 经 下 载 Map/Symbol 文 件 且 文 本 文 件 具 有<br />

其 信 息 , 则 文 本 文 件 显 示 地 址 而 不 是 行 数 据 。<br />

在 地 址 区 双 击 鼠 标 左 键 , 则 反 汇汇 编编 窗 口 会 打 开<br />

并 移 动 到 该 地 址 。<br />

PC- 断 点 行 颜 色 为 红 色 。<br />

当 前 程 序 计 数 器 地 址 行 颜 色 为 蓝 色 。<br />

8.9.3 Break toggle<br />

如 果 已 将 下 载 Map/Symbol 文 件 且 文 本 文 件 具 有<br />

其 信 息 , 则 文 本 文 件 显 示 地 址 而 不 是 行 数 据 。<br />

双 击 鼠 标 左 键 在 文 本 区 , 则 可 设 置置 PC- 断 点 。<br />

May, 2011 Ver. 1.01 87


<strong>OCD</strong> <strong>Debugger</strong><br />

<strong>OCD</strong> <strong>Debugger</strong><br />

ABOV 반도체 <strong>OCD</strong> 내장 8bit MCU 용 debugger<br />

9. 개요<br />

9.1 서론<br />

<strong>OCD</strong> (On Chip Debug) <strong>Debugger</strong> program 은 ABOV Semi<strong>co</strong>nductor 의 <strong>OCD</strong> 를 내장한 8bit MCU 의<br />

사용자용 application program 을 개발하기 위한 software tool 입니다.<br />

<strong>OCD</strong> <strong>Debugger</strong> program 으로 지원 가능한 device 계열은 ABOV 반도체가 제작하는 8bit MCU<br />

(Micro Controller Unit)으로, Mentor8051 계열과 DCD8051 계열의 제품입니다.<br />

<strong>OCD</strong> <strong>Debugger</strong> 를 사용하려면 당사에숷서 제공하는 <strong>OCD</strong> interface hardware (dongle)가 필요합니다.<br />

<strong>OCD</strong> 는 target MCU 를 실송제 사용할 board 에숷 장착한 상태에숷서 MCU 의 2pin 을 이용하여 사용자<br />

<strong>co</strong>de 의 download 와 실송행, 내부 <strong>co</strong>de memory, data memory 를 포함하여, SFR(Special Function<br />

Register)의 내용을 읽거나 변경하기 위한 일체의 debugging 기능을 의미합니다.<br />

<strong>OCD</strong> 를 이용한 debugging 은 고가의 emulator 가 없숰어숦도 target MCU 의 기능을 최대 speed 에숷서도<br />

무리 없숰이 검증해볼 수셲 있으며, 그 자체만으로도 ISP(In System Programming) 기능을 지원합니다.<br />

<strong>OCD</strong> <strong>Debugger</strong> 는 Microsoft 사의 Windows NT, 2000, XP, Vista, Windows-7 (32bit & 64bit)<br />

환경에숷서 동작됩니다.<br />

단, 64bit 환경에숷서는 최초에숷 S/W 와 H/W 의 install 과정이 32bit 보다 까다롭지만, 설치 이 후의<br />

사용과 관련해서는 아무런 차이가 없숰습솚니다.<br />

그리고, <strong>OCD</strong> debugging 중에숷는 통신솟에숷 필요한 2pin 의 I/O 를 개발자용으로 사용할 수셲 없숰다는 것<br />

입니다. 해당 pin 의 동작은 debugger 와 별도로 실송장 test 를 통하여 진행하여야 합니다.<br />

May, 2011 Ver. 1.01 88


<strong>OCD</strong> <strong>Debugger</strong><br />

예) <strong>OCD</strong> debugger 의 screen capture<br />

May, 2011 Ver. 1.01 89


<strong>OCD</strong> <strong>Debugger</strong><br />

9.2 Features<br />

ABOV 반도체의 <strong>OCD</strong> 를 내장한 8bit MCU<br />

Mentor8051 과 DCD8051 series 를 지원<br />

HEX file 과 map/symbol file 을 함께 load<br />

Symbol 을 사용한 debugging 기능<br />

Code memory 는 target MCU 가 내장한<br />

size 를 full 로 이용 가능<br />

단일 ISP(In System Programming) tool<br />

로도 이용 가능함<br />

Code 를 disassemble 하여 표시<br />

Line assemble 기능 지원<br />

PC break 설정 가능<br />

RAM, SFR, register 표시 및 수정<br />

Code, XDATA 영역을 dump 형식으로 표시,<br />

수정 지원<br />

Device 자동 인식 기능 : device 변경에<br />

따른<br />

설정 작업 불필요<br />

동작 주파수<br />

동작 전압<br />

– Target device 의 동작 전압숈 범위에숷서 무리<br />

없숰이 동작함<br />

Clock source<br />

– Xin, internal/external RC 등에숷 무관<br />

Emulation clock 표시<br />

– 수셲행된 machine cycle 을 표시<br />

Emulation 과 debugging 에 필요한 모든<br />

기능 지원<br />

– Free run, step run, auto step run 등<br />

개발 환경을 자동으로 저장 및 로드<br />

Operating system<br />

– Microsoft Windows NT<br />

– Microsoft Windows 2000<br />

– Microsoft Windows XP (32bit, 64bit)<br />

– Microsoft Windows Vista (32bit, 64bit)<br />

– Microsoft Windows7 (32bit, 64bit)<br />

Software 관련 문의처<br />

– Abov 반도체 MDS<br />

– Email address : seungduk.ha@<strong>abov</strong>.<strong>co</strong>.<strong>kr</strong><br />

– Target device 의 최대 주파수셲에숷서 무리<br />

없숰이 동작함<br />

May, 2011 Ver. 1.01 90


<strong>OCD</strong> <strong>Debugger</strong><br />

10. Installation<br />

Install program 은 당사의 website (http://www.<strong>abov</strong>.<strong>co</strong>.<strong>kr</strong>/)을 통하여 download 받으실송 수셲 있습솚니다.<br />

새로운 MCU 제품이 추가되거나, 기능이 upgrade 되는 경우, homepage 에숷 지셏적으로 update 가<br />

이루어숦 질 예정이며, 가급적 최신솟 version 을 유지하시는 것이 좋습솚니다.<br />

CD 와 같은 저장 매체로는 공급 하지 않숂습솚니다.<br />

Setup program 을 이용하여 application software 를 먼저 설치하여야 합니다.<br />

인솞하기 위하여 필요한 driver file 이 필요하기 때문입니다.<br />

<strong>OCD</strong> device 를<br />

우선, 사용자의 OS 환경이 32bit 인지 64bit 인지 확인하신솟 다음, 그에숷 맞는 setup program 을<br />

download 하여 설치하셔셁야 합니다.<br />

사용자 OS 환경을 확인하는 방법은 OS 의 제어숦판 (<strong>co</strong>ntrol panel)을 연 다음, 시스솔템 (system) 항목을<br />

선택하면 표시가 나옵니다.<br />

예) XP 32bit 의 경우 예) XP 64bit 의 경우<br />

May, 2011 Ver. 1.01 91


<strong>OCD</strong> <strong>Debugger</strong><br />

<strong>OCD</strong> dongle 은 아래와 같이 구성되어숦 있습솚니다.<br />

좌측으로부터, PC 에숷 연결하기 위한 USB cable, 사용자 target board 에숷 연결하기 위한 flex cable,<br />

<strong>OCD</strong> hardware dongle 입니다.<br />

Flex cable 의 pin 할당 위치는 아래와 같습솚니다.<br />

5 번 pin 은 <strong>OCD</strong> device series 에숷 따른 option 기능입니다.<br />

설치 시 주의 사항<br />

Install program 을 사용하여 <strong>OCD</strong> software 를 먼저 설치하신솟 다음에숷 <strong>OCD</strong> hardware<br />

dongle 을 연결하시기 바랍니다.<br />

Dongle 의 구동에숷 필요한 driver program 과 응용 program 이 먼저 설치되어숦 있어숦야 합니다.<br />

사용 시 주의 사항<br />

USB cable 은 PC 연결 시 hot plug(전원이 켜진 상태에숷서 연결 하는 것)가 가능하지만, flex<br />

cable 쪽은 hot plug 를 지원하지 않숂습솚니다.<br />

따라서, 사용자 target board 의 전원이 꺼져 있는 상태에숷서 연결하셔셁야 하며, 그렇지 않숂을<br />

경우 <strong>OCD</strong> hardware dongle 이 파손셑될 수셲 있습솚니다.<br />

May, 2011 Ver. 1.01 92


<strong>OCD</strong> <strong>Debugger</strong><br />

May, 2011 Ver. 1.01 93


<strong>OCD</strong> <strong>Debugger</strong><br />

10.1 Software install (32bit)<br />

앞숍에숷도 언숨급하였지만, install program 을 이용하여 application software 를 먼저 설치하여야 합니다.<br />

<strong>OCD</strong> device 를 인솞하기 위하여 필요한 driver file 이 필요하기 때문입니다.<br />

Software 의 설치가 끝날 때까지 <strong>OCD</strong> hardware 는 PC 에숷 끼우지 말아 주십솤시오.<br />

10.1.1 Sequence<br />

Setup program 을 실송행시키면 아래와 같은<br />

dialog box 가 나타납니다.<br />

사용자 이름과 회사 이름을 묻는 dialog<br />

box 가 나타나면 공란을 채우고, “Next”<br />

button 을 click 합니다.<br />

“Next” button 을 click 합니다.<br />

License agreement dialog box 가 나타나면<br />

Install type 을 묻는 dialog box 에숷서는<br />

“Complete”를 선택하고, “Next” button 을<br />

click 합니다.<br />

“I accept the items of the license-<br />

agreement”를 선택하고, “Next” button<br />

click 합니다.<br />

을<br />

설치를 시작한다는 dialog box 에숷서는 “Install”<br />

button 을 click 합니다.<br />

May, 2011 Ver. 1.01 94


<strong>OCD</strong> <strong>Debugger</strong><br />

설치의 진행 상태를 보여주는 dialog box 가<br />

나타나면, 설치가 끝날 때까지 기다립니다.<br />

10.1.2 Copied directory<br />

사용자가 변경하지 않숂는 한, Setup program 은<br />

“C:\Program Files” folder 의 아래에숷<br />

\ABOV Semi<strong>co</strong>nductor\<strong>OCD</strong>_debugger”<br />

Folder 를 생성하고 program 을 설치합니다.<br />

Application program 의 path 는 <strong>OCD</strong><br />

hardware 의 <strong>OCD</strong> driver 설치 시에숷 이<br />

directory path 를 사용 합니다.<br />

설치가 완료된 후에숷 아래와 같은 dialog<br />

box 가 나타나면 “Finish” button 을 click<br />

합니다.<br />

May, 2011 Ver. 1.01 95


<strong>OCD</strong> <strong>Debugger</strong><br />

10.2 <strong>OCD</strong> driver install (32bit)<br />

<strong>OCD</strong> hardware 를 PC 에숷 연결하여 동작 시키려면 해당 device 에숷 대한 system file 을 설치하여야<br />

제대로 동작합니다.<br />

<strong>OCD</strong> driver program 은 위의 application software 를 설치할 때 복사되므로, 반드시 위의 setup 을<br />

먼저 실송행하시기 바랍니다.<br />

Driver 설치 시에숷 나타나는 dialog box 는 각 국가별 OS 마다 다른 문자로 표시됩니다. 여기에숷서는<br />

한글 OS 에숷서의 설치 화면을 예로 사용하였습솚니다. 다른 문자를 사용한 OS 에숷서도 비슷솛한 dialog<br />

box 가 사용될 것이며, 설치에숷 무리가 없숰을 것입니다.<br />

Windows-XP 또는 그 이하 version 의 OS 에숷서는 device 를 설치한 USB port 에숷서만 장치가 인솞되고,<br />

나중에숷 USB port 를 바꾸어숦 연결하는 경우에숷는 해당 device 의 driver 를 다시 설치 하여야 하므로<br />

번거롭습솚니다. 이 경우에숷는 아래의 설치 sequence 를 다시 수셲행하여야 합니다.<br />

Vista 이후의 경우에숷는 위와 같은 문제가 없숰습솚니다.<br />

10.2.1 Sequence<br />

<strong>OCD</strong> hardware dongle 을 PC 의 USB port 에숷<br />

연결 합니다.<br />

Device 의 설치에숷 필요한 INF file 의 위치를<br />

묻는 dialog box 가 나타납니다.<br />

Dialog box 의 path 입력란에숷 앞숍서 설치했던<br />

software 의 director 를 연결합니다.<br />

PC 가 device 의 연결을 인솞한 후 아래와 같은<br />

dialog box 를 보여줍니다.<br />

아래와 같이 선택한 다음 “Next” button 을<br />

click 합니다.<br />

Device driver 의 설치를 계셏할 것인 지 아닌<br />

지를 묻는 dialog box 에숷서는 계셏(Continue)<br />

button 을 click 합니다.<br />

다음에숷 나타나는 dialog box 도 아래와 같이<br />

선택한 다음 “Next” button 을 click 합니다.<br />

OS 에숷 따라서 위의 INF 설치 과정이 한 차례<br />

더 필요한 경우가 있습솚니다. 동일하게<br />

처리하시면 됩니다.<br />

May, 2011 Ver. 1.01 96


<strong>OCD</strong> <strong>Debugger</strong><br />

10.2.2 설치 확인 방법<br />

이 과정은 하지 않숂으셔셁도 됩니다.<br />

OS 의 제어숦판을 실송행하신솟 다음, 장치관리자를<br />

선택하고, USB 를 확인하면 “ABOV <strong>OCD</strong>”라는<br />

device 가 연결되어숦 있을 것입니다.<br />

May, 2011 Ver. 1.01 97


<strong>OCD</strong> <strong>Debugger</strong><br />

10.3 Software install (64bit)<br />

앞숍에숷도 언숨급하였지만, install program 을 이용하여 application software 를 먼저 설치하여야 합니다.<br />

<strong>OCD</strong> device 를 인솞하기 위하여 필요한 driver file 이 필요하기 때문입니다.<br />

Software 의 설치가 끝날 때까지 <strong>OCD</strong> hardware 는 PC 에숷 끼우지 말아 주십솤시오.<br />

Install flow 자체는 32bit OS 일 때와 별 차이가 없숰습솚니다만, 간혹 install program 을 수셲행하면 아래와<br />

같은 경고 message 가 표시되기도 합니다.<br />

“Yes” button 을 click 하고 다음 단계로 진행 합니다.<br />

10.3.1 Sequence<br />

Setup program 을 실송행시키면 아래와 같은<br />

dialog box 가 나타납니다.<br />

“Next” button 을 click 합니다.<br />

agreement”를 선택하고, “Next” button<br />

click 합니다.<br />

을<br />

사용자 이름과 회사 이름을 묻는 dialog<br />

box 가 나타나면 공란을 채우고, “Next”<br />

button 을 click 합니다.<br />

License agreement dialog box 가 나타나면<br />

“I accept the items of the license-<br />

May, 2011 Ver. 1.01 98


<strong>OCD</strong> <strong>Debugger</strong><br />

Install type 을 묻는 dialog box 에숷서는<br />

“Complete”를 선택하고, “Next” button 을<br />

click 합니다.<br />

설치가 완료된 후에숷 아래와 같은 dialog<br />

box 가 나타나면 “Finish” button 을 click<br />

합니다.<br />

설치를 시작한다는 dialog box 에숷서는 “Install”<br />

button 을 click 합니다.<br />

10.3.2 Copied directory<br />

사용자가 변경하지 않숂는 한, Setup program 은<br />

“C:\Program Files” folder 의 아래에숷<br />

\ABOV Semi<strong>co</strong>nductor\<strong>OCD</strong>_debugger”<br />

Folder 를 생성하고 program 을 설치합니다.<br />

Application program 의 path 는 <strong>OCD</strong><br />

hardware 의 <strong>OCD</strong> driver 설치 시에숷 이<br />

directory path 를 사용 합니다.<br />

설치의 진행 상태를 보여주는 dialog box 가<br />

나타나면, 설치가 끝날 때까지 기다립니다.<br />

May, 2011 Ver. 1.01 99


<strong>OCD</strong> <strong>Debugger</strong><br />

10.4 <strong>OCD</strong> driver install (64bit)<br />

Microsoft 사의 64bit OS 에숷서는 driver 설치와 사용에숷 대하여, 기존 32bit OS 보다 훨씬쇸 엄숮격하게<br />

관리하고 있습솚니다. 이 는, 잘못된 driver file 로 인하여 system 의 안숀정성이 훼손셑 되는 것을 막고자<br />

하는 것입니다만, 사용자 입장에숷서는 driver 설치가 32bit OS 일 때 보다 까다롭게 되었숲다는 것을<br />

의미 합니다.<br />

<strong>OCD</strong> hardware 를 PC 에숷 연결하여 동작 시키려면 해당 device 에숷 대한 system file 을 설치하여야<br />

제대로 동작합니다.<br />

<strong>OCD</strong> driver program 은 위의 application software 를 설치할 때 복사되므로, 반드시 위의 setup 을<br />

먼저 실송행하시기 바랍니다.<br />

Driver 설치 시에숷 나타나는 dialog box 는 각 국가별 OS 마다 다른 문자로 표시됩니다. 여기에숷서는<br />

한글 OS 에숷서의 설치 화면을 예로 사용하였습솚니다. 다른 문자를 사용한 OS 에숷서도 비슷솛한 dialog<br />

box 가 사용될 것이며, 설치에숷 무리가 없숰을 것입니다.<br />

Windows-XP 또는 그 이하 version 의 OS 에숷서는 device 를 설치한 USB port 에숷서만 장치가 인솞되고,<br />

나중에숷 USB port 를 바꾸어숦 연결하는 경우에숷는 해당 device 의 driver 를 다시 설치 하여야 하므로<br />

번거롭습솚니다. 이 경우에숷는 아래의 설치 sequence 를 다시 수셲행하여야 합니다.<br />

Vista 이후의 경우에숷는 위와 같은 문제가 없숰습솚니다.<br />

10.4.1 Sequence<br />

<strong>OCD</strong> hardware 를 PC 의 USB port 에숷 연결합니다.<br />

32bit OS 의 경우에숷는 PC 가 device 의 연결을 인솞한 후 아래와 같은 dialog box 를 보여주었숲지만,<br />

64bit OS 의 경우에숷는 OS 에숷 등록되어숦 OS 가 이미 알숃고 있는 제품 외에숷는 설치를 도와주지 않숂습솚니다.<br />

설치가 번거롭지만, 수셲동 설치 하여야 합니다.<br />

May, 2011 Ver. 1.01 100


<strong>OCD</strong> <strong>Debugger</strong><br />

<strong>OCD</strong> hardware dongle 을 연결하기 전에숷, 장치 관리자 항목을 열어숦 둡니다.<br />

여는 방법은 다음과 같습솚니다.<br />

- 시작(Start menu)에숷서 제어숦판 (Control panel)을 선택합니다.<br />

- 제어숦판의 여러 항목 중에숷 시스솔템 (system) 항목을 선택합니다.<br />

I<strong>co</strong>n 의 형태는 OS 에숷 따라 다를 수셲 있습솚니다.<br />

- 아래와 같은 window 가 open 됩니다.<br />

아래 그림은 Windows-7 의 경우 입니다.<br />

May, 2011 Ver. 1.01 101


<strong>OCD</strong> <strong>Debugger</strong><br />

- 왼쪽 위에숷 있는 장치 관리자 (Device manager)를 선택 합니다.<br />

- 아래와 같이 장치와 관련된 내용을 담은 window 가 열리며, 현재 PC 에숷 연결되어숦 있는 각종<br />

hardware 의 정보를 표시하여 줍니다.<br />

- 장치 list 에숷서 USB (Universal Serial Bus) <strong>co</strong>ntroller 항목을 선택하면 아래와 같이 내용이<br />

펼쳐 집니다.<br />

May, 2011 Ver. 1.01 102


<strong>OCD</strong> <strong>Debugger</strong><br />

- <strong>OCD</strong> hard ware dongle 을 연결합니다.<br />

USB cable 은 <strong>OCD</strong> dongle 에숷 함께 들어숦 있습솚니다.<br />

- <strong>OCD</strong> hardware dongle 을 연결하면, 아래와 같이 장치 관리자 화면에숷 새로운 hardware 가<br />

연결되었숲음을 보여줍니다.<br />

May, 2011 Ver. 1.01 103


<strong>OCD</strong> <strong>Debugger</strong><br />

- 연결된 장치는 USB 항목에숷 바로 잡히지 않숂고, 기타 장치 (Other devices)에숷 Unknown<br />

device 로 표시됩니다.<br />

이 는, 아직 driver file 이 설치되지 않숂은 상태이기 때문입니다.<br />

- Unknown device 항목에숷 mouse 의 cursor 를 이동한 다음, 오른쪽 button 을 click 합니다.<br />

아래와 같은 menu 가 뜨면, Update Driver Software 항목을 선택합니다.<br />

May, 2011 Ver. 1.01 104


<strong>OCD</strong> <strong>Debugger</strong><br />

- 아래와 같은 dialog box 가 열립니다.<br />

Browse my <strong>co</strong>mputer for driver software 항목을 선택합니다.<br />

- 화면이 바뀌고, driver file 이 있는 folder 를 묻습솚니다.<br />

Browse button 을 click 합니다.<br />

- <strong>OCD</strong> program 이 설치된 folder 를 선택합니다.<br />

May, 2011 Ver. 1.01 105


<strong>OCD</strong> <strong>Debugger</strong><br />

- Next button 을 click 하고 다음 단계로 넘어숦갑니다.<br />

- Driver 의 설치가 끝나면 아래와 같은 화면이 나타납니다.<br />

- Unknown device 에숷서 USB 항목의 ABOV <strong>OCD</strong> 로 인솞되었숲음이 표시됩니다.<br />

May, 2011 Ver. 1.01 106


<strong>OCD</strong> <strong>Debugger</strong><br />

11. Menu function<br />

11.1 File menu<br />

11.1.1 Load hexa<br />

Folder 에숷 있는 hexa file 을 target device 의<br />

<strong>co</strong>de 영역으로 load 합니다. 이 동작은 ISP (In<br />

System Programming)에숷 해당됩니다.<br />

Browse 를 선택하면 위와 같은 dialog box 가<br />

뜹니다. 여기에숷서 원하는 file 을 선택합니다.<br />

이 menu 를 수셲행하면 위와 같은 object file<br />

dialog box 가 나타납니다.<br />

이 dialog 는 초기 MCS51 계열 CPU 의<br />

memory 확장을 bank 방솞으로 하던 것을<br />

감안숀하여 만들어숦진 것입니다.<br />

Do VERIFICATION after download 항목을<br />

선택 하였을 경우, debugger 는 file download<br />

후에숷 <strong>co</strong>de 영역이 제대로 써솻 져있는 지<br />

확인합니다.<br />

만약, PC break 가 설정되어숦 있는 경우에숷는 file<br />

download 후에숷 개발자에숷게 이 것을 지울 것인<br />

지 묻습솚니다.<br />

Linear 하게 memory address 를 확장하는<br />

자사의 M8051 이나 DCD8051 에숷서는<br />

Bank0 만 사용합니다.<br />

Map/Symbol file 이 있으면 자동으로<br />

감지하여 함께 load 합니다.<br />

May, 2011 Ver. 1.01 107


<strong>OCD</strong> <strong>Debugger</strong><br />

File download 가 완료되면 debugger 는<br />

MCU 를 reset 하고, MCU 의 program<br />

<strong>co</strong>unter 를 시작 번지인 0000h 로<br />

이동시킵니다.<br />

11.1.2 Save hexa<br />

연결 되어숦 있는 <strong>OCD</strong> device 의 <strong>co</strong>de memory<br />

내용을 file 로 저장합니다.<br />

저장 형솞은 intel-hexa format 입니다.<br />

저장할 file 이름을 입력하면, 현재 device 의<br />

<strong>co</strong>de 영역 size 만큼 file 로 만들어숦 집니다.<br />

11.1.3 Exit<br />

현재의 환경을 저장하고 debugger<br />

software 에숷서 즉시 빠져 나갑니다.<br />

May, 2011 Ver. 1.01 108


<strong>OCD</strong> <strong>Debugger</strong><br />

11.2 Emulation menu<br />

이 menu 는 emulation 에숷 필요한 기능을 포함합니다.<br />

Emulation 을 시작 또는 세우는 기능을 합니다.<br />

개발자는 전체 <strong>co</strong>de 또는 일부만의 <strong>co</strong>de 를 debugging 하기 위하여<br />

emulation 을 제어숦할 수셲 있습솚니다.<br />

11.2.1 Reset and run<br />

Target MCU 를 reset 하고, 0000H 번지부터<br />

emulation 을 시작합니다.<br />

이 는 실송제 target system 장치를 power on<br />

하는 것과 같습솚니다.<br />

Break 조건이 발생되거나 개발자가 강제로<br />

emulation 을 정지할 때까지 수셲행됩니다.<br />

Linear address 방솞으로 확장한 경우에숷는<br />

실송제 address 를 그대로 써솻주면 됩니다.<br />

Bank 형솞으로 확장한 MCU series 의 경우<br />

bank number 와 하위 16bit address 를<br />

써솻줍니다.<br />

각 bank 는 64KB 이내로 구성됩니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다<br />

Emulation 중에숷는 동작하지 않숂습솚니다<br />

11.2.3 Run <strong>co</strong>ntinue<br />

11.2.2 Run from<br />

Emulation 을 임의의 번지로부터 실송행하기<br />

위한 기능입니다. 이 기능은 software 를<br />

module 별로 수셲행하면서 check 할 때 주로<br />

사용됩니다.<br />

이를 수셲행하면 아래와 같은 dialog box 가<br />

나타납니다.<br />

현재 PC 번지부터 emulation 을 수셲행합니다.<br />

현재 PC 번지란<br />

- 이 전 emulation 에숷서 정지된 번지<br />

- break 로 정지되었숲을 때:<br />

break before 일 때는 break 가 설정된<br />

번지, break after 이면 break 가<br />

설정된 그 다음 번지<br />

- MCU 를 초기화했으면 0000h 번지<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

May, 2011 Ver. 1.01 109


<strong>OCD</strong> <strong>Debugger</strong><br />

11.2.4 Step<br />

한 개의 명령을 수셲행하고 정지합니다. 이<br />

기능은 주로 software 의 각 명령 처리를<br />

debug 하는데 사용됩니다.<br />

수셲행 중 call 명령을 만나면, step run 은<br />

subroutine 함수셲 안숀으로 들어숦가서 수셲행됩니다.<br />

즉, call 의 다음 수셲행 번지는 subroutine 의<br />

시작번지가 됩니다.<br />

만약, MCU 가 STOP mode 에숷 있으면 step 은<br />

처리되지 않숂습솚니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

이 기능은 검증된 module 을 하나의 명령으로<br />

처리해서 개발자가 software 의 흐름을<br />

간단하게 알숃 수셲 있게 해줍니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

11.2.6 Step auto<br />

매 100mS 마다 자동으로 Step run 이 실송행된다.<br />

이 기능은 개발자가 수셲행을 정지시킬 때까지<br />

계셏됩니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

11.2.5 Step over<br />

Step over 는 subroutine 함수셲의 호출을<br />

제외하고 Step RUN 과 거의 유사합니다.<br />

Call 명령을 만나면, 해당 subroutine 전체를 한<br />

개의 명령집합으로 인솞하고 처리합니다.<br />

현재 수셲행하려는 subroutine 함수셲가 또 다른<br />

subroutine 을 call 하더라도 상관하지 않숂고<br />

전체를 1 개의 명령 집합으로 처리합니다.<br />

즉, call 명령에숷서 step over 를 수셲행하고 나면<br />

다음 수셲행 번지는 call 아래의 명령이 됩니다.<br />

만약, step over 처리 중 break 조건이<br />

성립되면 emulation 은 정지되고 break 를<br />

알숃립니다.<br />

11.2.7 Stop<br />

Emulation 을 강제로 즉시 정지시킵니다.<br />

MCU 가 STOP mode 에숷 있더라도 정지됩니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

11.2.8 Apply reset<br />

Target MCU 에숷 hardware reset 을 인가합니다.<br />

Emulation 중이면 reset 인가 후에숷도<br />

emulation 이 계셏됩니다.<br />

Idle mode 인 경우에숷는 target MCU 가<br />

reset 으로 초기화된 상태를 유지합니다.<br />

Emulation 여부에숷 관계없숰이 동작됩니다.<br />

May, 2011 Ver. 1.01 110


<strong>OCD</strong> <strong>Debugger</strong><br />

11.3 Break/Configure menu<br />

이 menu 는 break 의 설정과 device 의 <strong>co</strong>nfiguration 설정에숷 관한<br />

것을 처리합니다.<br />

11.3.1 Clear ALL break<br />

설정되어숦 있는 모든 break 를 해제합니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

아래의 그림은 명령어숦의 실송행 전에숷 break 가<br />

발생하는 것을 보여줍니다.<br />

PC<br />

Break<br />

PC+1 PC+2 PC+3<br />

PC<br />

Fetch<br />

signa<br />

l<br />

11.3.2 Break BEFORE (AFTER)<br />

명령<br />

operan<br />

d<br />

명령<br />

opera<br />

nd<br />

PC-break 발생 시점을 지정된 위치의<br />

명령어숦가 수셲행되기 전에숷 할 것인 지, 수셲행된<br />

다음에숷 할 것인 지를 선택하는 기능입니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

Break<br />

detec<br />

t<br />

Hand<br />

le<br />

이 menu 를 선택하면 아래와 같은 dialog<br />

box 가 나타나고, 사용자가 원하는 것을<br />

선택하면 됩니다.<br />

Break 를 before 로 선언숨하면, emulation 중 PC<br />

break 가 발생하였을 때, 해당 위치의 명령이<br />

수셲행되지 않숂고 break 를 발생시킵니다.<br />

May, 2011 Ver. 1.01 111


<strong>OCD</strong> <strong>Debugger</strong><br />

Break 를 after 로 선언숨하면, emulation 중 PC<br />

break 가 발생하였을 때, 해당 위치의 명령이<br />

수셲행되고 나서 break 를 발생시킵니다.<br />

아래의 그림은 명령어숦의 실송행 후에숷 break 가<br />

발생하는 것을 보여줍니다.<br />

주기를 잴 수셲 있습솚니다. 이 경우는<br />

peripheral 을 STOP 으로 선택해야 합니다.<br />

PLL, AD <strong>co</strong>nvertor 등의 경우는 break 발생<br />

시에숷도 계셏 동작하여야 하므로, 이 경우에숷는<br />

STOP 시키지 말아야 합니다.<br />

PC<br />

Break<br />

PC<br />

PC+1 PC+2 PC+3<br />

Fetch<br />

signal<br />

각각의 peripheral<br />

사용에숷 주의가 필요합니다.<br />

을 제어숦하지 않숂으므로,<br />

명령<br />

opera<br />

명령<br />

operan<br />

nd<br />

d<br />

Break<br />

detec<br />

t<br />

Handl<br />

e<br />

11.3.4 Chip <strong>co</strong>nfiguration<br />

Target MCU 의 I/O pin 의 function 선택,<br />

발진방법, <strong>co</strong>de protection 과 같은 각<br />

device 마다 고유의 <strong>co</strong>nfiguration 정보를<br />

writing 하기 위한 기능입니다.<br />

11.3.3 Peripheral <strong>co</strong>ntrol<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

Idle 상태에숷서 MCU 내부의 peripheral 이 계셏<br />

동작하게 할 것인지, 정지 시킬 것인지를<br />

선택하는 기능입니다.<br />

Emulation 중에숷는 이 기능의 선택 에숷 관계없숰이<br />

동작됩니다.<br />

아래의 dialog 는 MC95FG204 용<br />

<strong>co</strong>nfiguration dialog box 입니다. 다른<br />

device 일 경우에숷는 아래의 형태와 다를 수셲<br />

있습솚니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

이 menu 를 선택하면 아래와 같은 dialog<br />

box 가 나타나고, 사용자가 원하는 것을<br />

선택하면 됩니다.<br />

Chip 의 <strong>co</strong>nfiguration 을 변경하였을 경우에숷는<br />

target system 의 power 를 껐다가 켜야<br />

합니다.<br />

이 기능은 MCU peripheral 의 동작, 특히<br />

timer 와 같은 peripheral 의 주기를 interrupt<br />

routine 내에숷서 측정하는데 이용하면 정확한<br />

Power 가 켜지는 순셴간에숷 <strong>co</strong>nfiguration 이<br />

chip 에숷 반영되기 때문입니다.<br />

May, 2011 Ver. 1.01 112


<strong>OCD</strong> <strong>Debugger</strong><br />

11.3.5 Clock freq. (95FR464 only)<br />

<strong>OCD</strong> system 은 target MCU 의 동작 주파수셲를<br />

감지하는 기능이 없숰습솚니다.<br />

MC95FR464 에숷 국한하여 가상의 Xin 주파수셲를<br />

반영하고, 이를 이용해서 수셲행 시간을 역으로<br />

추정해 보는 것을 목적으로 합니다.<br />

MC95FR464 가 연결되어숦 있을 때만 활성화<br />

됩니다.<br />

Target series<br />

를 변경하는 경우는 target<br />

system 의 전원을 차단하시기 바랍니다.<br />

11.3.7 H/W test to repair<br />

11.3.6 Change <strong>OCD</strong> series<br />

대부분의 <strong>OCD</strong> 계열 제품은 debugger S/W 가<br />

자동으로 제품의 종류를 인솞할 수셲 있습솚니다만,<br />

일부 제품의 경우에숷는 <strong>OCD</strong> 의 기본 I/F 와<br />

다른 방법을 사용하기도 합니다.<br />

이 경우, debugger S/W 가 해당 제품을<br />

인솞하지 못하기 때문에숷, debugger 에숷게<br />

제품을 알숃려주어숦야만 정상으로 동작합니다.<br />

이 기능은 <strong>OCD</strong> emulator hardware 의 수셲리에숷<br />

필요한 기능을 지원합니다.<br />

개발자와는 전혀 관계가 없숰습솚니다.<br />

11.3.8 Configuration Trimming<br />

이 기능은 <strong>OCD</strong> device 의 검토 시 필요한<br />

기능을 지원합니다.<br />

개발자와는 전혀 관계가 없숰습솚니다.<br />

May, 2011 Ver. 1.01 113


<strong>OCD</strong> <strong>Debugger</strong><br />

11.4 View menu<br />

window 를 열기 위한 menu 입니다.<br />

Child window 는 9 종류가 준비되어숦 있습솚니다.<br />

- MCS51 basic registers<br />

- Code disassemble<br />

- Code dump<br />

- XDATA dump<br />

- IRAM dump<br />

- SFR dump<br />

- Watch Global<br />

- Watch Local<br />

- Text file<br />

View menu 는 각각의<br />

고유한 기능을 가진 child<br />

11.4.1 Toolbar<br />

Toolbar 를 보여주거나 숨셷겨줍니다.<br />

Toolbar 는 debugger frame 의 상단에숷<br />

위치합니다.<br />

Toolbar 에숷는 개발자가 자주 사용하는 menu<br />

button 을 배치하였습솚니다.<br />

11.4.3 Window open bar<br />

Window open bar 를 보여주거나 숨셷겨줍니다.<br />

Window open bar 는 debugger frame 의<br />

상단에숷 위치합니다.<br />

Window open bar 에숷는 각각의 child<br />

window 를 open 하기 위한 menu button 을<br />

배치하였습솚니다.<br />

11.4.2 Emulation Toolbar<br />

Emulation Toolbar 를 보여주거나 숨셷겨줍니다.<br />

Emulation Toolbar 는 debugger frame 의<br />

상단에숷 위치합니다.<br />

Emulation Toolbar 에숷는 emulation 제어숦에숷<br />

필요한 menu button 을 배치하였습솚니다.<br />

11.4.4 Status Bar<br />

Status bar 를 보여주거나 숨셷겨줍니다.<br />

Status bar 는 debugger frame 의 하단에숷 위치<br />

합니다.<br />

Status bar 는 간단한 help, clock <strong>co</strong>unt 를<br />

표시 합니다.<br />

May, 2011 Ver. 1.01 114


<strong>OCD</strong> <strong>Debugger</strong><br />

11.4.5 MCS51 basic registers<br />

MCS51 계열의 기본 register 를 보여주기 위한<br />

window 를 엽니다.<br />

해당 window 가 이미 열려 있었숲으면 최상위로<br />

올려줍니다.<br />

해당 window 가 이미 열려 있었숲으면 최상위로<br />

올려줍니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

11.4.8 XDATA dump<br />

XDATA dump window 를 엽니다.<br />

11.4.6 Code disassemble<br />

Disassemble 형솞으로 표시된 <strong>co</strong>de<br />

window 를 엽니다.<br />

XDATA 는 MCS51 계열 MCU 에숷서 external<br />

data memory 영역을 의미합니다.<br />

해당 window 가 이미 열려 있었숲으면 최상위로<br />

올려줍니다.<br />

해당 window 가 이미 열려 있었숲으면 최상위로<br />

올려줍니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

11.4.7 Code dump<br />

Code dump window 를 엽니다.<br />

May, 2011 Ver. 1.01 115


<strong>OCD</strong> <strong>Debugger</strong><br />

11.4.9 IRAM dump<br />

해당 window 가 이미 열려 있었숲으면 최상위로<br />

올려줍니다.<br />

IRAM dump window 를 엽니다.<br />

IRAM 은 MCS51 계열 MCU 에숷서 internal RAM<br />

memory 영역을 의미합니다.<br />

해당 window 가 이미 열려 있었숲으면 최상위로<br />

올려줍니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

11.4.12 Watch Local<br />

Local 변수셲 window 를 엽니다.<br />

해당 window 가 이미 열려 있었숲으면 최상위로<br />

올려줍니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

11.4.10 SFR dump<br />

SFR dump window 를 엽니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

SFR 은 MCS51 계열 MCU 에숷서 special<br />

function register 영역을 의미합니다.<br />

해당 window 가 이미 열려 있었숲으면 최상위로<br />

올려줍니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

11.4.11 Watch Global<br />

Global 변수셲 window 를 엽니다.<br />

May, 2011 Ver. 1.01 116


<strong>OCD</strong> <strong>Debugger</strong><br />

11.4.13 Text file<br />

Text file 을 보여주는 window 를 엽니다.<br />

선택된 file name 으로 이미 해당 window 가<br />

열려 있었숲으면 최상위로 올려주고, 없숰을<br />

경우에숷는 새로 열어숦줍니다.<br />

Emulation 중에숷는 동작하지 않숂습솚니다.<br />

May, 2011 Ver. 1.01 117


<strong>OCD</strong> <strong>Debugger</strong><br />

11.5 Window menu<br />

Window menu 는 child window 의 배치 상태를 변경하거나,<br />

child window 를 바로 선택할 수셲 있게 합니다.<br />

11.5.1 Cascade<br />

Open 되어숦있는 모든 child window 를 아래의<br />

예와 같이 배치 합니다.<br />

11.5.3 Close<br />

<strong>Debugger</strong> frame 에숷 열려있는 child window 중<br />

top window 를 닫습솚니다.<br />

11.5.4 Windows 1, 2, 3, etc<br />

<strong>Debugger</strong> 는 windows 의 열린 순셴서에숷 따라<br />

serial number 를 1, 2, 3,…으로 할당합니다.<br />

11.5.2 Tile<br />

Open 되어숦있는 모든 child window 를 아래의<br />

예와 같이 배치 합니다.<br />

이 menu 에숷서 각 child window 의 할당된<br />

번호를 선택하면 해당 window 로 바로 이동할<br />

수셲 있도록 합니다.<br />

May, 2011 Ver. 1.01 118


<strong>OCD</strong> <strong>Debugger</strong><br />

12. Child windows<br />

12.1 MCS51 basic registers window<br />

MCS51 계열의 CPU 에숷서 사용되는 register 를 하나의 window 에숷 모아 display 와 edit 를 할 수셲 있게<br />

지원합니다.<br />

12.1.1 Edit<br />

사용자가 하나 이상의 data 를 변경하면<br />

window 하단의 Modify button 이<br />

enable 됩니다.<br />

Modify button 을 click 하여야만 수셲정이 반영<br />

됩니다.<br />

위의 빨간 부분은 R0~R7 영역입니다. 이<br />

영역은 MCS51 의 internal RAM 00h~1Fh<br />

번지와 같습솚니다. 8bit hexadecimal 수셲치로<br />

수셲정 가능합니다.<br />

위의 빨간 부분은 현재 사용되고 있는<br />

R0~R7 의 register bank 를 표시합니다.<br />

사용자가 다른 것으로 변경할 수셲도 있습솚니다.<br />

May, 2011 Ver. 1.01 119


<strong>OCD</strong> <strong>Debugger</strong><br />

Acc (Accumulator), B (B-register), SP (Stack<br />

pointer)는 8bit hexadecimal 로 수셲정<br />

가능합니다.<br />

위에숷 표시한 영역은 PSW (Program Status<br />

Word)이며, bit 단위로 변경이 가능합니다.<br />

DPTR 은 16bit 단위로 수셲정됩니다.<br />

둘 이상의 DPTR 이 존재하는 device 의 경우<br />

에숷는 현재 선택된 DPTR 이 수셲정됩니다.<br />

둘 이상의 DPTR 을 가진 device 에숷서 각 DPTR<br />

의 address 가 다르게 할당되어숦 있을 경우에숷는<br />

SFR window 를 사용하는 것이 좋습솚니다.<br />

May, 2011 Ver. 1.01 120


<strong>OCD</strong> <strong>Debugger</strong><br />

12.2 Code disassemble window<br />

Code disassemble window 는 program <strong>co</strong>de 를 mnemonic 으로 표시하며, 사용되는 모든 수셲치는<br />

16 진수셲를 사용합니다.<br />

Map/Symbol file 이 load 되어숦 있으면 address 영역에숷 source line 과의 연결 정보가 표시됩니다.<br />

12.2.1 Source file 열기<br />

Map/Symbol file 이 load 되어숦 있는 경우<br />

address 영역에숷 검은색으로 테두리가 있는<br />

위치는 source file 가 연결되어숦 있는 곳입니다.<br />

이 곳을 double click 하면 해당 source file 이<br />

열리고, 해당 line 으로 이동합니다.<br />

12.2.2 Line assemble<br />

Line 단위로 program <strong>co</strong>de 의 내용을 바꿀 수셲<br />

있게 하는 기능이며, mnemonic 을 입력으로<br />

합니다.<br />

Code 를 바꾸고자 하는 address 의 line 에숷서<br />

mouse 의 오른쪽 button 을 click 합니다<br />

명령어숦와 operand 를 입력합니다.<br />

사용되는 수셲치는 16 진수셲입니다.<br />

Target MCU 의 <strong>co</strong>de 영역을 직접 바꾸어숦주며,<br />

source file 에숷는 영향을 주지 않숂습솚니다.<br />

May, 2011 Ver. 1.01 121


<strong>OCD</strong> <strong>Debugger</strong><br />

PC break 의 설정 개수셲는 target MCU 마다<br />

일부 차이가 있을 수셲 있으며, 기본적으로<br />

8 개입니다.<br />

PC break 가 설정된 경우 disassemble<br />

window 의 해당 line 은 빨간색 배경으로<br />

나타납니다.<br />

파란색은 현재 program <strong>co</strong>unter 의 위치를<br />

나타냅니다.<br />

12.2.3 PC break toggle<br />

PC 는 target MCU 내부의 program <strong>co</strong>unter<br />

입니다.<br />

PC break 를 설정하거나 지워줍니다.<br />

PC break 설정을 바꾸고자 하는 위치의<br />

명령어숦 영역에숷서 mouse 의 왼쪽 button 을<br />

double click 합니다.<br />

May, 2011 Ver. 1.01 122


<strong>OCD</strong> <strong>Debugger</strong><br />

12.3 Code dump window<br />

Code dump window 는 <strong>co</strong>de 영역의 data 를 16 진수셲 형솞으로 표시해주며, 개발자가 값을 변경할 수셲<br />

있게 합니다. Window 의 상단에숷는 현재 cursor 의 위치와 함께 현재 열려있는 page 의 checksum 을<br />

보여줍니다.<br />

Window 의 중숋에숷는 현재 표시되는 page 를 표시합니다.<br />

하나의 page 는 256byte 로 이루어숦지고, xx00h ~ xxFFh 를 표시합니다. (xx 는 page 번호)<br />

12.3.1 Edit<br />

개발자는 emulation 진행 중일 때를 제외하고,<br />

data 를 수셲정할 수셲 있습솚니다.<br />

12.3.2 Bank<br />

MCS51 은 기본적으로 16bit address bus 를<br />

가지고, 64KB 의 영역을 지원합니다.<br />

Bank 는 이러한 제한을 극복하기 위한<br />

목적으로 생겨난 발상입니다. 자사의 MCS51<br />

계열은 bank 방솞이 아닌 linear address 로 이<br />

제한을 없숰앴숕습솚니다.<br />

Linear address 방솞에숷서 사용되는 bank 는<br />

20bit address 의 상위 4bit 에숷 해당됩니다.<br />

수셲정방법은 원하는 위치에숷 cursor 를<br />

위치시키고 수셲치를 입력하면 됩니다.<br />

Bank 를 변경하면 64KB 단위의 다른 <strong>co</strong>de<br />

영역으로 이동합니다.<br />

수셲치가 입력되면 빨간색으로 표시되는데,<br />

Enter key 를 눌러야 실송제로 수셲정이 되고<br />

검은색으로 돌아옵니다.<br />

입력을 취소하려면 ESC key 를 누르면 됩니다.<br />

May, 2011 Ver. 1.01 123


<strong>OCD</strong> <strong>Debugger</strong><br />

12.3.3 Goto<br />

Bank 가 상위 4bit address 구간을 이동하는데<br />

대해 goto 는 하위 16bit address 구간을<br />

이동하는 목적으로 사용됩니다.<br />

따라서, 입력 범위는 0000h ~ FFFFh<br />

사이입니다.<br />

12.3.5 Save<br />

Code 영역의 지정된 구간을 pattern file 로<br />

save 하는 기능입니다.<br />

이 기능은 사용자만의 pattern 을 file 로 만들<br />

때 사용됩니다.<br />

12.3.4 Load<br />

Code 영역에숷 pattern 을 load 하는 기능입니다.<br />

12.3.6 Fill<br />

Code 영역의 지정된 구간을 특정한<br />

pattern 으로 채워주는 기능입니다.<br />

사용자 program 은 File menu 의 Load<br />

hexa 를 이용하면 됩니다만, 이 기능은<br />

사용자의 특정 pattern 을 별도로 load 하려는<br />

경우 사용됩니다.<br />

May, 2011 Ver. 1.01 124


<strong>OCD</strong> <strong>Debugger</strong><br />

12.4 XDATA dump window<br />

XDATA dump window 는 XDATA 영역의 data 를 16 진수셲 형솞으로 표시해주며, 개발자가 값을<br />

변경할 수셲 있게 합니다. Window 의 상단에숷는 현재 cursor 의 위치와 함께 현재 열려있는 page 의<br />

checksum 을 보여줍니다.<br />

전체적인 사용법은 <strong>co</strong>de dump window 와 거의 유사합니다.<br />

Window 의 중숋에숷는 현재 표시되는 page 를 표시합니다.<br />

하나의 page 는 256byte 로 이루어숦지고, xx00h ~ xxFFh 를 표시합니다. (xx 는 page 번호)<br />

12.4.1 Edit<br />

입력을 취소하려면 ESC key 를 누르면 됩니다.<br />

개발자는 emulation 진행 중일 때를 제외하고,<br />

data 를 수셲정할 수셲 있습솚니다.<br />

12.4.2 Bank<br />

MCS51 은 <strong>co</strong>de 영역과 마찬가지로 XDATA<br />

영역에숷 대해서도 16bit address bus 를 가지고,<br />

64KB 의 영역을 지원합니다.<br />

Bank 는 이러한 제한을 극복하기 위한<br />

목적으로 생겨난 발상입니다. XDATA 에숷<br />

대해서는 linear address 방솞이 아닌 bank<br />

방솞으로 확장됩니다.<br />

수셲정방법은 원하는 위치에숷 cursor 를<br />

위치시키고 수셲치를 입력하면 됩니다.<br />

수셲치가 입력되면 빨간색으로 표시되는데,<br />

Enter key 를 눌러야 실송제로 수셲정이 되고<br />

검은색으로 돌아옵니다.<br />

Bank 는 20bit address 의 상위 4bit 에숷<br />

해당됩니다.<br />

Bank 를 변경하면 64KB 단위의 다른 XDATA<br />

영역으로 이동합니다.<br />

May, 2011 Ver. 1.01 125


<strong>OCD</strong> <strong>Debugger</strong><br />

12.4.3 Goto<br />

12.4.5 Save<br />

Bank 가 상위 4bit address 구간을 이동하는데<br />

대해 goto 는 하위 16bit address 구간을<br />

이동하는 목적으로 사용됩니다.<br />

XDATA 영역의 지정된 구간을 pattern file 로<br />

save 하는 기능입니다.<br />

이 기능은 사용자만의 pattern 을 file 로 만들<br />

때 사용됩니다.<br />

12.4.4 Load<br />

XDATA 영역에숷 pattern 을 load 하는<br />

기능입니다.<br />

12.4.6 Fill<br />

XDATA 영역의 지정된 구간을 특정한<br />

pattern 으로 채워주는 기능입니다.<br />

이 기능은 XDATA 영역에숷 사용자의 특정<br />

pattern 을 load 하려는 경우 사용됩니다.<br />

May, 2011 Ver. 1.01 126


<strong>OCD</strong> <strong>Debugger</strong><br />

12.5 IRAM dump window<br />

IRAM dump window 는 MCS51 계열의 internal RAM 영역의 data 를 16 진수셲 형솞으로 표시해주며,<br />

개발자가 값을 변경할 수셲 있게 합니다. Window 의 상단에숷는 현재 cursor 의 위치와 함께 현재<br />

열려있는 page 의 checksum 을 보여줍니다.<br />

IRAM 의 00 ~ 7Fh 번지는 direct 영역이며, window 에숷서 검은색으로 표시됩니다.<br />

IRAM 의 80 ~ FFh 번지는 indirect 영역이며, window 에숷서 옅은 초록색으로 표시됩니다.<br />

Direct / Indirect 영역에숷 대한 내용은 MCS51 계열의 device manual 을 참조하시기 바랍니다.<br />

Window 의 중숋에숷는 IR 이라고 표시되어숦 IRAM 을 빨리 인솞할 수셲 있게 합니다.<br />

12.5.1 Edit<br />

개발자는 emulation 진행 중일 때를 제외하고,<br />

data 를 수셲정할 수셲 있습솚니다.<br />

수셲치가 입력되면 빨간색으로 표시되는데,<br />

Enter key 를 눌러야 실송제로 수셲정이 되고<br />

검은색으로 돌아옵니다.<br />

입력을 취소하려면 ESC key 를 누르면 됩니다.<br />

12.5.2 Save<br />

IRAM 영역을 hexa file 로 save 하는<br />

기능입니다.<br />

수셲정방법은 원하는 위치에숷 cursor 를<br />

위치시키고 수셲치를 입력하면 됩니다.<br />

May, 2011 Ver. 1.01 127


<strong>OCD</strong> <strong>Debugger</strong><br />

12.6 SFR dump window<br />

SFR dump window 는 SFR(Special Function Register)영역의 data 를 16 진수셲 형솞으로 표시해주며,<br />

개발자가 값을 변경할 수셲 있게 합니다. Window 의 상단에숷는 현재 cursor 의 위치와 함께 현재<br />

열려있는 page 의 checksum 을 보여줍니다.<br />

SFR 영역은 IRAM 의 direct 영역과 마찬가지로 access 가능하며, 80 ~ FFh 에숷 위치합니다.<br />

각 SFR 의 기능은 device 마다 다르므로 사용자는 target device 의 SFR 에숷 관하여 manual 을<br />

참조하셔셁야 합니다.<br />

12.6.1 Edit<br />

개발자는 emulation 진행 중일 때를 제외하고,<br />

data 를 수셲정할 수셲 있습솚니다.<br />

값을 유지하는 register 도 있지만, 일반 I/O 나<br />

timer 와 같이 계셏 값이 변경되는 register 도<br />

있습솚니다.<br />

Refresh 를 수셲행하면 SFR 의 내용을 갱신솟하여<br />

보여줍니다.<br />

수셲정방법은 원하는 위치에숷 cursor 를<br />

위치시키고 수셲치를 입력하면 됩니다.<br />

수셲치가 입력되면 빨간색으로 표시되는데,<br />

Enter key 를 눌러야 실송제로 수셲정이 되고<br />

검은색으로 돌아옵니다.<br />

입력을 취소하려면 ESC key 를 누르면 됩니다.<br />

12.6.3 Save<br />

SFR 영역을 hexa file 로 save 하는 기능입니다.<br />

12.6.2 Refresh<br />

SFR 영역에숷는 Stack pointer, Accumulator 와<br />

같이 CPU 가 명령을 수셲행하지 않숂을 때는 그<br />

May, 2011 Ver. 1.01 128


<strong>OCD</strong> <strong>Debugger</strong><br />

12.7 Watch Global window<br />

Watch Global window 는 C source level debugging 시에숷 global 변수셲의 값을 보거나, 수셲정할 수셲 있게<br />

합니다.<br />

각각의 변수셲는 Code, XDATA, IRAM, SFR 등에숷 위치하므로 사용자가 그 위치를 참조해도 되지만,<br />

debugging 의 편의성을 위하여 이와 같이 별도의 window 를 제공합니다.<br />

Map/Symbol file 이 load 되어숦 있어숦야만 정보가 표시됩니다.<br />

12.7.1 Add symbol<br />

12.7.3 Edit<br />

Watch Global window<br />

추가하는 기능입니다.<br />

에숷 표시 할 변수셲를<br />

마우스솔의 커서를 수셲정하려는 line 으로 이동<br />

합니다.<br />

Mouse 의 왼쪽 button 을 double click 합니다.<br />

Edit dialog box 가 나타납니다.<br />

12.7.2 Remove symbol<br />

값을 변경하고 “Modify” button 을<br />

click 합니다.<br />

현재 Watch Global window 에숷 표시되는 변수셲<br />

list 에숷서 제거하려는 변수셲를 선택하는<br />

기능입니다.<br />

May, 2011 Ver. 1.01 129


<strong>OCD</strong> <strong>Debugger</strong><br />

12.8 Watch Local window<br />

Watch Local window 는 C source level debugging 시에숷 Local 변수셲의 값을 보거나, 수셲정할 수셲 있게<br />

합니다.<br />

각각의 변수셲는 Code, XDATA, IRAM, SFR 등에숷 위치하므로 사용자가 그 위치를 참조해도 되지만,<br />

debugging 의 편의성을 위하여 이와 같이 별도의 window 를 제공합니다.<br />

Map/Symbol file 이 load 되어숦 있어숦야만 정보가 표시됩니다.<br />

12.8.1 Edit<br />

아래의 그림에숷서 보다시피 delay(UINT uCnt)<br />

함수셲 내에숷 정지해 있는 경우 Local 변수셲<br />

window 에숷는 해당 함수셲의 이름이 window<br />

상단에숷 표시되고, 해당 함수셲의 local 변수셲가<br />

list 됩니다.<br />

마우스솔의 커서를 수셲정하려는 line 으로 이동<br />

합니다.<br />

Mouse 의 왼쪽 button 을 double click 합니다.<br />

Edit dialog box 가 나타납니다.<br />

값을 변경하고 “Modify” button 을<br />

click 합니다.<br />

12.8.2 변수의 추가, 삭제<br />

Local 변수셲는 <strong>co</strong>de 의 수셲행에숷 따라<br />

debugger 가 현재 C module 의 위치를<br />

파쇿하여 자동으로 변경해줍니다. 따라서,<br />

개발자가 변수셲를 추가 또는 제거할 필요가<br />

없숰습솚니다.<br />

May, 2011 Ver. 1.01 130


<strong>OCD</strong> <strong>Debugger</strong><br />

다른 함수셲로 이동하면 아래의 그림과 같이<br />

함수셲명과 local 변수셲 list 가 갱신솟됩니다.<br />

May, 2011 Ver. 1.01 131


<strong>OCD</strong> <strong>Debugger</strong><br />

12.9 Text file window<br />

Text file 을 볼 수셲 있도록 해줍니다. File 의 edit 는 지원하지 않숂습솚니다.<br />

Map/Symbol file 이 load 되어숦 있을 경우에숷는 source program 에숷 address 정보가 함께 표시됩니다.<br />

예) Map/Symbol 정보가 없숰거나, 관계없숰는 file 의 경우 : line number 와 내용이 표시됨<br />

예) Map/Symbol 정보와 관련있는 file 에숷서는 line number 외에숷 address 정보도 표시됨<br />

12.9.1 Goto line<br />

File 내의 이동을 위한 기능입니다.<br />

Map/Symbol file 정보와는 무관하게 해당<br />

file 의 line number 만을 사용합니다.<br />

May, 2011 Ver. 1.01 132


<strong>OCD</strong> <strong>Debugger</strong><br />

12.9.2 Disassemble window 연동<br />

Map/Symbol file 이 load 되어숦 있고, source<br />

file 의 line number 위치에숷 address 정보가<br />

표시될 때, 이 address 부분을 double<br />

click 하면 disassemble window 의 display<br />

address 가 해당 번지로 이동됩니다.<br />

Disassemble window 가 열려있지 않숂았을<br />

경우에숷는 disassemble window 를 open 한<br />

다음 해당 위치로 이동합니다.<br />

12.9.3 Break toggle<br />

Map/Symbol file 이 load 되어숦 있고, source<br />

file 의 line number 위치에숷 address 정보가<br />

표시될 때, address 와 연결된 오른 쪽의 내용<br />

부분을 double click 하면 해당 address 에숷<br />

break 가 설정 또는 해제됩니다.<br />

Break 가 설정된 line 은 빨간색으로<br />

표시됩니다.<br />

Emulation 이 정지된 상태의 program<br />

<strong>co</strong>unter 와 연결되는 line 은 파란색으로<br />

표시됩니다..<br />

May, 2011 Ver. 1.01 133

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!