AR# 19401

|

8.2i EDK - How do I redirect STDOUT to the XMD console?

描述

Keywords: STDIO, XPS

How do I redirect STDOUT to the XMD console?

NOTE: This solution applies to both the PPC and MB processors.

解决方案

Starting with EDK 6.2 SP1, follow these steps:

1. In your MHS file, instantiate the opb_mdm (which subsumes the jtag_uart) as follows:

BEGIN opb_mdm
PARAMETER INSTANCE = opb_mdm_0
PARAMETER HW_VER = 2.00.a
PARAMETER C_BASEADDR = 0xFFFE0400
PARAMETER C_HIGHADDR = 0xFFFE04FF
PARAMETER C_MB_DBG_PORTS = 0
PARAMETER C_USE_UART = 1
PARAMETER C_UART_WIDTH = 8
BUS_INTERFACE SOPB = opb
PORT OPB_Clk = sys_clk_s
END

2. In XPS, select Project -> Software Platform Settings, and ensure that the driver for opb_mdm peripheral is "uarlite."

3. In XPS, select Project -> Software Platform Settings, and in the Library/OS parameters tab, set the STDOUT peripheral to your opb_mdm peripheral instance.

4. From XMD, connect to the MDM's UART as follows:

XMD% mbconnect mdm # or xconnect mdm
.....
JTAG chain configuration
--------------------------------------------------
Device ID Code IR Length Part Name
1 05046093 8 XCF04S
2 05046093 8 XCF04S
3 0124a093 10 XC2VP7
Assuming, Device No: 3 contains the MicroBlaze system
Connected to the JTAG Microprocessor Debug Module (MDM)
No of processors = 0
XMD% read_uart

# To stop reading the MDM UART (via JTAG)
XMD% read_uart stop

# you can also do the following to pipe the MDM UART contents to a log file
XMD% set uartf [open jtag_uart.log w]
XMD% read_uart start $uartf


NOTE: EDK 9.1i
The steps above do not work with 9.1. The only work-around is to use the 'terminal' command. Refer to the XMD chapter of the Embedded System Tools Reference Manual for more information.
AR# 19401
日期 02/28/2008
状态 Active
Type 综合文章
People Also Viewed