Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Configure debug and run operation

Before you could run the "demo.elf" file on MicroBlaze you should configure the "stdio output".

You shoud click "Run">"Run Configurations...".

Scroll Title
titleOpen "Run Configurations"
Image Added

A pop-up "Run Configutations" will appear. Click "demo.elf" (if it is not already selected) and then click "SDIO Connection" tab.

Scroll Title
title"Run

...

Configurations" opened
Image Added

Check ((tick)) the box "Connect STDIO to Console" and select as port "JTAG UART". Then click "Apply" button.

Scroll Title
titleConnect STDIO to Console
Image Added

Then click "Close" button. The pop-up will close.

Tip
The Debug operation normaly share these settings, so you doesn't need to repeat this procedeure for debug operation but is better to check the settings (it is better to be on the safe side).

Change perspective from "C/C++" to "Debug"

To change perspective you should click "Window">"Open Perspective">"Debug".

Scroll Title
titleOpen Debug Perspective
Image Added

The new perspective is the following.

Scroll Title
titleDebug perspective opened
Image Added

Use the "demo"

...

project with the XMD UART

Tip
Demo program (running on MicroBlaze) will work even in case the UART port is left unconnected: it is not necessary to use a USB/Uart converter or Uart port on a PC, if you are using XMD UART HDL block.

With this application, you can test the PC ↔ USB ↔ JTAG  ↔ FPGA communication using a simulated UART (XMD_UART) on JTAG/USB connection.

GUI procedure

In this simple case you can simply click "Run" > "Run"

Scroll Title
titledemo.elf downloaded and connected to Jtag-Uart
Image Added

In the console the menu of demo.elf should appear. If the menu doesn't appear you have probably set RS232 instead of debug (mdm) and/or set incorrectly "Stdio output".

If you write the character "a" the RAM test should start.

Image Added

XMD procedure

Scroll Title
titleIn the XMD console you should write "connect mb mdm -debugdevice cpunr 1".
Image Added

In the XMD console you shoud write "rst" and then click "return" on the keyboard.

Scroll Title
titleIn the XMD console you should write "dow C:/XilinxProject/reference-TE0300/SDK/SDK_Workspace/demo/Debug/demo.elf" and then click "return" on the keyboard.
Image Added
Scroll Title
titleIn the XMD console you shoud write "run" and then click "return" on the keyboard.
Image Added
Scroll Title
titleIn the XMD console you shoud write "terminal -jtag_uart_server 4321" and then click "return" on the keyboard.
Image Added

After this  you should open some terminal emulators (because you want to input/output some characters to with the XMD UART, then open some terminal emulators), such as

  • Microsoft / Hilgraeve HyperTerminal (usually included in Windows before Vista START MENU > All programs > Acessories > Communications > Hyper Terminal). 
  • ClearTerminal (very easy)
Tip

Connect using the following settings:

  • No Host address
  • Port Number: 4321
  • TCP/IP connection type (client)
Tip

The UART settings (not required by ClearTerminal) are:

  • bits per seconds: 115,200
  • data bits: 8
  • parity: none
  • stop bits: 1
  • flow control: none (otherwise you will not be able to enter commands)

Method A) XMD console, automatic

  • Configure Jtag_Uart using "Debug" > "Debug Configuration"
  • Run XMD console using "Debug" > "Launch XMD"
  • Run ClearTerminal Console

Method B) Manual

In the XMD console you shoud write "stop" and then click "return" on the keyboard.

In the XMD console you shoud write "run" and then click "return" on the keyboard.

After this two further step the menu of "demo.elf" should appear in the terminal emulator.

Scroll Title
titleAfter this two further step the menu of "demo.elf" should appear in the terminal emulator.
Image Added

In the console the menu of demo.elf should appear. If the menu doesn't appear you have probably set RS232 instead of debug (mdm) and/or set incorrectly "Stdio output".

If you write the character "a" the RAM test should start.

...

Scroll Title
titleDebug Perspective
Image Removed

...

If you write the character "a" the RAM test should start.
Image Added

Use the demo project without the XMD UART

To use the demo project without the XMD UART, you need to use "RS232" instead of "debug_module" as standard in/out port. Otherwise the application running on the Microblaze processor freezes if you disconnect the XMD. To accomplish that you need to set up the Microblaze "Software Platform Settings".

  • In the dialog window select "OS and libraries" in the left window and pick "RS232" as a stdout and stdin interface.
  • Then rebuild the software and download again the project to the FPGA.

The UART is then redirected to external pins, which are defined in the data/system.ucf file.

Tip

The UART settings are:

  • bits per seconds: 115,200
  • data bits: 8
  • parity: none
  • stop bits: 1
  • flow control: none (otherwise you will not be able to enter commands)

The following snippet shows the case of the TE0300 series modules:

Module RS232 constraints*
Net fpga_0_RS232_RX_pin LOC=B13;
Net fpga_0_RS232_TX_pin LOC=B14;
Please refer to the table below  for other module series relevant to this application note.

Scroll pdf title
titleLocation of UART pins examples.

TE series

RS232_RX
FPGA ball

RS232_RX
module pin

RS232_TX
FPGA ball

RS232_TX
module pin

TE0300

R6

J5-29

P6

J5-31

TE0320

V17

J5-IO18

W17

J5-IO19

TE0630

Y7

J5-29

AB7

J5-31

TE0303It doesn't apply J1-33It doesn't apply J1-34

TE0304

It doesn't apply

J1-3

It doesn't apply

J1-2

TE0323

It doesn't apply

J4-35

It doesn't apply

J4-37

host (PC)

TX

TX

RX

RX

Scroll Title
titleSample UART to USB virtual COM port converter.
Image Added
Scroll Title
titleSample UART to USB virtual COM port converter: signal detail for TE0320 and TE0323.
Image Added