Specifications
212 www.xilinx.com Embedded System Tools Guide (EDK 6.2i)
1-800-255-7778 UG111 (v1.4) January 30, 2004
Chapter 13: Xilinx Microprocessor Debugger (XMD)
R
Size of the memory address bus allocated in the simulator. Programs can access the
memory range from 0 to 2
size-1
Simulation Statistics
While mb-gdb is connected to XMD with the simulator target, the statistics of the cycle-
accurate simulator can be viewed from xmd as follows:
x In the xmd prompt type stats
Simulator Target Requirements
To debug programs on the Cycle-Accurate Instruction Set Simulator using XMD, the
following requirements have to be met.
x Programs should be compiled for debugging and should be linked with the startup
code in crt0.o
mb-gcc can compile programs with debugging information when it is run with
the option -g
and by default, mb-gcc links crt0.o with all programs. (Explicit option:
-xl-mode-executable)
x
Programs have a default memory size of 64Kbytes.
x Currently, XMD with simulator target does not support the simulation of OPB
peripherals.
XMD Internal Tcl Commands
In the Tcl interface mode, xmd starts a Tcl shell augmented with xmd commands. All xmd
Tcl commands start with ’x’ and can be listed from xmd by typing “x?”. It is recommended
to use the Tcl wrappers for these internal commands as described in Figure 13-1. The Tcl
wrappers would pretty print the output of most of these commands and also provide more
options. While the Tcl wrappers will be backwards compatible, these x<name> commands
may be deprecated in a future EDK release.
x xrmem target addr [num]
Read num bytes or 1 byte from memory address <addr>
x xwmem target addr value
Write a 8-bit byte value at the specified memory addr.
x xrreg target [reg]
Read all registers or only register number reg.
x xwreg target reg value
Write a 32-bit value into register number reg
x xdownload target [-data] filename [addr]
Download the given ELF or data file (with -data option) onto the current target’s
memory. If no address is provided along with ELF file, the download address is
determined from the ELF file by reading its headers. If an address is provided with
the ELF file, it is treated as PIC code (Position Independent Code) and
downloaded at the specified address and Register R20 is set to the start address
according to the PIC code semantics. Note that NO Bounds checking is done by
xmd, except preventing writes into xmdstub area (address 0x0 to 0x400).










