UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 13687

MicroBlaze - XMD - "Error: XMD stub on target board not initialized correctly..."

Description

General Description:

An XMD stub is created successfully and is running on the target board. However, when XMD is run, it reports:

"Connecting to XMD stub...

Unable to read Byte from XMD stub.

ERROR: XMD stub on target board not initialized correctly.

XMD: No ack/reply from the board

Unable to Establish connection with XMD stub

Exiting..."

Solution

1. Ensure that the system reset is not being asserted. (Refer to the corresponding example to see where the "sys_reset" signal is connected on the board).

2. Ensure that the system was created from the make file using MODE=xmdstub/bootstrap (i.e., ensure that "xmdstub.out" is running on the board).

3. If a new bit stream is to be downloaded, switch the board power off and on once before downloading the bit stream.

If the example system specifies UART as the DEBUG PERIPHERAL (in the ".mhs" and ".mss" files), try the following:

- Ensure that the RS-232 serial cable connections are correct.

- Provide the option "-c s".

- If the Com 2 port is used for connecting the RS-232 serial cable, provide the option "-s com2".

- Check the board documentation and ensure that the correct jumpers are set to use the RS-232 port on the board.

- Ensure that the clock frequency specified in the ".mhs" file for the opb_uartlite peripheral is the same as the clock frequency on the board.

If the example system specifies JTAG UART as the DEBUG PERIPHERAL (in the ".mhs" and ".mss" files), try the following:

- Ensure that the JTAG cable connections are correct.

- Ensure that no other application on your computer is using the JTAG cable.

- Do NOT provide the "-c s" option.

- If there are two or more devices on the JTAG chain, provide the -j <device position> option, where <device position> is the position of the FPGA containing the MicroBlaze system. Look at the xmd/xmdterm/xminit output to find the device positions.

- Ensure that no other program is using your debug port while attempting to connect to the XMD stub. For instance, be certain to close iMPACT while connecting to the XMD stub.

Example XMD output:

-------------------------------------------------------------------------------------------------

Position......Part Name.........Version.....File Name

...1..............XC18V01..............0...........NOT YET ASSIGNED

...2...............XCV100...............3...........NOT YET ASSIGNED

------------------------------------------------------------------------------------------------

For the above JTAG chain, the FPGA with MicroBlaze (XCV100) is in Position 2 on the JTAG chain. You should therefore use:

xmdterm -j 2

xmd -t hw -j 2

xminit -j 2 -boot code/system.out

4. Perform a serial/JTAG chain integrity check.

5. Perform a board check: Is there power? Is it programmed?

6. Make certain the debug peripheral is declared in the MHS file and properly set in the MSS file.

For Example:

MHS:

SELECT SLAVE opb_jtag_uart

cset attribute HW_VER = 1.00.a

CSET attribute INSTANCE = myjtag

CSET attribute C_BASEADDR = 0xFFFF9000

CSET attribute C_HIGHADDR = 0xFFFF90ff

END

MSS:

SET attribute DEBUG_PERIPHERAL = myjtag

SELECT INSTANCE myjtag

CSET attribute DRIVER = drv_jtag_uart

CSET attribute DRIVER_VER = 1.00.a

END

7. Toggle power and reprogram the device.

AR# 13687
Date Created 08/29/2007
Last Updated 12/15/2012
Status Active
Type General Article