User`s guide
126 CPU32 Emulation
Chapter 7: Using the Emulator with a Debugger
Using the Software Development Systems debugger
The .cfg file sets up the target’s chip select registers (SIM registers)
needed in order to map memory correctly. If your target is connected
to an analysis probe, you will need to execute some additional
commands in order to configure the analysis probe. The analysis probe
stores its own copy of the chip select registers. In general, just
executing the above write commands will configure the target’s
registers. The emulator also stores a copy of these registers. The
emulator command “sync sim” listed below will copy the values of the
target’s SIM registers into the EMSIM registers. Next, the EMSIM
registers must be copied over to the analysis probe. This is
accomplished by issuing the built-in command “pp load”. Enter the
following two commands into the Command window:
control –c “sync sim”
control –c “pp load”
You should have the appropriate values for your target first written into
Example
If you load the est360.wsp and set up the Debug Dialog options for
the target you are connecting to, when you click OK, the file
68360.cfg will be created and place in the cmd directory.
Comments have been added to this file, in order to explain the
items (comments begin with a #).
Contents of 68360.cfg:
set vectbase = 0x400000
set vectaddr = 0x400000
write -l CPU:0x3FF00 = 0x08000133 # MBAR
write -l SD:0x08001000 = 0x00014F71 # MCR
write -b SD:0x08001022 = 0x0E # SYPCR
write -l SD:0x08001040 = 0x17CD23A0 # GIMR
write -l SD:0x08001050 = 0x00000001 # BRO
write -l SD:0x08001054 = 0x3FFC0002 # OR0
write -l SD:0x08001060 = 0x00100001 # BR1
write -l SD:0x08001064 = 0x2FF80000 # OR1
write -l SD:0x08001080 = 0x00400001 # BR3
write -l SD:0x08001084 = 0x2FE00003 # OR3
write -b SD:0x0800100C = 0x8F # CLKOCR
write -w SD:0x08001010 = 0x4000 # PLLCR
write -w SD:0x08001014 = 0x8000 # CDVCR
write -w SD:0x08001016 = 0x0000 # PEPAR