NoticeHewlett-P ac kar d ma kes no war r anty of any kind with rega rd to
this materia l, inc ludi ng, but not limi te d to, the implied warranties
of merchantabil ity and fitne ss for a parti cul ar purpo se.
Hewlett-Pa c ka rd sha ll not be liabl e fo r errors c ont a ined he rei n or for
incident al or conse que nt ia l dama ges in c onn ect ion with the furn ishi ng,
perfo rmance, or use of this mat erial.
Hewlett-Pa c kard assum es no responsibility for the use or reliabil ity of
its software on equ ipme nt that is not furni she d by Hewle tt-Packard.
copyrigh t. All righ ts are rese rv ed . No part of this doc um e nt may be
photocopie d, reprod uc ed or transl ate d to ano ther l anguage without the
prior written co nse nt of Hewl ett- Pac ka rd Compa ny. The infor mat ion
contained in this document is subject to change without notice.
HP is a tradem ark of Hewlett -P a c ka rd Com pa n y .
UNIX is a registere d trade m ark in the Unit ed Sta tes a nd ot he r
countries, lic en sed exclusiv el y throug h X/Ope n Comp an y Lim ited .
H8/3003 is a registered trademark of Hitachi Ltd.
Hewlett-P ac kar d Com pany
P.O. Box 219 7
1900 Garden of the Gods Road
Colorado Springs, CO 80901-2197, U.S.A.
RESTRICTED RIGHTS LEGEND Use, duplication, or discl osure
by the U.S. Governm ent is subjec t to restr icti ons se t forth in
subparag raph (C) (1) (ii) of the Rights i n Tec hni c al Dat a and Com put er
Software Cla use at DFARS 252.22 7-7013. Hewlett-Packard Compa ny,
3000 Hanove r Str eet , Palo Alto, CA 94304 U. S. A. Ri ght for non-DOD
U.S. Gov ernmen t De partment and Agencies are as set fort h in F AR
52.227-19 (c)(1, 2) .
Printing HistoryNew editions a re complete re vi sions of the man ua l. The date on the
title page changes only when a new edition is published.
A software code may be printe d be fore the dat e; this indicates the
version leve l o f the software produ ct at the ti m e t he manual was issued.
Many produc t up da te s an d fix es do not requ ire manua l cha nge s, and
manual corre c ti ons m ay be done without accompa nyi ng pr oduc t
changes. There fo re , do not expe c t a one-t o-on e corr espondence
between pro duc t upda te s an d manu al re visi ons.
Edition 164784-97000 , July 1993
Edition 264784-97002 , March 199 4
Edition 364784-97004 , August 19 94
Edition 464784-97006 , April 1995
Edition 564784-97008 , May 1995
Edition 664784-97010 , Aug 1995
Using This Manual
This manua l is desi gne d to giv e you an introdu ct ion to the HP 64784
H8/3003 Emulat or. This man ua l will also help defi ne how these
emulators differ from othe r HP 64700 Emulat ors.
This manua l will :
This manua l wi ll not:
give you an introduc tion to using the emul ator
explore various ways of applying the emul a tor to accomplish
your tasks
show you emulator comm ands whi ch are spe cifi c to the
H8/3003 Emulator
tell you how to use each and every emulator/analyzer
command (refer to the User’s Reference m anual)
Organization
Chapter 1An introduc tion t o the H8/3003 emul at or fea tu re s and how they ca n
Chapter 2A brief introduct io n to using the H8/30 03 E mula to r. You will load
Chapter 3How to plug the emulator probe into a ta rget syste m .
Chapter 4Configuri ng the em ulat or to adapt it to your speci fic me asu re ment
Appendix AH8/3003 Emulator Specific Command Syntax and Error Message
help you in developi ng new ha rdwa re and software.
and execute a short progra m , and make som e measu re ment s usin g the
emulation analyzer.
The H8/3003 Emulator is designed to replace the H8/3003
microproc e ssor in your tar ge t system so you can cont rol operation of
the microproc essor i n your appli cat ion hardwa re (usuall y refe r
to as the target system). The H8/3003 emulator perf orms just like the
H8/3003 micropro cessor , but is a device that allows yo u to control the
H8/3003 micropro ce ssor direc tly. These feat ure s a llow you t o easi ly
debug softwa re be for e any hardware i s ava ila bl e, and e ase th e task of
integrating hardware and software.
Introduction to the H8/3003 Emulator 1-1
Figure 1-1. HP 64784 Emulato r for the H8/3003
1-2 Introduction to the H8/3003 Emulato r
Features of the
H8/3003 Emulator
Supported
Microprocessors
Supported Microproce ssorQFP Adaptor
TypePackageSystem
Clock
Divider
H8/300580pinQF P
H8/300480pinQFP
H8/3003112 pin QFP
1:2-
The HP 64784A H8/300 3 emul a tor suppor ts th e mic ro proc e ssors l ist ed
in Table 1-1.
Table 1-1. Supported Microprocessors
PGA Adaptor
On-chip ROM Supply Voltage
4.75 t o 5. 2 5 V
--
2.7 to 5.25V
4.75 t o 5. 2 5 V
--
2.7 to 5.25V
4.75 t o 5. 2 5 V
2.7 to 5.25V
4.75 t o 5. 2 5 V
--
2.7 to 5.25V
Board
-
-
HP64784C HP64784E/
Board/
QFP probe
HP64784E/
HP64784K*1
HP64784E/
HP64784K*1
HP64784F
H8/3002100 pin QFP
H8/300180 pin QFP
4.75 to 5.25VHP64784D HP64784E/
--
2.7 to 5.25V
4.75 t o 5. 2 5 V
--
HP64784G
HP64784E/
-
Introduction to the H8/3003 Emulator 1-3
HP64784J *1
Table 1-1. Supported Microprocessors (Cont’d)
Supported Microproce ssorQFP Adaptor
TypePackageSystem
Clock
Divider
H8/3032 80 pin QFP
H8/3031 80 pin QFP
H8/3030 80 pin QFP
H8/3042 100 pin QFP
On-chip ROM Supply Voltage
2.7 to 5.25V
4.75 to 5.25V
PROM
2.7 to 5.25V
-
4.75 to 5.25 V
Masked ROM
2.7 to 5.25V
4.75 to 5.25 V
--
2.7 to 5.25 V
4.75 to 5.25 V
--
2.7 to 5.25 V
4.75 to 5.25V
PROM
2.7 to 5.25V
-
4.75 to 5.25V
Masked ROM
2.7 to 5.25V
PGA Adaptor
Board
Board/
QFP probe
HP64784E/
-
HP64784H
HP64784E/
-
HP64784H
HP64784E/
-
HP64784H
HP64784DHP64784E/
HP64784G
H8/3041 100 pin QFP
-Masked ROM
H8/3040 100 pin QFP
-Masked ROM
*1 When you do in-ci rc ui t emu lati on fo r H8/3 001 wi th mode 3/4 or
H8/3004/5 with mode 3, you must use HP 647 84-6 6509 shipp ed with
HP 64784J/K. Refe r to the "In-Circ ui t Emula tion" Chapter in this
manual for more details.
1-4 Introduction to the H8/3003 Emulato r
4.75 to 5.25VHP64784DHP64784E/
HP64784G
2.7 to 5. 5V
4.752 to 5.25VHP64784DHP64784E/
HP64784G
2.7 to 5.25V
The H8/3003 e mu lato r is provid ed with out any QFP ada pt ors a nd PGA
adaptor(HP 647 84E ) wit h QFP probe. To emulate eac h proce ssor wi th
your target syste m , you need to purch ase appro pri at e QFP adapt or or
PGA adaptor with QFP probe liste d in Tabl e 1-1. To purcha se the m,
contact your l oc al HP sal es re pr esentati ve .
You can buy HP 64797B low voltage adap tor to emula te eac h
processor runni ng with sup ply voltage from 2.7 up to 5.25V inp ut in
your target syste m . To buy HP 64797B, cont act your l ocal HP sales
repres e ntative.
The list of supported micr opro cessor s in Tab le 1-1 i s not nece ssar ily
complete. To determ ine if your m icro proc e ssor i s suppor te d or no t,
contact Hewlett-Packard.
Clock SpeedsYou can select whethe r t he emul ator wi ll be clo ck ed by the in ternal
clock source or by the external clock sour ce on your targ et syste m.
When you sele c t a cl oc k in put con form i ng to the spe cification of Tabl e
1-2.
Refer to the "Conf igu ra ti on the E mula t or" Cha pt e r in this ma nua l fo r
more de tails.
Emulation memoryThe H8/3003 emulator is used with one of the following Emulation
Memory Cards.
HP 64726A 128K byte Emula tion Me mo ry Card
HP 64727A 512K byte Emula tion Me mo ry Card
HP 64728A 1M byte Emula t ion Memory Card
HP 64729A 2M byte Emula t ion Memory Card
You can defin e up to 16 me mo ry ranges (at 512 byte bo unda ri e s and
least 512 byt e in le ngt h. ) The em ula t or oc c upi es 6K byte, which is
used for monitor pro gram and interna l RAM of micr o proc e ssor ma ppe d
as emulation RAM, leaving 1 22K, 506K, 1018K, 2042K byte of
emulati on m emo ry which you may use. You can chara c teri z e me mo ry
range as emul atio n RAM (e ra m), em ulat ion ROM (er om ), target
system RAM (tram), tar get system ROM (trom ), or guard ed mem ory
(grd). The emulator gene ra tes an error messa ge when acc esse s are
made to guarde d m emo ry lo ca t ion s. You can al so configure the
emulator so that writes t o memory def ined as ROM cause e mula to r
execu tion to break out of targe t pr ogra m ex ecution.
AnalysisThe H8/3003 emulator is used with one of the following analyzers
which allows you to trace code exec ut ion an d proce ssor a cti vity.
HP 64704A 80-channel Emulation Bus Ana l yz er
HP 64703A 64-channel Emulation Bus Ana l yz er and
16-ch an nel State/ T im ing Analyzer.
HP 64794A/C/D Deep Emulat ion Bus Ana lyze r
The Emulatio n Bus Analy ze r moni to rs the emu lati on pr ocesso r usin g
an internal analy sis bus. The HP 64703A 64- ch an ne l Emula tion Bu s
Analyzer and 16 -cha nne l Stat e/T imi ng Ana lyze r allows you to probe
up to 16 different lines in your target syst em.
RegistersYou can displa y or modi fy the H8/30 03 in terna l reg ist er conte nts. This
include s the abili ty t o mo dify the pro gram counter (PC ) va lue so you
can control where the emulator starts a program run.
BreakpointsYou can set the emulator/ana lyzer interaction so the emulator will
break to the monit or pr ogra m when the ana lyze r finds a spec ific sta te or
states, allowin g you t o perfor m po st-m or tem anal ysis of the prog ra m
executi on. You can also set softwa re bre a kpo int s in yo ur pro gra m .
This featu re is real ize d by inserting a speci al instru ct io n into use r
Introduction to the H8/3003 Emulator 1-7
program. One of un defin ed opc ode s (577 0 hex) is used as soft war e
breakpoint instruc t ion . Refe r to the "Usin g Softwar e Brea kp oin ts"
section of "Getting Started" chapter for more information.
Reset SupportThe emul at or ca n be reset from the emu lati on syste m unde r your
control; or yo ur targ et syste m can re se t the emulat io n proc essor.
Real Time OperationReal-time signifies con tinuou s exe cut ion of your progr am at ful l rated
processor speed wi thout interf er en ce fro m the emulat or. (Suc h
interfe rence oc curs when the emula to r ne eds to break to the mo nit or t o
perform an action you requeste d, such as displ ay ing targe t system
memory. ) Emul at or fe a tu re s per form e d in real time inc l ude : running
and analyzer tracing. Emulator features not performed in real time
include: displa y or modi fic a tion of targe t syste m me mo ry, load/ dum p
of target m emory, displa y or modi fic a ti on of reg ist er s.
1-8 Introduction to the H8/3003 Emulato r
Limitations,
Restrictions
Foreground MonitorForeground monit or is not support ed for the H8/300 3 emul a tor .
DMA SupportDirect memory acce ss to the emul a tion by e xt er na l DMAC is not
allowed.
Internal RAM of
H8/3005
Watch Dog Timer in
Background
Monitor B reak at
Sleep/Standby Mode
Hardware Standby
Mode
Interrupts in
Background Cycles
Reset Output Enable
Bit
When you emulat e H8/300 5 proc e ssor, you can’t use addre ss 0fe f10h 0ff00fh (mode 1) and 0ffe f1 0h - 0ff f00f h (mode 3) as int er na l RAM.
These area are worked as extern al 8bit 3stat e area .
Watch dog time r is suspe nd ed count up while the emul ator i s runni ng
in background monitor.
When the emula to r brea ks int o the bac kgr ound mon itor, sle ep or
software standby mode is released. Then, PC indicates next address of
"SLEEP" instru ctio n.
Hardware standb y mo de is not suppor te d for the H8/3 003 e mula t or.
Hardware sta ndb y reque st fr om targe t syste m will give th e emula tor
reset signal.
The H8/30 03 e mu lato r doe s not ac cep t a ny in terrupts while in
background m oni to r. Such interrupts are suspende d whil e runni ng the
background m oni to r, and will oc cu r when co nte xt is cha nge d to
foreground.
The RSTOE (Reset output enable bit) is used to dete rmi ne whet he r the
H8/3003 processor out put s reset signal when the pro cessor is reset by
the watch dog timer. Howeve r, the H8/ 3003 emulat or ignor es the
configur atio n of th e RSTOE , and works as it is con fig ured with the
modify c onfi gur at io n co mm a nd.
Introduction to the H8/3003 Emulator 1-9
Evaluation chipHewlett-Pa cka rd mak es no warran ty of the problenm cause d by the
H8/3003 Evalua ti on chip in the emulat or.
1-10 Introduction to the H8/3003 Emulato r
Getting Started
IntroductionThis chapt er will lea d you through a basic , step by ste p tutor ia l
designed to familiari z e you with the use of the HP 64700 emula tor for
the H8/3003 micropr oc esso r. When you have compl ete d this chap ter,
you will be able to perform these tasks:
Set up an emulation configuration for out of circuit emulation
use
Map memory
Transfer a small prog ram into emul atio n mem ory
Use run/stop con tro ls to contro l opera t ion of your progr am
Use memory m a nip ula t ion features to a lte r the pro gra m ’s
operat ion
2
Use analyzer comma nds to view the rea l time exe c ution of
your program
Use software breakpoint feature to stop program execution at
speci fic address
Search mem ory fo r strings or num eric expre ssio n s
Make progr am coverage me a surements
Getting Started 2-1
Before You BeginBefore be gi nni ng t he tut ori al pre se nte d i n thi s ch ap te r, you must have
completed the following tasks:
1. Complete d ha rdwa re in sta lla ti on of t he HP 64700 e m ula tor in
the configu ra ti on you inten d to use for your wor k:
Standalon e configuration
Transparent confi guration
Remote conf igu ra ti on
2. If you are using t he Remot e Confi gur at io n, you must ha ve
completed installation and configuration of a terminal
emulator prog ra m whic h wil l allow your host t o act as a
terminal connecte d t o the emu la to r. In addit ion , yo u mu st sta rt
the termina l em ula tor program bef ore you ca n work the
example s in this c ha pt er .
3. If you have prope rl y c om ple t ed ste ps 1 an d 2 ab ove , you
should be able to hit <RETURN> (or <ENTER> on some
keyboar ds) and ge t on e of the fol lowi ng c om m an d prompt s on
your terminal screen:
U>
R>
M>
If you do not see one of the se c om m an d prom pt s, retrace yo ur
steps throu gh the hardware and softwa re inst a llat ion
proced u re s outl ined in the ma nuals abov e, ve ri fying all
connecti ons a nd pr oc ed ura l step s. If you ar e stil l unabl e to get
a command prompt, refer to the HP 64700 Support Service sGuide. The guid e give s basic troubl esh ooting proce dure s. If
this fail s, call the lo cal HP sale s a nd se rvice office list e d in the
Support Services Guide.
2-2 Getting Started
In any case, you must have a comm and prompt on your
terminal screen bef ore proc e e din g wit h the tu tor ia l.
A Look at the
Sample Program
The sample progra m "COMMAND_READE R" use d in this chapt e r is
shown figure 2-1. The program emulates a primitive command
interpreter.
Data Declarations
Msg_A, Msg_B and Msg_I are the messa ges use d by the progra m to
respond to various c om man d inp uts.
Initializ atio n
The locati ons of st ac k and i nput area (C md _Inp ut) are move d in to
address re gisters for u se by the program. Next, the CLEAR routine
clears the c om mand byte (t he first lo ca tion pointed to by Cmd_In put 0ff800 hex) . Cmd_ Inpu t cont ai ns 00 hex fo r late use.
Scan
This routine conti nuo usly reads t he byte at loca tion of Cmd_Input until
it is something ot he r th an a null cha ra cte r (00 hex); whe n this oc c urs,
the Exe _Cm d routine is executed.
Exe_Cmd
Compare s th e i nput byt e (now something ot her than a null) t o the
possible comman d bytes of "A" (ASCII 41 hex) and "B" (ASCII 42
hex), then jum ps to the approp ria t e set up routine for the command
message. If the input byte does not ma tch either of these values, a
branch to a set up routine for an error message is executed.
Cmd_A, Cmd_B, Cmd_I
These ro uti ne s set up the prope r pa ra m et ers for writing the outp ut
message: the numbe r of byte s in the messa ge is move d to the R3L
register and the base address of th e messag e in the data are a is moved
to address register ER4.
Getting Started 2-3
Write_Msg
First the base address of the output area is copied to ER5. Then the
Clear_ Old ro uti ne writes null s to 32 byte s of t he outp ut a re a (thi s
serves bot h to initia liz e the area a nd to clea r old messa ge s wri tt en
during previo us prog ra m passe s).
Finally, the prope r me ssag e is writte n to the out put area by the
Write_Loop routi ne . When do ne , Wri te _L oop jumps bac k to Cle ar and
the comman d mo nitoring process be gi ns a ga in.
Using the various fea tur es of the emula tor , we wil l show you how to
load this p rogram into emulation me mory, exe cute it, monitor the
program ’s ope ra ti on with the anal yz er, and simu late entry of different
command s uti li zing t he mem ory a cce ss c om mand s provi de d by the HP
64700 command set.
2-4 Getting Started
002000 1 .SECTION Table,DATA,LOCATE=H’2000
002000 2 Msgs
002000 5448495320495320 3 Msg_A .SDATA "THIS IS MESSAGE A"
002008 4D45535341474520
002010 41
002011 5448495320495320 4 Msg_B .SDATA "THIS IS MESSAGE B"
002019 4D45535341474520
002021 42
002022 494E56414C494420 5 Msg_I .SDATA "INVALID COMMAND"
00202A 434F4D4D414E44
002031 6 End_Msgs
7
001000 8 .SECTION Prog,CODE,LOCATE=H’1000
9 ;****************************************************
10 ;* Set up the Pointers.
11 ;****************************************************
001000 7A07000FF904 12 Init MOV.L #Stack,ER7
001006 7A01000FF800 13 MOV.L #Cmd_Input,ER1
14 ;****************************************************
15 ;* Clear previous command.
16 ;****************************************************
00100C F800 17 Clear MOV.B #H’00,R0L
00100E 6AA8000FF800 18 MOV.B R0L,@Cmd_Input
19 ;****************************************************
20 ;* Read command input byte. If no command has been
21 ;* entered, continue to scan for it.
22 ;****************************************************
001014 6A2A000FF800 23 Scan MOV.B @Cmd_Input,R2L
00101A AA00 24 CMP.B #H’00,R2L
00101C 47F6 25 BEQ Scan
26 ;****************************************************
27 ;* A command has been entered. Check if it is
28 ;* command A, command B, or invalid command.
29 ;****************************************************
00101E AA41 30 Exe_Cmd CMP.B #H’41,R2L
001020 5870000A 31 BEQ Cmd_A
001024 AA42 32 CMP.B #H’42,R2L
001026 58700010 33 BEQ Cmd_B
00102A 58000018 34 BRA Cmd_I
35 ;****************************************************
36 ;* Command A is entered. R3L = the number of bytes
37 ;* in message A. R4 = location of the message.
38 ;* Jump to the routine which writes the message.
39 ;****************************************************
00102E FB11 40 Cmd_A MOV.B #Msg_B-Msg_A,R3L
001030 7A0400002000 41 MOV.L #Msg_A,ER4
001036 58000014 42 BRA Write_Msg
43 ;****************************************************
44 ;* Command B is entered.
45 ;****************************************************
00103A FB11 46 Cmd_B MOV.B #Msg_I-Msg_B,R3L
00103C 7A0400002011 47 MOV.L #Msg_B,ER4
001042 58000008 48 BRA Write_Msg
If you need a quick reference to the Terminal Interface syntax, you can
use the built-i n he lp fac ilit ie s. For exa mp le , to displa y t he top lev el he lp
menu , ty p e:
R> help
help - display help information
help <group> - print help for desired group
help -s <group> - print short help for desired group
help <command> - print help for desired command
help - print this help screen
--- VALID <group> NAMES -- gram - system grammar
proc - processor specific grammar
sys - system commands
emul - emulation commands
hl - highlevel commands (hp internal use only)
trc - analyzer trace commands
* - all command groups
You can type the ? symbol inst e ad of typing help. For exa mp le, if you
want a list of c om m ands in the em ul comm a nd g ro up, type:
To display help info rm atio n for any c om m an d, just type help (or ?) an d
the command na me. For exa mple :
R> help load
Getting Started 2-7
load - download absolute file into processor memory space
load -i - download intel hex format
load -m - download motorola S-record format
load -t - download extended tek hex format
load -S - download sysmbol file
load -h - download hp format (requires transfer protocol)
load -a - reserved for internal hp use
load -e - write only to emulation memory
load -u - write only to target memory
load -o - data received from the non-command source port
load -s <str> - send a character string out the other port
load -b - data sent in binary (valid with -h option)
load -x - data sent in hex ascii (valid with -h option)
load -q - quiet mode
load -p - record ACK/NAK protocol (valid with -imt options)
load -c <file> - data is received from the 64000. file name format is:
<filename>:<userid>:absolute
Initialize the
Emulator to a
Known State
Note
To initialize the emulator to a known state for this tutorial:
It is especially import a nt tha t you per form the fo llowin g ste p if the
emulato r is be ing operate d i n a stan da lone mode cont rolled by only a
data terminal. The only program entry available in this mode is
through memory modific atio n; conse qu entl y, if the emulat or is
reinit ia li z ed , em ula t ion memory wi ll be clea red and a gre at de al of
tedious wor k could be lost.
1. Verify that no one else is using the emu la to r or will have nee d
of configu ra tion it e ms pr ogra m m ed int o the e mu la to r.
2. Initia li ze th e em ulator by typi ng the comm an d:
To set the emula tor’s c onfi gur at io n value s to the proper sta te for t his
tutorial, do this:
1. Type:
R> cf
You should se e the follo wing configuration items displayed:
The individual conf igu ration ite ms wo n ’t be explained in thi s exa m ple;
refer to Chapter 4 of this manual and the User’s Reference manual for
details.
2. If the config ura ti on ite m s displ a ye d on you r scree n do n’t
match the one s liste d a bov e, he re is how to make th em a gre e :
For each con fig ura ti on ite m that does not match, type :
R> cf <config_item>=<value>
Getting Started 2-9
cf ba=en
cf chip=3042
cf clk=ext
cf dbc=en
cf drst=dis
cf mode=7
cf nmi=en
cf rrt=en
cf rsp=9
cf tdma=en
cf trfsh=en
cf trst=en
bc -d bp #disable
bc -e rom #enable
bc -d bnct #disable
bc -d cmbt #disable
bc -d trig1 #disable
bc -d trig2 #disable
For example , if you ha ve the fol lowi ng c onf igu ra ti on ite ms
displaye d (those in bold indic ate item s dif fe re nt from the list
above):
To make th ese c onfi gur at io n va lue s a gre e with the desire d
values, type :
R> cf clk=int
R> cf rrt=dis
3. Now, you need to set up stac k poi nte r.
Type:
R> cf rsp=0ff904
4. Let’s go ahe a d and set up th e proper break conditions.
Type:
R> bc
You will see:
For each break con ditio n that does not ma tc h the one list ed ,
use one of the followin g comma nds:
2-10 Getting Started
To enable bre a k conditions that ar e curr en tly disa bl e d, type:
R> bc -e <breakpoint type>
To disable break conditions that are currently enabled, type:
R> bc -d <breakpoint type>
For example , if typi ng bc giv es the foll owi ng li st of bre ak
conditions:
Loading...
+ 99 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.