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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
12,675 Views
Registered: ‎06-24-2008

UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

Hey,

 

I created an edk project on a Virtex5 100fxt with the PPC440 processor.  I am using a board without a physical serial port so I wanted to use UART over the JTAG cable.  I have done this on Microblaze in the past by connecting to the MDM in the XMD and then entering: >terminal -jtag_uart_server

 

The MDM stands for Microblaze Debug Module in EDK so I know it isn't for PPC.  Is there any other way to view the standard output of my programs running on the PPC440 when I only have access to JTAG?

 

thanks.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
14,812 Views
Registered: ‎06-24-2008

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

That makes perfect sense.  I had missed a step at first so here is how it is accomplished:

 

After creating a design with PPC that writes to standard outpu, the first thing to do is

1. add an MDM core to design from the IP catalog

2. In System Assembly View > Bus Interfaces you must connect the MDM to the PLB (as a SPLB)

3. In System Assembly View > Addresses you must give the MDM some address space, in the size dropdown i used 1k (Without this step previously working program wouldn't even run)

4. In Software > Software Platform Settings > OS and Libraries set the stdout and stdin to the new MDM core

 

That is what worked for me, hope it helps someone.

 

Edit: to view the output just type the command in xmd:  "terminal"

Message Edited by bborko on 07-16-2008 10:19 AM

View solution in original post

0 Kudos
10 Replies
Xilinx Employee
Xilinx Employee
12,653 Views
Registered: ‎08-07-2007

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

Hi,

 

MDM can still be used with PPC. Just connect it to PLB bus and use the JTAG UART function only.

 

-XF

0 Kudos
Highlighted
Contributor
Contributor
14,813 Views
Registered: ‎06-24-2008

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

That makes perfect sense.  I had missed a step at first so here is how it is accomplished:

 

After creating a design with PPC that writes to standard outpu, the first thing to do is

1. add an MDM core to design from the IP catalog

2. In System Assembly View > Bus Interfaces you must connect the MDM to the PLB (as a SPLB)

3. In System Assembly View > Addresses you must give the MDM some address space, in the size dropdown i used 1k (Without this step previously working program wouldn't even run)

4. In Software > Software Platform Settings > OS and Libraries set the stdout and stdin to the new MDM core

 

That is what worked for me, hope it helps someone.

 

Edit: to view the output just type the command in xmd:  "terminal"

Message Edited by bborko on 07-16-2008 10:19 AM

View solution in original post

0 Kudos
Visitor andrew.nesterov
Visitor
12,588 Views
Registered: ‎05-06-2008

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

Hi,


bborko wrote:

The MDM stands for Microblaze Debug Module in EDK


It might be "context sensitive", so to speak. I saw the abbreviation stands in two ways, the second was Microprocessor Debug Module,

that fits well for both the PPC and MBZ.

 

Regards,

Andrew 

0 Kudos
Explorer
Explorer
12,499 Views
Registered: ‎07-08-2008

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

Hi,

 

Can you in the same time (while having terminal and watching out for output) download software thru jtag?

 

Greetings, Mariusz. 

--
Mariusz Grad.
0 Kudos
Contributor
Contributor
12,492 Views
Registered: ‎06-24-2008

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

Yes, entering the command "terminal" in xmd spawns a new window where all the uart rx and tx takes place. The original xmd window can still be used for xmd commands such as "dow".

0 Kudos
Explorer
Explorer
12,481 Views
Registered: ‎07-08-2008

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

Hi,

 

Thx for reply.

I thought that it's not possible to do that - I tried several times.

Your message  changed my thinking.

 

The problem was with the sequence of connections.

It works when:

 

RUNNING> XMD% targets
------------------------------------------------
System(0) - Hardware System on FPGA(Device 3) Targets:
------------------------------------------------
        Target(0) - MDM Uart Channel Target
        Target(1) - PowerPC405(1) Hardware Debug Target*

 

Before it was in different sequence and I didn't had any output while downolading elf.

To change the seq. one has to go to $EDK_PROJECT/etc/xmd_ppc405_0.cmd and comment line which starts like that: connect ppc 

 

Now when launching it will not connect automatically to ppc.

One should issue command: connect mdm -uart; terminal; connect ppc hw; download *.elf run;

One more time thanks for reply.

Greetings, Mariusz.

 

 

--
Mariusz Grad.
0 Kudos
Observer mferraro
Observer
10,190 Views
Registered: ‎01-20-2009

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

Hope someone is still monitoring this thread.

 

I've followed everyone's suggestions, including the xmd command sequence and still no luck.

 

I know my board works, I've swapped out the PPC and put in a MB - then I can see debug statements over JTAG.  Also as a test, I have directed outbyte() to load a blockram.  Using the Memory viewer in ASCII mode, I can see the text.  So I know my program is OK -- it is just something with the UART connectivity ...

 

Perhaps I have configured the mdm periperhal incorrectly, in terms of parameter settings

 

MHS:

BEGIN mdm
 PARAMETER INSTANCE = mdm_0
 PARAMETER HW_VER = 1.00.d
 PARAMETER C_USE_UART = 1
 PARAMETER C_UART_WIDTH = 8
 PARAMETER C_BASEADDR = 0x84400000
 PARAMETER C_HIGHADDR = 0x8440ffff
 BUS_INTERFACE SPLB = mb_plb
END

 

MSS:

 

BEGIN OS
 PARAMETER OS_NAME = standalone
 PARAMETER OS_VER = 2.00.a
 PARAMETER PROC_INSTANCE = ppc440_virtex5_0
 PARAMETER STDIN = mdm_0
 PARAMETER STDOUT = mdm_0
END

 

BEGIN DRIVER
 PARAMETER DRIVER_NAME = uartlite
 PARAMETER DRIVER_VER = 1.13.a
 PARAMETER HW_INSTANCE = mdm_0
END

 

Do the parameters C_JTAG_CHAIN & C_MB_DBG_PORTS matter?

 

I thought maybe changing C_MB_DBG_PORTS = 0 might help, or change C_JTAG_CHAIN to USER1 or USER3 ...

 

To everyone that has gotten this successfully working -- what settings did you use?

 

 

Thanks,

 

Matt

 

 

 

0 Kudos
Observer kef2189
Observer
8,092 Views
Registered: ‎02-18-2010

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

Did you ever get this working?

 

-Elliott

0 Kudos
Observer mferraro
Observer
8,046 Views
Registered: ‎01-20-2009

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

No I gave up.  Never did figure out what was happening - perhaps because i was using a CES FPGA. 

I can get embedded OS's to work, but not a simple JTAG serial port.

0 Kudos
Contributor
Contributor
2,144 Views
Registered: ‎02-19-2009

Re: UART output over JTAG on the PPC440 (or a way to get the std output without physical RS232 port)

Jump to solution

Use two debug pins from your FPGA to connect to Uartlite Rx and Tx pins. These pins are usually accessable to through ext connector in your board. The output from these pins are in TTL logic (0 to 3.3v). So you may have to buy a TTL to RS232 converter cables which converts TTL logic in to RS232 logic(+6.6 to -6.6v). These converters are very inexpensive. Here is the link for the converter. http://www.superdroidrobots.com/shop/category.asp?catid=41

 

I had the same problem and i tried this.  Works like a charm. Let me know if you need more info.

 

 

0 Kudos