HP 64746 User Manual page 153

Emulation/analysis
Table of Contents

Advertisement

For example, assuming you have the area from 0 through 01FFFFH mapped as
emulation ROM and have already written your code to initialize the chip-select
registers, you should load that code, set a breakpoint, and then run from a reset
condition. When the breakpoint is hit the chip-selects will have been properly
initialized. Here is an example program that will demonstrate this:
XDEF
ORG
DC.L
DC.L
ORG
MOVE.W
MOVEA.L
MOVE.W
MOVE.W
MOVE.W
MOVE.W
NOP
CS_INIT
NOP
NOP
Assuming you have loaded the above example into emulation memory, you can
now use the commands:
modify software_breakpoints enable <RETURN>
modify software_breakpoints set CS_INIT <RETURN>
run from reset <RETURN>
If your initialization code is loaded in target ROM, you will not be able to set a
software breakpoint there. In this case, you should use an analysis breakpoint as
shown in the example below:
trace about CS_INIT break_on_trigger <RETURN>
run from reset <RETURN>
Note
When using the trace command with the "break_on_trigger" option, be sure to
select an address that is at least 2 words after the instruction you expect to be
executed. This ensures that the analyzer does not break on a "prefetch" of that
instruction.
When the emulator breaks into the monitor the chip-select registers will have been
initialized to the values you're using. You can now use display, modify, load, step,
or run commands because the chip-selects are properly initialized.
Configuring the Emulator for In-Circuit Operation
CS_INIT
$0
$440000
; Stack begins at $43FFFE
$400
; Reset initialization code
$400
#$0800,$F2
; Set up the BAR for $800XXX
#$800000,A0
#$3F02,($832,A0)
; OR0 - 512K, read-only, 1 wait-state
#$0001,($830,A0)
; BR0 - base address 0
#$1F80,($836,A0)
; OR1 - 256K, read-write, 0 wait-state
#$0801,($834,A0)
; BR1 - base address $400000
Chapter 5: Plugging into a Target System
153

Advertisement

Table of Contents
loading

This manual is also suitable for:

68302

Table of Contents